-
Notifications
You must be signed in to change notification settings - Fork 48
Common Sprite Properties
Raluca D. Gaina edited this page Feb 12, 2018
·
1 revision
All sprites in VGDL have some common properties. These properties can be altered to change the behavior or the look of the sprite. In the rest of the document we divide the properties according to its usage (Note: not all properties work with all Sprite Types, for example: speed=1
doesn't affect sprites of type Immovable
).
-
shrinkfactor: Scale the sprite size. It can take any
float
value, for example:shrinkfactor=0.5
decrease the sprite size into half, whileshrinkfactor=2
increase the sprite size into double (Default value is1
). -
invisble: Render the sprite as invisible. It can take either
True
orFalse
(Default value isTrue
). -
hidden: Does not pass the sprite to the agents in state observations. It can take either
True
orFalse
(Default value isFalse
). -
img: The image file name which represent the sprite. It can take any
string
value that correspond to a certain image file found insprites
folder (Default isnull
). -
color: If img property is
null
, VGDL will represent the sprite as a colored square. It can take any of thecolor
values (Default is pick random color for each sprite).
-
singleton: Only one instance of the sprite can exist in the game. It can take either
True
orFalse
(Default value isFalse
).
-
cooldown: Slow down the update rate of the sprite. It can take any
integer
value (Default is 1 which means the sprite is updated every time tick). -
speed: The size of the step the sprite is moving with it in Blocks. It can take any
float
value (Default is 0 which means the sprite doesn't move).
-
orientation: The direction the object is pointing towards. It can take any
direction
value (Default value isNONE
). -
rotateInPlace: If the sprite can rotate without changing its position. It can take either
True
orFalse
(Default value isTrue
).
bullet > Missile speed=0.5 orientation=DOWN img=bullet
Define bullet
sprite of type Missile
which moves down with 0.5 block every time tick and is rendered as sprites\bullet.png
file.
cannon > Passive invisible=True
Define cannon
sprite of type Passive
which is not rendered on screen.
randomEnemy > RandomNPC cooldown=5 img=bee
Define randomEnemy
sprite of type RandomNPC
which updates itself every 5 time ticks and is rendered as sprites\bee.png
file.
-
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