Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Handling multiple levels in dbpro

Author
Message
Unforgiven Hero
17
Years of Service
User Offline
Joined: 20th Nov 2008
Location:
Posted: 14th May 2010 03:22
As I examine DBpro, I cannot help wondering how you would go about handling multiple levels in your game. I understand you can handle one level all in your main loop, but how would you handle having a second level? Would you create a second main loop that deletes the current level and loads the second level?

Thanks for your insight in advance.
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 14th May 2010 04:15
YEs, you make a fuction when the first level is completed it is deleted and the next one is loaded.

If it hasn't exploded yet, I haven't touched it.
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 14th May 2010 06:02
You can split each level into its own loop, but it's far more efficient and much better practice to make a function that removes the old level and replaces it with the new one while using the same mechanics and stuff in the loop, as Madscientist suggested.

Unforgiven Hero
17
Years of Service
User Offline
Joined: 20th Nov 2008
Location:
Posted: 14th May 2010 21:52
ok tyvm!

Login to post a reply

Server time is: 2026-07-25 23:11:46
Your offset time is: 2026-07-25 23:11:46