• Advertisement

Archived

This topic is now archived and is closed to further replies.

Loading different parts of the game..?

This topic is 5839 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

Alrighty, I''m pretty much going to step into my first attempt at a simple 2D engine, but I''m confused about something. How should I structure the code? Like, should I have a function that loads in, say, level 1, and then after level 1 has been completed, use the function to load level 2 in? I find it difficult to ask what I''m trying to find out. Should I have a function that loads in the title screen, a function that loads the first level until the second level is reached, where another function will be called to load in the second level? Can anyone please steer me in the right direction? Thanks a lot!

Share this post


Link to post
Share on other sites
Advertisement
Hello,
One thing when writing an engine, you need to keep very general. One thing I would like to know is what language you are writing in? If C++ you can do something like create a function LoadLevel(Level *pLevel);
What this does is take in a Level object, and probably calls a function inside the class Level that actually does the loading. Of cource this is one way of doing it. Now if you are programming in VB I would have a level file that is segmented and when time to load the level, open the file and then load the level needed.

If you would like any other ideas, just email me, Daniel.holley@usa.net I would be glad to help Daniel Holley.

Share this post


Link to post
Share on other sites

  • Advertisement