Game Development Reference
In-Depth Information
Code generation
After having designed the game states that are needed for the game, we need to
run the XML schema file through the PulseCodeGen tool. The following is a listing
of a batch file that will do exactly that. The batch file can be saved to the project
root folder. You may need to modify the paths in the batch file as required, as your
directory structure may be different than what is presented here.
REM *************** init.bat ***************
@ECHO OFF
IF EXIST .\src\jig\gsrc\client del .\src\jig\gsrc\client\*.as
CALL "%GAMANTRA%"\bin\PulseCodeGen.bat .\JigsawSchema.xml jig.gsrc .\
src\jig\gsrc
IF NOT %ERRORLEVEL% == 0 GOTO ERROR
ECHO Success!
GOTO END
:ERROR
ECHO oops!
:END
pause
REM ************ end of init.bat ************
The previous batch file is convenient if you change the schema; the regeneration of
source files can be quickly regenerated by simply running it again.
Screen classes
Once we have generated the class files based on the schema we designed, we need
to prepare some of the game screens for the game. For this we will leverage from
the screen classes, which are already available to us from the PulseUI package. We
simply need to subclass from these classes as shown next:
 
Search WWH ::




Custom Search