Game Development Reference
In-Depth Information
Designing the schema
After knowing what information we need to share among the clients, we start out
with the schema file. The schema file for the implementation is as follows:
<ObjectSchema>
<import>
<client import="pulse.gsrc.client.*" />
</import>
<class name="ShipMask" parent="GameState" classId="601" >
<public>
<property name="maskId" type="byte"/>
</public>
</class>
<class name="ShipPos" parent="GameState" classId="602" >
<public>
<property name="sid" type="int" />
<property name="posX" type="float"/>
<property name="posY" type="float"/>
<property name="speed" type="float"/>
</public>
</class>
<class name="Item" parent="GameState" classId="603" >
<public>
<property name="quadrant" type="byte"/>
<property name="index" type="byte" />
<property name="itemType" type="byte"/>
<property name="posX" type="float"/>
<property name="posY" type="float"/>
</public>
</class>
<class name="ShipWin" parent="GameState" classId="604" >
<public>
</public>
</class>
</ObjectSchema>
 
Search WWH ::




Custom Search