How do I...?
As we developed the tutorials and learned Lua in the process we discovered a number of useful techniques. We kept them as a handy reference for future projects.
- Animate a character depending on the direction of movement.
- Countdown timer.
- Files: commands to read data from files.
- Fonts: how to display text on-screen, font files and creating a font.
- Interfaces: how to build multiple screens, maps and levels.
- Iterations: popping all items from a table.
- Objects: giving them a time to live.
- Objects: rotating sprites without using an animation set.
- Particle FX: render particles behind other game objects.
- Sounds: how to play sound effects and music.
- Tilemap collisions.
Command reference
A full list of commands from Defold.com