Game Development Community

Terrain Plan for TGE

by Carpenter Software · in Torque Game Engine · 07/17/2006 (3:28 pm) · 8 replies

Terrain Plan for TGE:

I want to create a map using a large greyscale bitmap at approximately 700 pixels (height) by 1024 pixels (width). Then divide this large bitmap into 256 by 256 pixels with some overlaping (64 pixels). If I understand the Mission Area, the Player can be transferred from one mission to another by a callback to player::onLeaveMissionArea (Coding it so it would happen). The onLeaveMissionArea will be set within the 64 pixels overlap beyond the halfway mark of maybe 35 pixels so he would have to back up 6 pixels inorder to return to the same mission.

I will experiment with this idea. Any comments solely on the IDEA are welcomed.

Jesse

#1
07/19/2006 (6:51 pm)
The division of the large bitmap into 256 by 256 smaller ones and from the small greyscale maps, I created 8 missions to experiment with, a success. Now I will experiment using onLeaveMissionArea callback to go from one mission to another.

Jesse.
#2
07/20/2006 (7:29 pm)
I have experimented with changing one mission to another but program crashed after entering new mission. Unable to locate object: player... Apparently after onLeaveMission, it enters a routine onRemove the player. Any comments on cycling missions are welcomed.

Jesse.
#3
07/20/2006 (8:00 pm)
You can count on pretty much everything created during a mission to be destroyed at the end of the mission when the MissionCleanup group is deleted.

I currently store all my player state information (current stats, inventory, etc...) in an intermediary 'plain old data' representation (in my case, in an SQLite database on the 'server side') as they leave one mission, then recreate the player and reset the state information at the beginning of the next mission. This seemed like the cleanest way to handle it, though in my case it's starting to become a complication, since I'm ending up with a lot more varieties of state information I need to propagate between missions than I'd originally planned for (such as if they are a passenger in an AI-pilot-controlled craft). I am starting to wonder whether I should try to just propagate the actual game objects (player, mounted vehicle, etc...) between missions, perhaps in a 'MissionPersistant' SimGroup or something. In any case, the 'plain data' representation between missions is how I do it now.

I also noticed that it often seemed to be good to load the new mission using a short schedule call (such as 'schedule(100,0,"loadTheNextMission")' rather than directly. This might have something to do with trying to to load a new mission in the middle of a callback (either in trigger or collision callback in my case).
#4
07/22/2006 (3:31 pm)
For an adventure singleplayer game:

I have been reviewing information about the loading and unloading of missions in TGE... According to 3D Game Programming All in One by K. Finney, p. 250 chap 7, there is a lot of communication from servers to clients in both the common directory (folder) and the control directory (game folder) while loading and unloading. The script and code is enterwoven in three different phases (datablocks, ghost objects and lighting).

I am not sure where to start... Is there a way to continue game play while changing missions and skip certain parts of the phases during loading and unloading of missions?

Maybe there is a way to program some toggle switches as to what is loaded and unloaded during mission loading.

Jesse
#5
07/24/2006 (12:21 am)
For an adventure singleplayer game:

I wrote a routine that changes missions. It works. The routine is posted in "Large Worlds?" at Posted: Jul 24, 2006 01:02. Any comments are welcomed....

Jesse.
#6
07/26/2006 (1:46 pm)
For an adventure singleplayer game:

Is it necessary to remove player after switching mission?

I prevented the loadingGUI to occur because I wanted to see the render effects in the mission transistion. The player enters onLeaveMissionArea that triggers the loadMission subroutines. The player stops (freezes). Parts of the terrain changes. Player disappears. Terrain displays correctly. Player reappears.

NOT a very pleasant view. Any comments are welcomed.

Jesse.
#7
07/27/2006 (11:33 am)
For an adventure singleplayer game:

I will experiment in preventing the player from being removed when cycling missions. Any comments are welcomed.
Jesse
#8
07/27/2006 (2:52 pm)
For an adventure singleplayer game:

Well there is a lot going on with the player... would not reappear!?

Jesse