In this chapter, we built a playable replica of the 2048 game. We also showcased a number of implementation details that can be reused in other similar projects:
Creating a scalable board that fits the screen in any resolution and orientation
Putting together custom tiles, and implementing smooth movement for those with the help of Kivy's
Animation
APIMapping player's controls to both touch screen gestures and keyboard arrow keys at the same time, to account for any control scheme the user might expect from the game
The Kivy framework supports game development nicely; in particular, canvas rendering and support for animations can be very useful when building video games. Prototyping in Kivy is also feasible, albeit somewhat harder to do than in JavaScript (a modern browser is a very powerful platform, and it's especially hard to beat when it comes to cheap prototyping).
The resulting Python program is also inherently cross-platform unless you're using an OS-specific API in a way that...