I am building a game with multiple levels. My question is how to code a game to unlock the next level if a certain amound of points has been accomplished. For example you need to get 3000 points to unlock the next level. [import]uid: 181172 topic_id: 31490 reply_id: 331490[/import]
this is a common task and i can think of dozens of ways to accomplish this.
to give you tips we must know some basic points about your game.
first question: do you use a scene manager like storyboard or director?
[import]uid: 70635 topic_id: 31490 reply_id: 125813[/import]
Here’s something I wrote that talks about that problem and things to think about when solving it:
http://gamedevnation.com/game-development/lockunlock-levels/
In a nutshell, keep a table (or something) that contains flags (true/false) showing whether a given level has been unlocked or not. To unlock the next level, just change the “locked” flag to “unlocked.”
Jay
[import]uid: 9440 topic_id: 31490 reply_id: 125818[/import]
Thanks guys. Well basically i am building a whack a mole type of game. It has a timer of 2:00 that counts down. You need a certain amount of points to unlock the next level. For example 2000 points is required to unlock the next level. [import]uid: 181172 topic_id: 31490 reply_id: 125850[/import]
Im also using the director class [import]uid: 181172 topic_id: 31490 reply_id: 125851[/import]
this is a common task and i can think of dozens of ways to accomplish this.
to give you tips we must know some basic points about your game.
first question: do you use a scene manager like storyboard or director?
[import]uid: 70635 topic_id: 31490 reply_id: 125813[/import]
Here’s something I wrote that talks about that problem and things to think about when solving it:
http://gamedevnation.com/game-development/lockunlock-levels/
In a nutshell, keep a table (or something) that contains flags (true/false) showing whether a given level has been unlocked or not. To unlock the next level, just change the “locked” flag to “unlocked.”
Jay
[import]uid: 9440 topic_id: 31490 reply_id: 125818[/import]
Thanks guys. Well basically i am building a whack a mole type of game. It has a timer of 2:00 that counts down. You need a certain amount of points to unlock the next level. For example 2000 points is required to unlock the next level. [import]uid: 181172 topic_id: 31490 reply_id: 125850[/import]
Im also using the director class [import]uid: 181172 topic_id: 31490 reply_id: 125851[/import]