Chapter 4. Learn about Swipes through the making of Sokoban
Do you know the Sokoban game? It's a funny puzzle game featuring a player pushing crates to some designated places. Normally, on a computer, these kinds of games—called tile-based games—are controlled by arrow keys, but since our game has to be cross-platform, we will let the player control in-game movements using swipes.
The game we will build is very similar to an iOS game I made called BWBan. It's free; you can play it at http://bit.ly/1fUXP8c.
In the process of making this game, which we'll call Cocosban, you will learn about the following topics:
- How to detect swipes
- How to load graphic assets through a sprite sheet
- How to create 8-bit-like pixel games by playing with anti-aliasing
There's a lot to do, so let's start with the good old blueprint made in the first chapter and work on it.