Situation:
The game I am working on is nearly complete. Presently it sits on my hard drive as about a dozen seperate pieces, all that remains to be done is to assemble them into the full game.
Information:
The game itself progresses in a linear difficulty pattern like an arcade game so level 1 always comes first, then 2, then 3, etc. until the player runs out of lives. Then the game runs a high score routine and returns to the main menu.
Each of my levels is saved as a seperate .dba file. While a lot of code is repeated, I found it easier to manage the differences in levels by coding them each seperately.
The Challenge:
At this moment the main .dba file is the opening menu screen What I'm trying to wrap my head around is how to call each of the sub levels from within my main loop.
Once the player beats the first level I'm required to exit the level_1() function and come back to the main menu .dba (without actually loading up the menu itself). From there I have to load level_2 seamlessly.
Also once gameplay is completed I need to reload all of my menu graphics and sounds (which were dumped at to make room for the levels being loaded) so the player can exit or play again.
Help?
I guess what I'm asking is if anyone here has had experience with building games that use multiple levels and what techniques you think are best to accomplish this in Dark Basic.
Bear in mind that this isn't the same level being played over and over at higher difficulties. Each level needs to be loaded seperately and all the graphics discarded before loading the next one.
Any ideas or information you guys have to offer would be really helpful. My game is still in easy to manage chunks so it should be flexible to any ideas you come up with. Thanks for the help!