Game Development Community

Loading missions in c++

by Emmanuel Nwankwo · in Torque Game Engine · 11/05/2004 (11:11 pm) · 8 replies

Hi,
how can i load a mission file in c++, my application will require me to parse through a predefined text file describing animation actors, from there i would like to be able to load up a shape instance . In a nut shell, use an external file as the source control for loading up shapes and items in TGE.

The Ideas is to use an external level editor for interior scenes to place objects that the player can interact with. The External file will have a listing of objects by instance names. Iwould like to use this file to create shapes based on these instance names.

#1
11/06/2004 (12:45 pm)
Have you opened a .mis file in notepad yet?
#2
11/06/2004 (2:22 pm)
Yes I have, I guess I would like to find out where in the C++ code does the .mis get read in and what the code flow is to create shapes from it. If I can find the code then I could use that same code with some modifications to read in my mission file created with a level editor, and create shapes based on the data contained within.

The level editor I wish to use can also create collision data as well as animation data for the objects. Hence I would be able to set the pos/rot of nodes of the created shapes programmatically.

I have looked in tsShapeInstance:buidInstanceData and I can see whats going on, but I can't quite find where the .mis file parsing is happening, the closest I got is somewhere inCompiledEval.cc where I lost the trail
#3
11/06/2004 (4:54 pm)
Mis files are are just script files with a different extension. The are loaded the same way any other script file is run.
#4
11/07/2004 (10:44 am)
Michael is correct. BTW, if you click the little garbage can it will remove a post - good way to get rid of duplicate posts.

If you want a simplified overview... the console system parses and executes mission files, which causes a bunch of SimObjects/SimObject derivatives to be created in the usual way...
#5
11/07/2004 (2:51 pm)
Thx guys, I will check that out and post back. btw are there any plans in the pipeline to simplify the DTS art & code pipeline.
#6
11/07/2004 (9:40 pm)
Yes, it's one of our big priorities.
#7
11/11/2004 (12:08 pm)
I was wondering, how long would it be before the change to the DTS pipeline and what type of change will this be. Just so that I can decide what to do for the present time.
#8
11/12/2004 (10:25 am)
When it gets done. :)