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.

Newcomers DBPro Corner / Changing Level --DBC--

Author
Message
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 2nd Jan 2005 17:02
How would somebody go about having more than one "level" in a game. for example a final fantasy world map. how would you go from the main map to the town. i understand the colision principles of it,but do you have all your models in the same space but miles and miles apart or do you delete one town model and load another? which way is the best?in you oppinions
Ali M Oldboy
20
Years of Service
User Offline
Joined: 6th Nov 2004
Location: England, UK
Posted: 2nd Jan 2005 18:47


There

-- I'm a slaveman, I am a master! --
(It's me, Ali M)
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 2nd Jan 2005 19:57
@ ThE lOsT sOuL: read the post, not just the first few words.

@Niclaw: I haven't done this, but I think probably loading the areas as you come to them would work best (you would have an area loading screen or something like most games do while the object and suchlike loaded) so that it wouldn't hinder the frame rate at all.

Am I the only one here who's really confused?
http://db1games.topcities.com
(used to be demonsbreath)
Major Payn
20
Years of Service
User Offline
Joined: 16th Dec 2003
Location: United States of America
Posted: 3rd Jan 2005 00:36 Edited at: 3rd Jan 2005 00:37
Subroutines are pretty good for these kind of things, just stick all the level loading/objects in a subroutine, and then when you complete level 1, or enter a certain area, just use a command like..

Gosub level2

Remember to create a subroutine you set it up as follows...

level2:

CODE GOES HERE

return

Now remember to keep the subroutine outside the loop.

Guns arn't the problem, people are the problem, shoot all the people and guns arn't a problem anymore.
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 3rd Jan 2005 13:19
@ ali m - i already get that bit, i said a bit later on .

so i literally. delete old.3ds load new.3ds and reposition the character model etc while the load screen is on? im not entirely sure how to use subroutines. i find the darkbasic tutorials that come with the program often have quite a lot of pointless variables and code so they tend to confuse me.
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 3rd Jan 2005 19:19 Edited at: 3rd Jan 2005 19:25


Admittedly you would have to do more loading and deleting than this, but thats basically it.

A subroutine is a block of code that you have put outside the main block of code - that's all.




Here's a very basic subroutine:



{reason for editing - typos in code}

Am I the only one here who's really confused?
http://db1games.topcities.com
(used to be demonsbreath)
Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 3rd Jan 2005 22:16
but why use a subroutine? why not an
IF...
endif
?
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 4th Jan 2005 00:37
Using select and case would probably be better

Nic
20
Years of Service
User Offline
Joined: 26th Jun 2004
Location:
Posted: 4th Jan 2005 13:12
what do you mean?

Login to post a reply

Server time is: 2024-11-11 22:37:35
Your offset time is: 2024-11-11 22:37:35