Jump to content
  • Advertisement
Sign in to follow this  
Barkanaxen

Different pages or levels

This topic is 3947 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well in gamemaker there was a thing that made a new room for u. But in any type of coding. for me blitzz3d , how would i do that? make like a start page with new game and load game buttons then when u click those it takes u to a new game or whatever or going to different levels. I dont get it? Thank you

Share this post


Link to post
Share on other sites
Advertisement
I don't know Blitzz3D in details, but in general those things can be done in like a zillion different ways.
So maybe you should research the topic a bit more to get an estimate of your requirements?
GameDev contains a lot of topics and articles on those subjects - just search.

Share this post


Link to post
Share on other sites
a fairly simple implementation of your idea:


class Level{
public:
Level(leveldescriptor LD);

// if you're using an update/draw paradigm:
bool update(float TimeStep);
void draw();
private:
// level data goes here
container<gameObject> GameObjects
container<levelGeometry> LevelGeometry

// etc...
};


so in your main loop, you have a root scene of some kind where the option to load a level or start a game is provided:


Level * activelevel;

mainloop(){
while(1){
float t = getTimeStep();
if(activelevel){
activelevel->update(t);
activelevel->draw();
}else{
main_menu();
}
}
}


This is a highly trivialized version, after you've implemented something like this you'll probably want to expand it to make every scene a node in a DFA such that the scenes can jump to and from each other and the main loop just facilitates that behavior.

Once you have that down start thinking about a paradigm that supports multi-threaded execution.

Share this post


Link to post
Share on other sites
Hmm thats really a lot more complicated than i can comprehend. I assume i would be able to just use labels and the goto function as different loops. Im pretty sure it will work if not. I will pm you or something

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!