We need an engine!
While we could use standard views and image views to create our graphics and move them around the screen, this approach would be problematic in many aspects. The first one would be performance; even when it's empty, a View
is still a pretty heavyweight native component. Another aspect would be related to animation and visual effects. While Titanium provides us with functions to stretch, rotate, move, or even animate the images, such functions are not well-suited for high performance graphics.
Therefore, we will rely on a native game engine called quicktigame2d
. This engine will provide us with the functionality that we expect from a gaming engine.
It includes features such as:
Game view and scene management
Sprites and transformations
Animations
Maps
Particles
We will go over most of these items throughout this chapter, but for now, all we need to keep in mind is that the game engine is basically a native module. This will give us the ability to manipulate low-level graphics from...