Skip to main content
gamedev.net
🔒 Locked

Design document: level structure

Started by aftermath May 23, 2003 at 12:52 AM 2 replies 1.4k views
Original Post
aftermath
aftermath
Hi everyone! I am currently designing some hybrids on the structure for he level file for a game. Could you please read the design document and post your thought on it? What would you change? What would you add?
Rate me up.
irbrian
irbrian
Looks good so far; however, I would include an explanation of how your XML level file relates to the visual representation of the level that players will see. For instance, are you meaning to somehow store the shape of a 3D level/map in XML format? Or are you going to store the actual 3D level content seperately, and use the XML as a sort of pointer or index for the game? You should answer these questions and explain (on a basic level) the interaction between the level file and the level itself.

****************************************

Brian Lacy
ForeverDream Studios

Comments? Questions? Curious?
brian@foreverdreamstudios.com

"I create. Therefore I am."
---------------------------Brian Lacy"I create. Therefore I am."
aftermath
aftermath
Okay, I updated the file to have a better description of object location.

Come on people, I need your opinions! Without you, this thread is just going to get lost and never looked at.

Pleas, my job relies on you! (ok, that last part was made up)
Rate me up.
Panzooka
Panzooka
i will do it this way

  XYZZY Level File Design
By AfTeRmAtH

Table of content
versions............1
overview............2
level positioning...2
objects.............3
path................3
object collation....4


Versions

version 1.0
added overview section
added level positioning setion
added blah blah blah

version 1.1
updated object location

Overview
XYZZY is a 2D space shoot¡¯em¡¯up featuring good graphics and sound. The game is extremely configurable via INI files.

The level will use XML as the data format. All entities inside the level are referred to as an ¡®object¡¯ inside the XML file. The XML file does not have any actual data in it. It merely describes how to place objects, where to place them, and how they interact. The game loads this XML file into structure, and every frame checks to see if anything new needs to be added or changed.

Level positioning
The level will use the Cartesian coordinate system. The level has a static width that will always be equal to the set display mode. The level has to have a height of the screen height or larger. The levels 0,0 coordinates are located at the lower left corner. When the game runs, it tracks how many pixels it has traveled ¡®up¡¯ the playing field (initially, this variable will be set to the screen height, for the game tracks from the top edge of the screen).

Objects
Objects will make up the basis of the level ¨C they can be interactive or non-interactive with the player. An object will have an X and Y position that is initially specified in the XML file; the position can change if the object is of the moving type. For example:

If an objects location is 0,0 (X,Y), then it is located at the lower left hand corner of the level when it is initially started. If the location is 100,1934 (X,Y), then it will appear when the game scrolls to the 1934 pixel of the playing field. There are two types of objects that can be implemented in a level:

Standard
These objects are global inside the game. They are loaded when the game starts.
These are things like:
Power-ups
Weapons
Pick-ups
Generic comets
Generic enemies
Generic level decoration items
Level-specific
These can not have logic, for the only implementations for them exists in the XML file. This might change, but for now, there is not a very good way to implement logic inside the XML file. Although, there can be pre-defined logic that can be set in the XML file (with attributes) and implemented in the game; this sounds good, but there is not a lot of dynamic object behavior with this alternative. There is a slight possibility that a scripting language will be used for this ¨C if needed. If a scripting language is used, it will most likely be something simple like Lua.
Help me!
Paths
Every object can have paths to follow. There are several types of paths:

Sin and Cosine with a specified bias (the range of the functions output).
Random, but smooth. A basic Bezier curve will be created with random waypoints on the screen.
Waypoints. A set of coordinates will be given in the level file that the object will follow at a specified speed.
Waypoint, but smooth. A set of coordinates will be given in the level file. A Bezier curve is created with these waypoints and assigned to the object to follow at a specified speed.
None. The object will remain stationary on the level.
Object Collation
An object can collide. It can be collide with different types of other entities:

A player. Depending on the parameters, the player dies or he is awarded bonus points (can be zero).
There are extra options to change the players:
Health
Weapon
Armor
A bullet from a weapon. Depending on the parameter, the object is destroyed. In the case that it is destroyed, there is an option to award the player a specified amount of bonus points ¨C only if the player is the parent of the bullet.


bascly, add version history, so u know what u changed and possibliy change back.
also table of content and link them, for better viewing when ur desigh doc goes large.

[edited by - panzooka on May 23, 2003 11:54:38 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.