Chapter 2. Cocos Invaders

In the previous chapter, we built a game with a Graphical User Interface (GUI) package called Tkinter. Since it is part of the Python's standard libraries, it was easy to set up the project and create the required widgets with a few lines of code. However, this kind of module falls short of providing the core functionality of game development beyond the 2D graphics.

The project covered in this chapter is developed with cocos2d. This framework has forks for different programming languages besides Python, such as C++, Objective-C, and JavaScript.

The game that we will develop is a variant of a classical game, Space Invaders. This arcade was a success of its time, and it has become part of the culture of video gaming.

In this ...

Get Python Game Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.