New components introduced

Animation set Animation set - how to make flipbook animations.
Factory Factory - how to spawn multiple game objects at run-time.
Script Script - how to set motion paths, fade sprites, identifying the sender of a collision message and writing your own functions.

Incoming | Step-by-step tutorial

Screenshot

The Oort cloud has been disrupted by a passing interstellar planet. It's gravitational influence has thrown comets towards the inner solar system. Save the earth from an extinction level event by knocking out the incoming comets!

This tutorial assumes you already know how to start a new Defold project, are familiar with the IDE, and can build game objects, applying scripts to them. If you have not used Defold before, you should start with the Pong tutorial.

What you learned in this tutorial

  1. Animation sets allow you to create flipbook animations by cycling through a number of sprites continually in an atlas.
  2. A factory allows you to dynamically spawn game objects at run-time.
  3. Vectors allow you to set a pre-determined motion path for a game object without having to manually update it's position in an update method.
  4. Input bindings allow you to get inputs from the mouse and with the on_input method and action variable you can determine its position on the screen when a button is pressed.
  5. Simple animations such as fading and rotating an object can be done with a single line of code.
  6. User-defined functions allow you to add more methods to game objects, create reusable program components and structure your solution.