New components introduced

IDE The IDE - how to write programs in Defold.
Atlas Atlas - how to store graphics files as memory efficient bitmaps.
Collection Collection - how to put game objects into the game.
Collision object Collision object - how to apply hit boxes to game objects.
Assets Folder - how to import graphics files into Defold.
Game object Game object - how to create things that move and react.
Input binding Key bindings - how to detect inputs.
Label Label - how to use fonts and put text on the screen.
Script Script - how to write Lua code to control game objects.
Sprite Sprite - how to attach bitmaps to game objects.
Sound Sound - how to use sound files and objects.

Pong | Step-by-step tutorial

Screenshot

The classic game for two players. Each player controls a paddle on each side of the screen. The object of the game is to hit the ball back to your opponent. You score a point if your opponent fails to hit the ball back to you.

This tutorial assumes you have not built a game using Defold before, but have some experience of programming.

What you learned in this tutorial

  1. The game.project file stores the settings for the game.
    The assets panel is just a handy file explorer. The outline panel actually holds the game objects in the IDE.
  2. Sprites are stored in an atlas which is a memory efficient binary store of the image data.
  3. A game is built from game objects (go's).
    A game object has components attached to it: sprites, scripts and collision objects.
  4. Inputs are bound to actions.
    Actions can be used in scripts to respond to inputs.
  5. Lua code called scripts are written in event functions using simple object-oriented techniques.
    Each game object has it's own script that determines it's attributes and methods.
  6. Collision objects are attached to game objects to give them hit boxes.
    Message passing allows objects to communicate with each other in response to collisions.
  7. On-screen text requires a label and font object.
  8. Sound effects are added to game objects by using sound objects.