Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Cocos2d-X Game Development Blueprints

You're reading from   Cocos2d-X Game Development Blueprints Build a plethora of games for various genres using one of the most powerful game engines, Cocos2d-x

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher Packt
ISBN-13 9781783985265
Length 392 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
 Sequeira Sequeira
Author Profile Icon Sequeira
Sequeira
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Cocos2d-x Game Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. A Colorful Start FREE CHAPTER 2. How to Fly a Dragon! 3. Not Just a Space Game 4. Back to the Drawing Board 5. Let's Get Physical! 6. Creativity with Textures 7. Old is Gold! 8. Box2D Meets RUBE 9. The Two Towers 10. Cross-platform Building Index

Adding progression and difficulty levels


By now, we have a fully functioning game but we still haven't ensured the game is challenging and addictive for the user. We must engage the player by increasing the intensity and difficulty of the game progressively. In our previous game, we had the option of designing levels that get more difficult, but this game isn't level based and is different every time.

With that in mind, a bit of spice is added by creating a variety of formations in which the enemies will spawn on screen. These formations will be increasingly difficult with the difficulty completely based on how long the user has managed to survive. We define a few enums and constants in GameGlobals.h before writing the functions that will add progression to our game:

enum ESkillTimer
{
  E_SKILL1 = 10,
  E_SKILL2 = 30,
  E_SKILL3 = 45,
  E_SKILL4 = 60,
  E_SKILL5 = 90,
  E_SKILL6 = 120,
};

First up, we have an enum called ESkillTimer that represents the skill level in terms of the number of...

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 $15.99/month. Cancel anytime
Visually different images