-
Notifications
You must be signed in to change notification settings - Fork 48
Sprite, Termination, and Interaction Data Class
Raluca D. Gaina edited this page Feb 12, 2018
·
2 revisions
SpriteData class holds information about the in game sprites. The following table contains all the different data that can be accessed:
SpriteData Class | Description |
---|---|
String type | The type of the current sprite (refer to sprite types in VGDL section) |
String name | The name used for the current sprite |
ArrayList<String> sprites | Array of all sprite names that depends on this current sprite. For example in aliens, this is the definition of the avatar sprite: avatar > FlakAvatar stype=sam. This example shows that the sam sprite depends on the avatar sprite. |
boolean isAvatar | tells you if that sprite is an avatar sprite. |
boolean isNPC | tells you if that sprite is an NPC sprite. |
boolean isPortal | tells you if that sprite is a Portal sprite. |
boolean isResource | tells you if that sprite is Resource sprite. |
boolean isStatic | tells you if that sprite is Static sprite (not movable). |
boolean disabled | tells you if that sprite is disabled (avatars get disabled when they die). |
You can't have more than one true boolean variable but all of them can be false. Having all of them as false means its a Movable sprite but not NPC.
TerminationData class holds information about how the game should terminate. The following table describes the data holds inside the class:
TerminationData class | Description |
---|---|
String type | The type of the termination condition which any of the three termination conditions described here. |
ArrayList<String> sprites | Array of all sprites that are used in the termination condition checking. |
int limit | An integer number used in the comparison of the termination condition. |
String win | Check if this condition is a winning or losing condition. In multi player games, win states for all players must be specified, separated by a comma (e.g. win=True,False means that the first player wins, the second loses). |
InteractionData class holds information about the consequences of the collision between two game sprites. The following table describes all the data provided through the class:
InteractionData class | Description |
---|---|
String type | The type of the action happened to the first sprite due to the collision. The list of different actions can be found here. |
String scoreChange | The change in score due to this interaction. Zero means it doesn't affect score. In multi player games, score changes for all players must be specified, separated by a comma (e.g. scoreChange=3,-10 means that the first player gets +3 points, while the other loses 10). |
ArrayList<String> sprites | List of sprite names that are used in the current action type (for example spawnIfHasMore spawns a certain sprite if the avatar has more than or equal to a certain amount of resource). |
-
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