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 / Making the code ready for insertion... (?) Plz help.

Author
Message
Yskonyn
23
Years of Service
User Offline
Joined: 19th Dec 2002
Location: Netherlands
Posted: 1st Sep 2003 23:10
OK guys,

I am creating an outline for a convenient world editor to suit my need in creating worlds for my game.
I can create a simpel design already which can create matrices, position object and the like, but how can I save my work in a way that it can be directly inserted into my game code.
Think of it as a "Build" button in the editor which then compiles the code, put's everything in order and stores it as a source code file with only the code present that creates the world??

Thanks.

Yskonyn -
"It's better to wish down here you were up, then to wish up there you were down."
"The ONLY time you have too much fuel on board is when you are on fire."
spooky
23
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 1st Sep 2003 23:44
Look for the phobos game in 20 line challenge forum. It is a doom type game. In download you also get an editor to place cubes, baddies,e.t.c. It will save everything to a text file. The main game then loads this text file and recreates the level.

The code is very easy to understand.

The programmer formerly known as sonic
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 1st Sep 2003 23:53
A better way would be to save in your own custom format (uses less code: if you have two levels then you have two sets of the same code but with different values), but if you insist on saving as code then here's how to do it:



Here's the code I used to save source from my particle creator:




Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?

Login to post a reply

Server time is: 2026-07-23 15:49:37
Your offset time is: 2026-07-23 15:49:37