-
Notifications
You must be signed in to change notification settings - Fork 48
Game Description File
This section is about the first file of VGDL. This file specifies how the game is played and all the interactions. The file describes games in a very concise manner, each game taking a few dozens of lines of plain text. The definition is divided into four sections.
- SpriteSet: Defines all available sprites for the game, including their parameters and display settings.
- TerminationSet: Specifies the end conditions of the game, indicating whether the player wins or not.
- InteractionSet: Specifies what events occur when two sprites of a given type collide in the game.
- LevelMapping: Defines relationships between characters, used in the level definitions, and the available sprites.
The following is a general format for the Game Description file.
BasicGame
SpriteSet
....
InteractionSet
....
TerminationSet
....
LevelMapping
....
The following is a general format for two player games for the Game Description file.
BasicGame no_players=2
SpriteSet
....
InteractionSet
....
TerminationSet
....
LevelMapping
....
The first line must include the number of players (if not specified, the default value of 1 is used instead).
The following examples will show different game description files for different games which will help to have an overview about writing these files.
BasicGame
SpriteSet
hole > Immovable color=DARKBLUE img=hole
avatar > MovingAvatar
box > Passive img=box
wall > Immovable img=wall
InteractionSet
avatar wall > stepBack
box avatar > bounceForward
box wall > undoAll
box box > undoAll
box hole > killSprite scoreChange=1
TerminationSet
SpriteCounter stype=box limit=0 win=True
LevelMapping
0 > hole
1 > box
A > avatar
w > wall
The above example is a simplified version of Sokoban game. The avatar tries to destroy all boxes by moving them over a hole.
BasicGame
SpriteSet
exit > Door img=exit
wall > Immovable img=wall
water > Immovable img=water
box > Passive img=box
avatar > MovingAvatar img=avatar
TerminationSet
SpriteCounter stype=door limit=0 win=True
SpriteCounter stype=avatar limit=0 win=False
InteractionSet
avatar wall > stepBack
box avatar > bounceForward
box wall > undoAll
wall box > undoAll
box box > undoAll
water box > killSprite
box water > killSprite
avatar water > killSprite
exit avatar > killSprite
LevelMapping
A > avatar
w > wall
x > water
b > box
e > exit
This is a game called WaterGame where your goal is to reach the exit without drowning in water. The path towards the exit is always blocked with water and it can be destroyed by pushing box over water.
-
GVG Framework
- Tracks Description
- Code Structure
- Creating Controllers
- Creating Multi Player Controllers
- Creating Level Generators
- Running & Testing Level Generators
- Creating Rule Generators
- Running & Testing Rule Generators
-
Forward Model and State Observation
- Advancing and copying the state
- Advancing and copying the state (2 Player)
- Querying the state of the game
- Querying the state of the game (2 Player)
- Information about the state of the Avatar
- Information about the state of the Avatar (2 Player)
- Information about events happened in the game
- Information about other sprites in the game
- Game Description Class
- Constraints
- Game Analyzer Class
- Level Analyzer Class
- Sprite Level Description Class
- Sprite, Termination, and Interaction Data Class
- Level Mapping Class
- Competition Specifications
- VGDL Language