This site requires JavaScript, please enable it in your browser!
Greenfoot back
iordanissav
iordanissav wrote ...

21 hours ago

World that acts as a stage selection (tiles)

iordanissav iordanissav

21 hours ago

#
Hi! I have created my main world object for my game and another world which displayes tiled images of all my game levels. What I want is, the main world to switch to the level picker world and after clicking a level's tile, switch back to the main world to display and of course play that level. Every level initialization is done in the main world, but i want to know the number of level selected in the level picker world. How is this done?
danpost danpost

17 hours ago

#
iordanissav wrote...
Hi! I have created my main world object for my game and another world which displayes tiled images of all my game levels. What I want is, the main world to switch to the level picker world and after clicking a level's tile, switch back to the main world to display and of course play that level. Every level initialization is done in the main world, but i want to know the number of level selected in the level picker world. How is this done?
Wouldn't it be easier to start in your level picker world? It can be used not only to keep track of progress through the levels, but also as a title screen, where starting the scenario (that is, when the user clicks on the "Run" button) prompts the tile showing (by using the "started" method WITH some condition that it is indeed the initial starting). I have a demo of a support class which behaves in this manner -- Super Level Support Class. Here is a thread of a discussion with a brief explanation of how to transfer to game worlds and return to the selection world. Well, the mechanism is the same, however, the starting point is just shifted down a world.
You need to login to post a reply.