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 / Question about dbpro compilier...

Author
Message
GregA
15
Years of Service
User Offline
Joined: 21st Jun 2011
Location:
Posted: 1st Jul 2012 17:25
Since ive taken a break over the last year...

It seems to me that the ultimate language/format for my game levels already exists... It is the dbpro language its self... As I make a level editor, I plan to just serialize the whole thing into dbpro statements.

Has anyone done this before??? (almost certainly, it seems really obvious) Is there any code laying around anywhere that might give me a starting place to do this...
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 2nd Jul 2012 06:57 Edited at: 2nd Jul 2012 07:33
You can't compile commands on the fly, but you can interpret them. I've done this with my in-game console. The basic idea you need to follow is this:



Of course you'll have to pull apart string$ before you can process it, so if string$ = "position object 1,10,10,5" you'll have to find a way to only look at sections of the string. Something like:



TheComet

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 3rd Jul 2012 04:24
Quote: "TheComet"

you are legendary in my books

Quote: "I plan to just serialize the whole thing into dbpro statements."


This is a new concept to me can someone explain or is it basically as TheComet laid out... a runtime based code compiler?

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 3rd Jul 2012 04:36
You could certainly create a RAD styled front end/authoring tool for DB/DBPRO that builds a project code, compiles and runs it.

Login to post a reply

Server time is: 2026-07-08 01:55:43
Your offset time is: 2026-07-08 01:55:43