Here is a temptative file format. It uses nesting.
# a special tag WorldForge Map Format 1.0
AMF 0.1
# the object category format will be specified later on
Object Category DB
# the object DB format will be specified later on
# I think it's important to have a unique id for each object
# it can be either a number or a unique name
Object DB
# starting the map definition, Group is a special tag
# anything between Group and { is refered to as the unique id
Group MapName {
Offset: X Y
Ground {
sizeX sizeY
defaultTile randomSeed
# to override the default add as many tiles as you want
# if you don't want a rectangular shape, add empty tiles
Tile: tileid dX dY
...
# then define the height of the center of every tile in the
# rectangle in row order
Height{
Z00 Z01 Z02 ...
Z10 Z11 Z22 ...
...
}
# or
Height {
Fixed dZ
}
}
Group Road{
Tile: tileid dX dY
...
}
Group House {
Offset: X Y
Ground {
sizeX sizeY
defaultTile randomSeed
}
Group Walls {
Object: objectid dX dY dZ
...
}
Group Kitchen {
Offset: X Y
Ground{
size X sizeY
defaultTile randomSeed
}
Group Table{
Object: tableid dX dY dZ
Group{
Object: objectid dX dY dZ
...
}
}
}
Explanations:
Group name {
Offset
...
}
: creates a group, inside the group every dX dY dZ
is an offset from the group's origin (0,0,0). A group can
be nameless
Ground { ... } : defines the ground tiles for a group, only a ground
tile can have a Z information. You can have height
information inside a ground region. Note that you can have
empty tiles to have non-rectangular areas.
Tile: tileid dX dY
a tile either goes on top of the ground or replaces a ground
tile. There is no Z as this information is given by the Height
information. The dX and dY in a tile is limited to tile
positions, i.e. 1M scale
Object: objectid dX dY dZ
An object is on top of the ground, so it needs the Z
information
In the first implementation I don't know if we'll be able to support
multiple ground regions. i.e.
+---+
| +----+
| +----+
+---+
>From the file format, it is implied that an objectid can refer to a
group of objects, a random seed is used to choose the actual value.
Future extensions could be of the form of small scripts, i.e.
Script Forest {
sizeX sizeY
Loop dX dY {
Place: treeid maxX maxY
}
}
where size(X,Y) is the size of the forest, dx dY is the number added
in X and Y after each loop iteration (i.e. same as a double for
loop) and maxX and maxY dictate the size of the rectangle in which the
tree can be randomly placed.
lavoie at zeus.genie.uottawa.ca
- Home
- -
- About
- -
- Introduction
- -
- FAQ
- -
- Team
- -
- Newbie Guide
- -
- Getting Started
- Editing Guide
- -
- Edit
- -
- Manage
- -
- New Page
- -
- Changes
- -
- Map
- -
- Password
- -
- Deprecation