Analytical Perspectives in Game Design
Data Files
Home ] Up ]


 

2b or not 2b
Data Files Tutorial

A set of data files is used to define the world. There is a set of one or more data files that describes each aspect of the world.

  • Data files are used to allow the author to create the world without need to have any software other than a simple text editor. To allow for internationalisation both the ASCII format or unicode formats are supported.
  • Data files are built so that they can be extended without modifying any of the original files except the header files.
  • To speed processing, important data files may be cached in memory.
  • Data files can be stored remotely or locally. The system can fetch the latest version of a data file if so specified.

CC Model

This section shows the object model components that relate to data files.

Creating Data Files

This section describes how you create data files, either from scratch or as an extension to some existing data files. If you are new you should read the data file formats section first.

A key item in the data files is the include tag. This tag allows you to create a list of files that should be included at the point of the tag.

The general format is :<include files>[file name list]</include>

A [file name list] can be:

  • A single line containing the name of one file.
  • A list of files separated by commas.
  • A list of files where each file is on a separate line (that is separated by </P> or <B> tags).

Data File Formats

This section describes the general structure of data files and has linkages on the individual formats.

There is a hierarchy of data files that consists of header files and data files. Though the system will generally load the data as required. This hierarchy is set up so that an author can extend the work of another author without modifying the data files originally supplied, except the header files.

file naming

The file naming convention used is as follows:

[game name].[file format]                                   

Game name is the name of the game as supplied by the player in the join game dialog.

It is not necessary to use this convention. All the data could be placed in one file!

There are 2 versions of the file formats. The first is the ASCII format. The second is in the unicode format. These extensions are ASCII and unicode respectively.

File format

The format of the inputfile can be either a straight text format, or a HTML markup format.

Text format

To create the text format, just use the formats described in the file content section.

HTML markup format

The HTML markup format allows the same data as the text format to be created, but in a user readable HTML format. Effectively this generates documentation at the same time as generating the source data files.

Any section definition shall start with a tag. The tag shall be any heading level.

Any content of the tag in shall either be in the formatted format or heading format.

All other formats will be treated as comments and ignored by the parser.

Category: Physical thing

Represents a real thing in this world.

instance of Thing.

Characteristic: life time model

The life time model is a reference to a model for the likely failure of the thing. There are 2 general models here. The first is a failure percentage cuve the second is a number of uses model.

type is state-machine
state-machine is life time model 1

Capability: hit

Default World Data Files

This section describes the default world files supplied with the software package.

This file describes the default world provided with numb.bat.

<Category>

<Include>

default_world_categories.html

<Capability>

<Include>

default_world_capabilities.html

<Characteristic>

<Include>

characteristic_author.html

<Commands>

<Include>

 

<State Machines>

<Include>

 

<Thing>

<Include>

Scenarios

This section links into the data file related scenarios.

Game Level

 

Framework Level

Object Level

Tutorial

This section is a tutorial on the simple world 2b or not 2b, a world with 1 player, 2 rooms and a door.

Using Data Files

This section describes how to use data files to achieve a good world design.

22/11/99

 


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