After completion of a Level, How to Unlock Next level

I’ve done some searches, I’ve found several threads on it…but I’m stuck…I’m using the Director Class and the beebe games class with each level its separate lua file, level1.lua, etc…

but I’m not entirely sure how to setup the code to unlock the next level after the previous has been completed.

any help will be greatly appreciated.

I’ve used this thread as a reference

http://developer.anscamobile.com/forum/2011/02/02/how-can-i-easily-implement-save-and-load-system-0

but, like I said…I don’t know how to go about setting it up.

Thanks [import]uid: 14940 topic_id: 6799 reply_id: 306799[/import]

anyone? =[[import]uid: 14940 topic_id: 6799 reply_id: 23956[/import]

Please? this is the only thing holding me back from the completion of my app…any help would be greatly appreciated. [import]uid: 14940 topic_id: 6799 reply_id: 24143[/import]

if you’re unlocking them in a linear numerical order then just store a single number in a field in your SQLite db. either the latest level complete, or the next available level.

when you go to your main screen check this value from the db and enable the user to select any level up to that point. [import]uid: 6645 topic_id: 6799 reply_id: 24148[/import]

I’m not sure I know what you mean, can you provide an example please.

Thanks. [import]uid: 14940 topic_id: 6799 reply_id: 24149[/import]

read up on this
http://developer.anscamobile.com/content/data-storage

in fact the problem you are referring to is discussed at length in the original thread you posted
[import]uid: 6645 topic_id: 6799 reply_id: 24154[/import]

I actually figured it out.
Thanks for the help. [import]uid: 14940 topic_id: 6799 reply_id: 24159[/import]

If anybody is still looking for an easy way to unlock levels, there´s this great class developed by Peach Pellen called “EGO”. It´s as simple as eating cheese cacke.

You can find a tutorial here: http://corona.techority.com/2012/01/22/easy-level-unlocking-with-ego/

Greets,

Jan [import]uid: 126207 topic_id: 6799 reply_id: 120840[/import]

I use this for level unlocking
http://developer.coronalabs.com/code/super-simple-lua-table-save-and-load-file-functions

probably the same idea like “EGO”.
Find what works best for you. [import]uid: 98393 topic_id: 6799 reply_id: 120847[/import]

Here’s another one I use called “Ice”. I use it for my level locking.
http://grahamranson.co.uk/lib.php?id=6 [import]uid: 75779 topic_id: 6799 reply_id: 120864[/import]

The idea is quite simple. You have a table with true/false entries for each level. Start out with level one unlocked. Since you’re using director, it would probably be best as a global so that each level can access it.

  
\_G.levelLocked = { false, true, true, true, true, true} -- 6 levels in this sample  
  

When you show your level select screen, you can look at those values to determine if you need to show the level is locked or not. Level 1 finishes and you’re read to goto level 2? Simply:

  
\_G.levelLocked[2] = false  
  

Now of course you will want to save this to a file or database at some point. Plenty of the above posts will point you to ways to do that, like ICE or my Super Simple table saver.

[import]uid: 19626 topic_id: 6799 reply_id: 120870[/import]

If anybody is still looking for an easy way to unlock levels, there´s this great class developed by Peach Pellen called “EGO”. It´s as simple as eating cheese cacke.

You can find a tutorial here: http://corona.techority.com/2012/01/22/easy-level-unlocking-with-ego/

Greets,

Jan [import]uid: 126207 topic_id: 6799 reply_id: 120840[/import]

I use this for level unlocking
http://developer.coronalabs.com/code/super-simple-lua-table-save-and-load-file-functions

probably the same idea like “EGO”.
Find what works best for you. [import]uid: 98393 topic_id: 6799 reply_id: 120847[/import]

Here’s another one I use called “Ice”. I use it for my level locking.
http://grahamranson.co.uk/lib.php?id=6 [import]uid: 75779 topic_id: 6799 reply_id: 120864[/import]

The idea is quite simple. You have a table with true/false entries for each level. Start out with level one unlocked. Since you’re using director, it would probably be best as a global so that each level can access it.

  
\_G.levelLocked = { false, true, true, true, true, true} -- 6 levels in this sample  
  

When you show your level select screen, you can look at those values to determine if you need to show the level is locked or not. Level 1 finishes and you’re read to goto level 2? Simply:

  
\_G.levelLocked[2] = false  
  

Now of course you will want to save this to a file or database at some point. Plenty of the above posts will point you to ways to do that, like ICE or my Super Simple table saver.

[import]uid: 19626 topic_id: 6799 reply_id: 120870[/import]