-
Notifications
You must be signed in to change notification settings - Fork 48
Termination Conditions
This page shows the current supported termination conditions by the VGDL engine. The VGDL engine terminates the running game when any of the conditions is satisfied. The game is terminated with either a Win or Lose state. All terminations may specify whether (in 2+ player games), the win state at the end of the game should be determined by the score (using the count_score=True parameter).
Termination conditions are written in TerminationSet in the game description file. The list of conditions is checked sequentially (if multiple conditions are true, the first one will trigger) and it must be in the following format:
TerminationSet
Condition parameters win=True
Condition parameters win=False
Condition
is chosen from the following list. Condition parameters should be written afterwards then finally define if the condition is Win state or Lose state. This can be done by assigning the win parameter either to True
for winning or False
for losing. If the win property is not written, the engine assigns False
to it.
In multi player games, the win state of each player must be specified, separated by a comma, in the following format, for example, for 2 players (meaning first player loses, second wins):
TerminationSet
Condition parameters win=False,True
Description:
Level is terminated if the number of a certain sprite is less than or equal to a certain value.
Properties:
-
stype: The sprite name for the condition. It takes
string
values that correspond to a defined sprite (No default value). -
limit: The compared number. It takes
integer
values (Default value is0
).
Description:
Level is terminated if the number of a certain sprite is more than or equal to a certain value.
Properties:
-
stype: The sprite name for the condition. It takes
string
values that correspond to a defined sprite (No default value). -
limit: The compared number. It takes
integer
values (Default value is0
).
Description:
Level is terminated if the summation of three different sprites is equal to a certain value.
Description:
Level is terminated if the number of sprites of a certain type is equal to a certain value AND the number of different subtypes of the main type is equal to another value.
Properties:
-
stype1: The first sprite name for the condition. It takes
string
values that correspond to a defined sprite (Default value isnull
). -
stype2: The second sprite name for the condition. It takes
string
values that correspond to a defined sprite (Default value isnull
). -
stype3: The third sprite name for the condition. It takes
string
values that correspond to a defined sprite (Default value isnull
). -
limit: The compared number. It takes
integer
values (Default value is0
).
Description:
Level is NOT terminated if the summation of three different sprites is equal to a certain value (prevents any other terminations from triggering).
Properties:
-
stype1: The first sprite name for the condition. It takes
string
values that correspond to a defined sprite (Default value isnull
). -
stype2: The second sprite name for the condition. It takes
string
values that correspond to a defined sprite (Default value isnull
). -
stype3: The third sprite name for the condition. It takes
string
values that correspond to a defined sprite (Default value isnull
). -
limit: The compared number. It takes
integer
values (Default value is0
).
Description
Level is terminated if the game time is larger than or equal to a certain value.
Properties:
-
limit: the amount of time which the level terminates afterwards. It takes
integer
values (Default value is0
).
SpriteCounter stype=avatar limit=0 win=False
This termination condition states: the player will lose the level, if the number of avatar
sprite is less than or equal to 0 (No avatar
sprite in the level).
MultiSpriteCounter stype1=brokenegg stype2=egg limit=1 win=False
This termination condition states: the player will lose the level, if the number of brokenegg
and egg
is equal to 1 (either one of them on the level).
Timeout limit=1500 win=True
This termination condition states: the player will win the level, if he can survive for 1500 time ticks after the start of the game.
Timeout limit=1500 count_score=True
This termination condition states: the player with most points will win the level, if they can survive for 1500 time ticks after the start of the game.
-
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