Module GlobalConstants

Globally visible constants of engine.
To use them you don't need use module name.

GAME_ENGINE Game engine identifier.
PGE_ENGINE_VER Version of PGE Engine.

Generator algorithms

GENERATOR_WARP "Warp" spawn algorithm.
GENERATOR_PROJECTILE "Projectile shoot" spawn algorithm.

Algorithm of object spawn

SPAWN_LEFT Spawn object into left direction.
SPAWN_RIGHT Spawn object into right direction.
SPAWN_UP Spawn object in up direction.
SPAWN_DOWN Spawn object into down direction.

Reason of NPC damage

NPC_DAMAGE_NOREASON No reason of damage
NPC_DAMAGE_STOMPED NPC was stomped by player or by heavy object
NPC_DAMAGE_BY_KICK NPC got a kick attack
NPC_DAMAGE_BY_KICK NPC attacked by player's beat
NPC_DAMAGE_TAKEN NPC is a takable object which was taken (for example, coin, power-up, equipment, weapon, etc.)
NPC_DAMAGE_CUSTOM_REASON Custom damage reason.

Direction of NPC appearence from the warp

NPC_WARP_TOP NPC is warping up
NPC_WARP_LEFT NPC is warping left
NPC_WARP_BOTTOM NPC is warping down
NPC_WARP_RIGHT NPC is warping right

Key codes of player controller

KEY_START A "Start" key
KEY_DROP "Drop" or "Select" key
KEY_JUMP "Jump" key
KEY_RUN "Run" key
KEY_ALT_RUN "Alt-Run" key
KEY_ALT_JUMP "Alt-Jump" key
KEY_LEFT "Left" key
KEY_RIGHT "Right" key
KEY_UP "Up" key
KEY_DOWN "Down" key
KEY_STR "Drop" key, [Alias for LunaLua compatibility]
KEY_SEL "Drop" key, [Alias for LunaLua compatibility]
KEY_SPINJUMP "Alt-Jump" key, [Alias for LunaLua compatibility]
KEY_X "Alt-Run" key, [Alias for LunaLua compatibility]


GAME_ENGINE
Game engine identifier. Can be used to detect PGE Engine ("PGE_Engine") or LunaLua ("LunaLua").
  • GAME_ENGINE "PGE Engine"
PGE_ENGINE_VER
Version of PGE Engine. Version is stored in next format:
X.Y.Z.P
  • X - major version
  • Y - minor version
  • Z and P - patches of various level
      • PGE_ENGINE_VER "X.Y.Z.P"

Generator algorithms

GENERATOR_WARP
"Warp" spawn algorithm.
  • GENERATOR_WARP 1
GENERATOR_PROJECTILE
"Projectile shoot" spawn algorithm.
  • GENERATOR_PROJECTILE 2

Algorithm of object spawn

SPAWN_LEFT
Spawn object into left direction.
  • SPAWN_LEFT 2
SPAWN_RIGHT
Spawn object into right direction.
  • SPAWN_RIGHT 4
SPAWN_UP
Spawn object in up direction.
  • SPAWN_UP 1
SPAWN_DOWN
Spawn object into down direction.
  • SPAWN_DOWN 3

Reason of NPC damage

NPC_DAMAGE_NOREASON
No reason of damage
  • NPC_DAMAGE_NOREASON 0
NPC_DAMAGE_STOMPED
NPC was stomped by player or by heavy object
  • NPC_DAMAGE_STOMPED 1
NPC_DAMAGE_BY_KICK
NPC got a kick attack
  • NPC_DAMAGE_BY_KICK 2
NPC_DAMAGE_BY_KICK
NPC attacked by player's beat
  • NPC_DAMAGE_BY_KICK 3
NPC_DAMAGE_TAKEN
NPC is a takable object which was taken (for example, coin, power-up, equipment, weapon, etc.)
  • NPC_DAMAGE_TAKEN 4
NPC_DAMAGE_CUSTOM_REASON
Custom damage reason. Engine doesn't uses any reasons past of this constant.
  • NPC_DAMAGE_CUSTOM_REASON 5

Direction of NPC appearence from the warp

NPC_WARP_TOP
NPC is warping up
  • NPC_WARP_TOP 1
NPC_WARP_LEFT
NPC is warping left
  • NPC_WARP_LEFT 2
NPC_WARP_BOTTOM
NPC is warping down
  • NPC_WARP_BOTTOM 3
NPC_WARP_RIGHT
NPC is warping right
  • NPC_WARP_RIGHT 4

Key codes of player controller

KEY_START
A "Start" key
  • KEY_START 0
KEY_DROP
"Drop" or "Select" key
  • KEY_DROP 1
KEY_JUMP
"Jump" key
  • KEY_JUMP 7
KEY_RUN
"Run" key
  • KEY_RUN 6
KEY_ALT_RUN
"Alt-Run" key
  • KEY_ALT_RUN 8
KEY_ALT_JUMP
"Alt-Jump" key
  • KEY_ALT_JUMP 9
KEY_LEFT
"Left" key
  • KEY_LEFT 2
KEY_RIGHT
"Right" key
  • KEY_RIGHT 3
KEY_UP
"Up" key
  • KEY_UP 4
KEY_DOWN
"Down" key
  • KEY_DOWN 5
KEY_STR
"Drop" key, [Alias for LunaLua compatibility]
KEY_SEL
"Drop" key, [Alias for LunaLua compatibility]
KEY_SPINJUMP
"Alt-Jump" key, [Alias for LunaLua compatibility]
KEY_X
"Alt-Run" key, [Alias for LunaLua compatibility]
generated by LDoc 1.4.6 Last updated 2017-08-21 02:20:32