Analytical Perspectives in Game Design
2b or not 2b
Home ] Up ] [ 2b or not 2b ] Data Files Tutorial ]


 

This world consists of a game world, a single player, 2 rooms and a door.

Here are the prototype source files:

Game World

<GameWorld>
name = 2borNot2b
view = text
button = Exit(GameWorld)
button = PlayerOptions
buttons = GameStates
button = Help, help.gif
start = room2b
contains = Room2b
contains = RoomNot2b
contains = IronBoundDoor1
</GameWorld>              

Player

<Player>
name = Brian
capability = open, close, go
</Player>              

Capabilities

<Characteristic>
type = GeneralStateMachine
name = GameStates
state = running
state = stopped
state = paused
startState = running
stateTransition = running to paused
stateTransition = paused to running
stateTransition = paused to stopped
stateTransition = running to stopped
</characteristic>              

Categories

The category classes provide the foundation for this world. The following diagram shows the basic categories used in 2borNot2b.

<Categories>              
<RootThing>
</RootThing>
<PhysicalThing>
  <parent>RootThing</parent>
  <characteristic>
    BoundingBox
    <Float>height</Float>
    <Float>width</Float>
    <Float>depth</Float>
  </characteristic>
</PhysicalThing>
<PhysicalObject>
  <parent>PhysicalThing</parent>
  <characteristic>
    Weight
    <Float>weight</Float>
  </characteristic>
</PhysicalObject>
<Space>
  <parent>PhysicalObject</parent>
</SPace>
<Door>
  <parent>PhysicalThing</parent>
  <characteristic>
    openable
    <state>open</state>
    <state>closed</state>
    <transition>
      open
      <oldState>closed</oldState>
      <newState>open</newState>
    </transition>
    <transition>
      close
      <oldState>open</oldState>
      <newState>closed</newState>
    </transition>
    <transition>locked</transition>
  </characteristic>
</Door>
<Floor>
  <parent>PhysicalObject</parent>
</Floor>
<Wall>
  <parent>PhysicalObject</parent>
</Wall>
<Roof>
  <parent>PhysicalObject</parent>
</Roof>
<ConstrainedSpace>
  <parent>Space</parent>
</ConstrainedSpace>
<Room>
  <component>
    NorthWall
    <thing>Wall</thing>
  </component>
  <component>
    EastWall
    <thing>Wall</thing>
  </component>
  <component>
    SouthWall
    <thing>Wall</thing>
  </component>
  <component>
    WestWall
    <thing>Wall</thing>
  </component>
  <component>
    Roof
    <thing>Roof</thing>
  </component>
  <component>
    Floor
    <thing>Floor</thing>
  </component>
  <parent>ConstrainedSpace</parent>
</Room>
<Portal>
  <parent>Space</parent>
  <connects>ConstrainedSpace</connects>
</Portal>
<Doorway>
  <parent>Portal</parent>
  <component>Door</component>
</Doorway>
</Categories>              

Game Registry

<GameRegistry>
game = default = LocalFile = 111a
game = notDefault = LocalFile = 2borNot2b
game = notDefault = LocalFile = 2borNot2baa
game = notDefault = LocalFile = Islands in the sky
game = notDefault = LocalFile = Test3
game = notDefault = http://somewhereOutThere/gameData.dataFile = testing times
game = notDefault = LocalFile = xyzzy
</GameRegistry>              

22/11/99

 


See also: [Role Playing Games] [Game Engine]
© 1998, 1999 Brian Yap. These pages are available under the GNU licence.