Building Android Games with Cocos2d-x

Learn to create engaging and spectacular games for Android using Cocos2d-x
Preview in Mapt

Building Android Games with Cocos2d-x

Raydelto Hernandez

Learn to create engaging and spectacular games for Android using Cocos2d-x
Mapt Subscription
FREE
$29.99/m after trial
eBook
$14.00
RRP $19.99
Save 29%
Print + eBook
$24.99
RRP $24.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$14.00
$24.99
$29.99 p/m after trial
RRP $19.99
RRP $24.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Building Android Games with Cocos2d-x Book Cover
Building Android Games with Cocos2d-x
$ 19.99
$ 14.00
Cocos2d-x by Example: Beginner's Guide - Second Edition Book Cover
Cocos2d-x by Example: Beginner's Guide - Second Edition
$ 35.99
$ 25.20
Buy 2 for $31.50
Save $24.48
Add to Cart

Book Details

ISBN 139781785283833
Paperback160 pages

Book Description

Cocos2d-x is a multi-platform C++ gaming framework in active development maintained by Chukong technologies. It wraps all the essential elements needed for creating a game, making the task of game building very developer-friendly.

Starting with a vital primer to get you up and running with your development environment, you will quickly dive in to exploring the latest version of this framework. You will understand major framework improvements to render objects at lightning speed, extend and maintain code easily, and improve the label API to add great functionality such as glow, shadows, and outlines to labels.

Through the creation of a real game, you will explore the core components of development including Physics, enabling you to create realistic sprite movements, and particle systems to dynamically simulate explosions, fire, rain, and smoke, as well as exploring the sound engine to make your game more robust. Finish by integrating Cocos2d-x C++ code with native Android code to launch games with the classic Java Android application.

Table of Contents

Chapter 1: Setting Up Your Development Environment
Cocos2d-x overview
Setting up Java
Setting up the Android SDK
Setting up the Android Native Development Kit
Setting up Apache Ant
Setting up Python
Setting up Cocos2d-x
Template code walk-through
Summary
Chapter 2: Graphics
Creating scenes
Pausing the game
Understanding nodes
Understanding sprites
Understanding actions
Animating sprites
Game menus
Putting everything together
Summary
Chapter 3: Understanding Game Physics
Setting up the physics world
Collision detection
Handling gravity
Putting everything together
Summary
Chapter 4: User Input
Understanding the Event Dispatcher mechanism
Handling the touch event
Handling accelerometer events
Keeping the screen alive
Handling the Android back key pressed event
Putting everything together
Summary
Chapter 5: Handling Text and Fonts
Creating TrueType font labels
Creating system fonts
Creating bitmap font labels
Putting everything together
Summary
Chapter 6: Audio
Playing background music and sound effects
Modifying audio properties
The new audio engine
Adding a mute button to our game
Putting everything together
Summary
Chapter 7: Creating Particle Systems
Creating collections of the Cocos2d-x objects
Adding particle systems to our game
Configuring the particle systems
Creating customized particle systems
Putting everything together
Summary
Chapter 8: Adding Native Java Code
Understanding the Cocos2d-x structure for the Android platform
Understanding the JNI capabilities
Adding Java code to the Cocos2d-x game
Adding ads to the game by inserting Java code
Configuring the environment
Modifying the Android manifest
Putting everything together
Summary

What You Will Learn

  • Set up your work environment
  • Learn how to create graphic elements and animate them
  • Use the built-in physics engine to make your games more realistic
  • Manage user interaction using the touch and accelerometer capabilities
  • Boost your game's visual appeal by learning to add text and using true type and bitmap fonts
  • Enhance your game by adding sound effects and background music
  • Discover how to add rich explosion effects using particle systems
  • Add native Java code to your Android game

Authors

Table of Contents

Chapter 1: Setting Up Your Development Environment
Cocos2d-x overview
Setting up Java
Setting up the Android SDK
Setting up the Android Native Development Kit
Setting up Apache Ant
Setting up Python
Setting up Cocos2d-x
Template code walk-through
Summary
Chapter 2: Graphics
Creating scenes
Pausing the game
Understanding nodes
Understanding sprites
Understanding actions
Animating sprites
Game menus
Putting everything together
Summary
Chapter 3: Understanding Game Physics
Setting up the physics world
Collision detection
Handling gravity
Putting everything together
Summary
Chapter 4: User Input
Understanding the Event Dispatcher mechanism
Handling the touch event
Handling accelerometer events
Keeping the screen alive
Handling the Android back key pressed event
Putting everything together
Summary
Chapter 5: Handling Text and Fonts
Creating TrueType font labels
Creating system fonts
Creating bitmap font labels
Putting everything together
Summary
Chapter 6: Audio
Playing background music and sound effects
Modifying audio properties
The new audio engine
Adding a mute button to our game
Putting everything together
Summary
Chapter 7: Creating Particle Systems
Creating collections of the Cocos2d-x objects
Adding particle systems to our game
Configuring the particle systems
Creating customized particle systems
Putting everything together
Summary
Chapter 8: Adding Native Java Code
Understanding the Cocos2d-x structure for the Android platform
Understanding the JNI capabilities
Adding Java code to the Cocos2d-x game
Adding ads to the game by inserting Java code
Configuring the environment
Modifying the Android manifest
Putting everything together
Summary

Book Details

ISBN 139781785283833
Paperback160 pages
Read More

Read More Reviews

Recommended for You

Cocos2d-x by Example: Beginner's Guide - Second Edition Book Cover
Cocos2d-x by Example: Beginner's Guide - Second Edition
$ 35.99
$ 25.20
Android: Game Programming Book Cover
Android: Game Programming
$ 69.99
$ 49.00
jQuery Game Development Essentials Book Cover
jQuery Game Development Essentials
$ 26.99
$ 18.90
SFML Game Development By Example Book Cover
SFML Game Development By Example
$ 39.99
$ 28.00
Mastering LibGDX Game Development Book Cover
Mastering LibGDX Game Development
$ 39.99
$ 28.00
Angular 2 Cookbook Book Cover
Angular 2 Cookbook
$ 39.99
$ 28.00