filmation.xsd.
This file is the XML definition file. It describes the
format the XML file should take and can be used to ensure the XML
file is valid. While not required to view the file, it can be used
to help XML applications to better render/understand the XML file.
filmation.xslt. This file is a sample XML stylesheet.
It allows XML viewers (e.g. web browsers) to display the XML file
in a HTML format (bullet points, tables, etc). If not required or
it does funny things with your view, simply remove the second line
of the XML file that references this file.
XML files. This may be the most useful file format.
There are two sections. <rooms> contains
the actual room data and describes the layout of each room. <template>
contains the actual descriptions for the rooms. For example,
there is an element called roomsize for each room,
which is normally 0,1,2. If you find equivalent element in the template
section you will find out more information, such as the number of
cells, etc.
Use a tool such as XML Spy with the xsd file to see the actual
details of the file.
The main elements for the room objects are <specials>
(these are where the special items, e.g. runes in Pentagram, cauldron
items in Knight Lore, plug things in Alien 8) may be located. You
need to refer to this site to find out the algorithm for actually
determining what subset of these rooms get an object.) and <rooms>.
There is one room element for every room in the game. the contents
of the room are as follows:
- roomid. the id of the game, also used to determine its location
in Knight Lore and Alien 8 if you do not make use of the links
section
- size. the size of the room. cross-reference the templates section
- links. what rooms are adjacent in all directions. a handy way
of knowing without having to calculate it using the roomid. Room
links of -1 mean no link in that direction
- backgrounds. what backgrounds (walls, doors, etc) are in this
room. Use the id supplied and cross-reference the templates section
for the actual background description and details.
- roomblock. what actual room objects are placed (e.g. blocks,
tables). The location is stored here. cross-reference the templates
section (with the objecttypeid) to find the actual block details
The template section contains the actual details
referenced by the rooms elements. The elements here are:
- roomsizes. contains the details for the room sizes. roomtype
here corresponds to size in the room
description.
- backgroundtypes. contains descriptions for the background items.
id here corresponds to backgroundobject
in the room description. bgtype can
be either DOOR, Z, FREE, WALL. Most will either be DOOR or WALL.
Knight Lore for some reason uses the cauldron/wizard as a background
item, hence the need for FREE (can move anywhere) and Z (may only
move in Z axis). Simply make these normal objects if you are planning
on making a game yourself. causesexit tells you
whether colliding with this item (usually a door) will change
rooms.
- blocks. describes the actual blocks in the game. id
here corresponds to objecttypeid in the room
description. movementtype is either Z or FREE.
This is mainly for optimising an isometric engine. Z means the
object moves only in the Z (i.e. up/down) and FREE means any direction.
Obviously it doesn't have to move in these directions, e.g. most
static blocks are classed as Z. Refer to the main site for further
details. extra contains hints on the objects
purpose
Most elements can have a hint section. This should
be read.
So, if your purpose is to use the XML for generating your own game
you should:
- read in the template section to populate your data values and
convert any background items into main blocks if required (cauldron/wizard)
- create your blocks using the room details, remembering that
some locations are in cells and some are in pixels
- create the special items according to the algorithms described.
- link the blocks to your actual sprites/animation
- create the player
Follow the tutorial for an example of how a game is started using
the data produced by the viewer.
|