Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Game Programming By Example

You're reading from   Python Game Programming By Example A pragmatic guide for developing your own games with Python

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781785281532
Length 230 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

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 two-dimensional game, the player must defeat waves of descending aliens by shooting them with a laser cannon, which can be moved horizontally and is protected by some defense bunkers. The enemy fire attempts to destroy the player...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime