Jul 6th, 2006, 6:13 PM
|
#33
|
|
Hobbyist Programmer
Join Date: Oct 2005
Location: Ohio
Posts: 177
Rep Power: 0 
|
I'm going to post a copy of the manual here so you guys can get a feel of what the level editor can do.
LEVEL EDITOR INSTRUCTION MANUAL
Table of Contents
-----------------
1. Introduction
2. Controls
3. File Formats
4. Notes
INTRODUCTION
The level editor is meant to be a tool to create and edit isometric levels in a simple and
quick manner. The editor is implemented in 400x300 canvas mode and allows levels of all sizes
but with a somewhat limited number of objects. However, this restriction is not that great as
levels can have quite a few objects. I personally use the level editor to create levels for
games even before I create the game. This gives me a chance to get a feel of how the game might
look like.
CONTROLS
Q: quit level editor
Z: scroll through background colors
X: scroll through object types
C: scroll through work layers
V: scroll through object properties
B: increment object property value
N: deincrement object property value
I: move selected object up
M: move selected object down
J: move selected object left
L: move selected object right
4: move cursor up
E: move cursor left
T: move cursor right
D: move cursor down
R: select object while cursor is over it
Insert: lay down object at cursor location
Delete: delete selected object
arrows: scroll through the level
Caps Lock: toggle level stats
comma: change music track
period: preview music track
FILE FORMATS
This level editor deals with four types of files: level files, catalog files, music tracks
file, and color files. The latter three files contain information relevent to the the editor
itself. The level editor will prompt you for the name of each type of file. You are expected to
have created the catalog file, color file, music tracks file, the music, and the graphics
associated with the level. Good format is necessary as it could cause serious problems, even
crashes!
Catalog Files
The catalog file contains information about each type of object. It consists of blocks where
each block contains information for one object. Each block is formatted as follows:
name of object
name of bitmap (BMP file)
number of properties (integer)
property name 1
.
.
.
property name n
initial property value 1 (integer)
.
.
.
initial property value n
type of object ("background object", "middle object", or "foreground object")
n corresponds to the number of properties so keep this consistent with that number. The name of
the bitmap is actually a file name. This should be a BMP file in true color format, preferably
24 bit. One last important thing is to terminate the catalog file with a newline.
Color Files
Color files are raw. This means that they consist of tripplets of red, green, and blue
intensities as integers. Color files should also be terminated with a newline. Here's an example
of how a color file is formatted:
red (integer)
green (integer)
blue (integer)
Try to keep each integer value in range (0 to 255). These are intensities, not colors.
Level Files
Even though the level editor creates these it is still important to know how they are formatted
because they can be used in games. I did not provide any library to help dealing with this. It
is your responsibility to deal with the data in the level file itself.
The first line of a level file is a number specifying the selected the background color for
the level. The next line following it is another line containing a number that specifies the
selected music track for the level. From there the rest of the file consists of blocks
describing each object in the level. Level files should be terminated with a newline. The format
of a block is shown below.
name of object
property value 1 (integer)
.
.
.
property value n
x coordinate
y coordinate
To determine the number of property values you can read all integers to the end of the file
and then use all but the last two as properties. The coordinates of the object are relative to
the level, not the screen. You'll have to deal with this yourself.
Level files should not be edited directly because you can screw up some things. There is also
an implied limit to the number of objects that can be present in the level but that number is
large.
Music Tracks Files
This type of file contain the names of midi files that are to be used in selection for the
level. The file terminates with a newline.
NOTES
- do not place too many objects in a level as it could slow down your game
- your level is saved every 5 minutes and when you exit the editor
|
|
|