Skip to content

Avatar Sprites

Raluca D. Gaina edited this page Feb 12, 2018 · 1 revision

Avatar is a special kind of Sprite. Avatar responds to the player input (Player can be human or a bot). There are several different types supported by VGDL engine.

List of Avatars:

MovingAvatar:

Description: This avatar supports player movement in four directions. This avatar moves directly without changing its orientation.

HorizontalAvatar:

Description: A special type of the MovingAvatar where it can only moves in the horizontal axis.

VerticalAvatar:

Description: A special type of the MovingAvatar where it can only moves in the vertical axis.

OngoingAvatar:

Description: A special type of the MovingAvatar where it continuously moves in a certain direction unless new action happens (e.g. PacMan).

OngoingTurningAvatar:

Description: A special type of the MovingAvatar where it continuously moves in a certain direction unless a new movement action perpendicular to the current direction is used. (e.g. Tron, 2 player game)

OngoingShootAvatar:

Description: A special type of the OngoingAvatar where the player can also shoot.

MissileAvatar:

Description: A special avatar which doesn't respond to any player input but it moves in a fixed certain direction.

OrientedAvatar:

Description: This avatar allows movement in all four direction but with orientation. For example: If player presses up and the player is facing down, the avatar will change its facing direction without moving.

ShootAvatar:

Description: A special type of OrientedAvatar that respond to Space key by spawning a new sprite.
Properties:

  • stype: The ShootAvatar spawn it every time the player pressed Space key (Default is null which doesn't spawn anything).
  • ammo: Its the name of the resource sprite the VGDL must check its value to enable shooting (Default is null which means infinite ammo).

FlakAvatar:

Description: A special type of ShootAvatar but with restriction on its movement (only horizontal movement allowed).
Properties:

  • stype: The ShootAvatar spawn it every time the player pressed Space key (Default is null which doesn't spawn anything).
  • ammo: Its the name of the resource sprite the VGDL must check its value to enable shooting (Default is null which means infinite ammo).
  • minAmmo: The minimum number of ammo the player should have to be able to shoot (Default value is 0).
  • ammoCost: How much each bullet cost for shooting (Default value is 1).

Examples:

avatar > MovingAvatar img=avatar

The player can move in any direction.

pacman > OngoingAvatar img=avatar

The player is always moving in a certain direction unless the other direction is pressed.

rogue  > ShootAvatar ammo=weapon stype=sword img=avatar

The player can move around in any direction and can shoot sword sprite in the direction its facing if weapon resource is > 0.

cannon > FlakAvatar stype=sam img=avatar

The player can move horizontally and shoot sam sprite.

Table of Contents:

Clone this wiki locally