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 / Separate Files

Author
Message
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 7th Feb 2005 08:47
As a newb I don't know some stuff (duh). If I'm making a game with levels, should I make a source code file for each level with all its specifications and then call on them when the previous level is finished? If so would I include the basic engine in each level, and would DBPro have to close the window and open a new one for eafch file.

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Feb 2005 11:21
your main code module should incorp the game engine code, the includes can be whatever you like. yes, the includes should load up your new level and settings for your engine, but not include the engine itself, that would be redundant and unecessary.

The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 7th Feb 2005 19:03
Ok, so how would I call on a file at a specific time... Are there certain commands?

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Feb 2005 21:24
you can include files (.dba) using the ide to add them to the project, then call the functions. I would submit that all of the code you need is reusable, so you dont need an include for each level, use one include for all your levels, just change the data block its using - maybe from an external file or script of some sort.

The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 8th Feb 2005 07:34
Uh, can we pretend that the people who are reading this don't know that and kindof explain it in newbie language?

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 11th Feb 2005 09:01
Aka, I don't understnad that, can someone explain how to do that.

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 14th Feb 2005 10:16
*bump* Hate to bump, but I still don't understand.

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 15th Feb 2005 02:10
your not the only one????????????????

In Space No One can Hear You Scream! (When your comm Line is cut?)
mathkid
19
Years of Service
User Offline
Joined: 1st Feb 2005
Location: Central Massachusetts
Posted: 15th Feb 2005 03:45
I think he's trying to say to save the information for different levels to different files and interpret them using the same code. You would be using the open to read and read commands (I think).
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 15th Feb 2005 07:25 Edited at: 15th Feb 2005 07:25
now youre onto something
its theory, not code, or I would have posted it for you.

try and think in terms of reusability. but for now start small and easy and learn, then move up when youre ready.

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 17th Feb 2005 03:41
Or you could try learning how to use the array commands, they will allow you to wright your level code out side of your program (eg: wordpad or edit)then load it in when you run your Game.

In Space No One can Hear You Scream! (When your comm Line is cut?)

Login to post a reply

Server time is: 2024-11-11 23:47:07
Your offset time is: 2024-11-11 23:47:07