3D Game Programming, initial curiosities
by Ben Younkins · 08/02/2006 (6:06 pm) · 2 comments
I've purchased the Torque Game Engine, and have started educating myself using 3D Game Programming All In One. I'm not spending as much time as I would like on it, but I'm making headway easily in the code.
I still have a few issues that I'm trying to work out.
I haven't quite gotten a grasp of what MissionCleanup does, but perhaps that's related to a lack of understanding of what a "Mission" delimits.
On page 120, the in-book code has us inputting a %rd variable that wasn't declared. Apparently Torque is friendly to this kind of invocation, but what's a default value? NULL? Zero? I know that the sound probably doesn't require much in the way of rotation, as it's an invisible radial emission, but I'm still curious. Maybe I'll try to slap a sound together with a shape and see what happens.
I really need to start screwing around and tweaking book code to see what happens, but I keep on deciding to see what more the book will reveal before I start detouring.
I still have a few issues that I'm trying to work out.
I haven't quite gotten a grasp of what MissionCleanup does, but perhaps that's related to a lack of understanding of what a "Mission" delimits.
On page 120, the in-book code has us inputting a %rd variable that wasn't declared. Apparently Torque is friendly to this kind of invocation, but what's a default value? NULL? Zero? I know that the sound probably doesn't require much in the way of rotation, as it's an invisible radial emission, but I'm still curious. Maybe I'll try to slap a sound together with a shape and see what happens.
I really need to start screwing around and tweaking book code to see what happens, but I keep on deciding to see what more the book will reveal before I start detouring.
#2
08/03/2006 (7:55 am)
MissionCleanup is not a special entity. it's just a SimGroup. SimGroups and SimSets are the built-in torque container objects for quickly storing and iterating through object handles. youll notice that objects which are defined using datablocks are added to the MissionCleanup simgroup. other objects which don't use datablocks are stored in the MissionGroup. both of these groups are deleted when the level is "unloaded" deleting all its contents as well. this isnt automatic and it would be instructional to find the place in script where MissionCleanup is deleted. its mainly for convenience. whenever you create a new object, you should always add it to MissionCleanup so you can have one central place for deleting objects during cleanup. use SimSets for grouping objects into arbitrary overlapping sets. also, a "mission" is defined very loosely. in the most general sense, a mission is the collection of objects which form the 3d world. this can include things like terrain, buildings, objects, lights, water etc. "mission" is just torque's special term for all the objects which collectively make up the game environment.
Torque Owner Ben Younkins