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.

Work in Progress / Vanolith DBP Engine, Completely Written in DBP.

Author
Message
EsteemDE
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 9th Sep 2006 17:50 Edited at: 11th Sep 2006 03:57
Vanolith is a full game engine I am working on. 100% of Vanolith is written in DarkBASIC Professional. I am doing this project instead of my DBP .Net DLL's because more people will be able to use Vanolith and will be even more useful in your program's/game's development.

As of right now I am just finishing up on the core aspect of the engine, no graphics programming has been done yet. The core covers everything from file manipulation, settings, display, GUI (using BlueGUI), command line parsing, exception handling, console window (BlueGUI window that stays on top), and the scripting system.

File manipulation, display settings, saving and loading, and other core DBP features are things I wont go into detail about since most people should already understand the point and functionality of such functions.

The scripting system is a fully featured scripting system written completely in DBP. It is module based, so adding new commands or other functionality is as simple as writing a case statement, adding a sub and linking to it, or writing a function and calling it it. Scripts are not read as text, but as my own custom byte code which is formed from a compiled script. Scripts are written and compiled inside the script editor (written in DBP and BlueGUI and called from the command line). Compilation is very fast, I did 2000 lines in 87 seconds on a 1.8p4. Scripts can also be written in notepad or another editor. You can just open up the script file in the Vanolith script editor then compile it. Scripts can have any file extension but all compiled scripts must have the same extension (extension is a constant in the engine, so this is easily changed).

Scripts can be in both C++ .Net style syntax or DBP with a bit of .Net style syntax. Each version of a script can be compiled with the same compiler just as fast. There will be an option on the compile window where you choose C++ or BASIC. BASIC will not compile under the C++ option, as C++ will not compile under BASIC. However, scripts compiled under either will turn out to be the same exact compiled script. Neither syntax will run faster than the other after it is compiled. Also, you cannot mix/combine the syntax's together in the same script file.

Here is an example script:

C++ Style Syntax Option



BASIC Style Syntax Option. I did not test compile this so there may be errors. I did this translation very quickly so... yeah.






Update 1 - I just finished up writing the script editor program. That includes both the look and functionality of it. I will be putting up a fully functional demo soon that shows off everything I have done so far, but DBP source will not be included with it.

Included in this post is an image of the script editor itself. The window cannot be resized and is sized for a 1024x768 or larger screen.

Attachments

Login to view attachments
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 9th Sep 2006 18:01
Quote: "Compilation is very fast, I did 2000 lines in 87 seconds on a 1.8p4."

Doesn't sound that fast but then this is being compiled by a DB program as a script so actually that isn't that bad!

Unfortuantely this just looks more complicated than DB. Being a coding geek I prefer it but most people that use DB are using it as it is simpler than C++ and you are making an engine that forces you to use code more like it.

However, I would very much like to see where this goes and what other features you build in. Whether it is massively useful or not it still looks like some very clever work. Good job!

EsteemDE
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 9th Sep 2006 18:08 Edited at: 9th Sep 2006 18:36
andrew - Yes I thought about this, which is why there is both a C++ and BASIC syntax option when you compile a script. You cant mix the two, you pick one or the other. I have both BASIC and C++ like syntax engines finish so I will rewrite the script above to show you how it looks.

The reason I did C++ syntax first is because thats the standard. I added BASIC so if the game creator wanted to write part of the game in scripting then he wouldnt have to change his style of syntax. But lots and lots of modding communities use C++ syntax, as Unreal, Quake, Torque, and Half Life engines use this.

As for the speed being not so fast, for a 1.8p4 thats extremely fast. 85-89 seconds compile time is faster than I can compile 2000 lines of DBP code (without comments). However running the script will be slower than compiled DBP code, but will be much faster than something like LUA. This is becasue the script isnt read, its stored inside memory which is why i compile to byte code. Each function is its own number, and based on the number a function is called. This makes it so you dont have to parse text. I use to use a read file and text parsing scripting method... but when i changed to this the execution speed increased by more than 1300% (AKA 13x, no joke >_> ).
EsteemDE
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 9th Sep 2006 18:20 Edited at: 9th Sep 2006 18:20
Ok I added a BASIC example for you to look at. It was a quick translation so there may be errors (its not exact DBP code so dont look for DBP like errors).

[EDIT] oops... double post >_>... meant to edit.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 9th Sep 2006 21:14
Cool! It takes me about 20 seconds to compile that much code in DBP but if it takes you less time with this than DBP then I take back my concern. Well you cleared up all my worries about this so well done! Can't wait to see more.

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 10th Sep 2006 01:14
EsteemDE, I did a similiar scripting engine called 'Thrust', written in DBP, but I decided to move over to writing the whole thing in C++ called XScape. These projects are in no way dead, just on hold while the DGDK.NET stuff is on the go.

Demos and such available on my site (sig) in the portfolio secion.

Paul.

EsteemDE
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 10th Sep 2006 01:36
APEXnow - Wait for what? I am not sure why I would wait when I am writing this myself. is there a reason you wanted me to wait?

Every One Else - I just finished up writing the script editor program. That includes both the look and functionality of it. I will be putting up a fully functional demo soon that shows off everything I have done so far, but DBP source will not be included with it.

Included in this post is an image of the script editor itself. The window cannot be resized and is sized for a 1024x768 or larger screen.

Attachments

Login to view attachments
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 10th Sep 2006 01:40 Edited at: 10th Sep 2006 01:42
Wait? Am I missing something?

[EDIT] I merely posted for your curiosity if you wanted to look at the stuff, that was all

EsteemDE
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 10th Sep 2006 01:41
I was asking myself the same question lol.
The crazy
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Behind you
Posted: 10th Sep 2006 02:47 Edited at: 10th Sep 2006 02:47
I think you may have interpreted this:
Quote: "just on hold while "
as perhaps 'just hold on while'? I dont know... maybe thats where the confusion is.

EsteemDE
19
Years of Service
User Offline
Joined: 5th Aug 2005
Location:
Posted: 10th Sep 2006 03:02
Yeah you're right... I didnt read what he said corectly. lol oops.
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 10th Sep 2006 04:06
Oh I see what you mean now.

Paul.

Login to post a reply

Server time is: 2024-11-23 20:11:56
Your offset time is: 2024-11-23 20:11:56