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 / Game Course/Level Properties

Author
Message
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 21st Nov 2010 22:21
So i was wondering--what is the best way to make a game have multiple levels? It seems obvious to me that each level could have it's own set of subroutines and function that are run whenever that level or course, map, environment, etc. was reached. But is there a better or more simple way to do this?

IM A TOTAL NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOB
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 00:45 Edited at: 22nd Nov 2010 00:46
I was also wondering--let's say you need a sound to play every time the character lands for example, would you simply have that gosub to a sub that plays a sound?

ohh, how do i add a signature image to my posts?

New 3d marble game coming soon!
The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 22nd Nov 2010 01:59
Quote: "what is the best way to make a game have multiple levels?"

It would be best to save all your level data (object positions, health values, player(s) position(s), level settings, etc...) to a file, and whenever your player reaches the next level, you load all the data in, and assign those values to every asset in your game.

TDK Man has some really good tutorials, which can be found HERE

Quote: "I was also wondering--let's say you need a sound to play every time the character lands for example, would you simply have that gosub to a sub that plays a sound?"

Yes, you can make a gosub routine, or a function to make something happen in your game, but that isn't allways necessary. Each line of code within a loop is run over and over again, but gosubs and functions are not allways run every loop. Gosubs and functions are there to make your code more structured and easier to read.

Quote: "ohh, how do i add a signature image to my posts?"

Well, in the 'Signature' textbox on your 'Profile' page, you simply copy/paste the url of the image that you want displayed, like this for example:


Just remember to add the [IMG] and the [/IMG] at the beginning/end of the url.

Hope this helps?

Cheers

SLAYER RULES! YEAH, MAN!!
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 02:29
Yes, all of those helped, thanks!

New 3d marble game coming soon!
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 03:04
Im not sure i really understand the first one, the whole file saving one.

New 3d marble game coming soon!
Mugen Wizardry
User Banned
Posted: 22nd Nov 2010 03:09
use the "data" statement

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 03:17
Thanks! Now ive been looking through some dbpro game's file systems, and just to be sure--when any level is loaded, a subroutine or function would create a level according to a config file?

New 3d marble game coming soon!
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 22nd Nov 2010 03:29
errm, you could do it that way, or you could model the level then load it.

Like TheSlayer said, go through some of TDK's tutorials! they help loads!

Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 03:45
Haha yes i did look at some! Hmmm... OK, just a side question--will 3d objects be detected by the terrain height function?

New 3d marble game coming soon!
Mugen Wizardry
User Banned
Posted: 22nd Nov 2010 04:35
terrain height gets the y position of where ever the 3d object is on the terrain.

useful for adding terrain following functionws

CHECK OUT SOME MUSIC FROM MY NEW TECHNO CD! TECHNOKINESIS
http://www.youtube.com/watch?v=4a8KedfgVv0
ALSO, CHECK OUT MY NEW TECHNO CD! http://www.imageposeidon.com/
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 22nd Nov 2010 05:53
Thanks! I think ive got things figged out.

New 3d marble game coming soon!

Login to post a reply

Server time is: 2026-07-21 12:51:19
Your offset time is: 2026-07-21 12:51:19