streuner-game/README.md
2014-04-29 15:35:32 +02:00

1.3 KiB

The How And Why

Third Party Libraries

This engine uses a few third party libraries which solve a great deal of problems:

Thanks to all the creators of these!

Characters

Each object defined in the 'character' layer of the map must have a character definition in the 'characters' folder. The file is named like the name of the object. For example an object named matty has a file 'characters/matty.lua'.

In this file all the other properties are defined.

And to clarify: a player is just a character with relevant keys attached to it.

Controllers

Defines the movement of a character. Each character has its own instance. It must implement at least the following functions:

  • sendKey(key)
    • send a keypress to the controller which then decides if it takes action
  • stopAnimation()
    • stops a running character animation

and the following properties:

  • charinfo
    • an instance of a character file
  • animation
    • the active animation

Apart from those the controller works how it sees fit.