Game Development Reference
In-Depth Information
You will find PulseCodeGen.bat under $\bin . It requires three arguments:
1. Schema File: the game schema file.
2.
Package name: a suitable package name according to your game
code structure.
3.
Output Directory: the directory where the modeler should put your
source files into.
If your game does not need any custom objects defined, you still need to create an
empty schema file as shown below and have it run through the modeler:
<ObjectSchema>
<import>
<client import="pulse.gsrc.client.*" />
</import>
</ObjectSchema>
For each class defined in the schema file, you may specify the parent class, be it one
of GameAvatar, GameRoom, or GameState.
The following are the only three classes from which the developer should inherit
from and add properties that are required for the game:
• GameAvatar
• GameRoom
• GameState
Example schema
The following schema is borrowed from the multiplayer jigsaw game example that
comes bundled with the Pulse SDK, which we will explore in great detail in Chapter 7:
<ObjectSchema>
<import>
<client import="pulse.gsrc.client.*" />
</import>
<class name="PieceMatch" parent="GameState" classId="600" >
<public>
<property name="pieceId" type="int"/>
<property name="dir" count="1" type="int"/>
</public>
 
Search WWH ::




Custom Search