Saturday, November 3, 2012

Screen Transitions Update

I got the game to go through the first cycle for the briefing, mission and debriefing for the first tutorial mission.  In theory, it should automatically kick into the second tutorial mission cycle.  I need to create the dialog audio and chat files for the second tutorial; so, I can't really confirm that it will work perfectly at this point. 

I did run into an issue getting the first mission to transition to the debriefing scene.  The end of mission checks occur during an Update() function which happens every frame.  It's part of the trigger check routine.  The mission would see a end mission trigger and run the appropriate command, Application.LoadLevel("Debriefing").  However, I failed to delete the trigger after executing this command.  Since the deinstantiation process for the mission, mostly due to having over ninety game objects in the scene, takes more than one frame to complete, the game would execute another LoadLevel() command before the completion of the first LoadLevel() command.  This quickly cascaded into a hard crash of the program. 

So, lesson learned.  Don't try to load level every frame without a method to keep multiple instances of LoadLevel() from happening in your game!  It took me two to three days to figure out what was going on with this.  I got it to work though and am generally happy with the results at this point.

Right now, I'm creating briefing and debriefing dialog for the second tutorial and creating chat records for each dialog used in the second tutorial series.  Once I get those done, I can see if the game flows from tutorial #1 to tutorial #2.  If it works without any problems, I will be releasing my first multi-leveled program for this project...

No comments:

Post a Comment