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

Getting started with cocos2d


As with any other framework, cocos2d is composed of several modules and classes that implement different features. In order to develop applications with this API, we need to understand the following basic concepts:

  • Scene: Each of the stages of your application is a scene. While your game may have many scenes, only one is active at any given point in time. The transition between scenes defines your game's workflow.

  • Layer: Every sheet contained in a scene, whose overlay creates the final appearance of the scene, is called a layer. For instance, your game's main scene may have a background layer, an HUD layer with player information and scores, and an animation layer, where events and collisions between sprites are being processed.

  • Sprite: This is a 2D image that can be manipulated though cocos2d actions, such as move, scale, or rotate. In our games, sprites will represent the player's character, enemies, and visual information, such as the number of lives left...

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 €18.99/month. Cancel anytime