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 / LE4DBP Plugin

Author
Message
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 29th Nov 2010 12:53 Edited at: 5th Dec 2010 14:28
LE4DBP - A Leadwerks Plugin for DarkBasic Professional

Some of you may have realized my experiment of running the Leadwerks Engine, and for those of you who have not, I'd like to introduce LE4DBP. LE4DBP effectively gives you access to Leadwerks Engine using the same commands that are found in its own C Api. The command set unfortunately cannot be used with DBP's own graphics, sound or input, but still lets you program in the syntax you've already become familiar with. I am currently rewriting this for hopefully the final time, and I hope to release a few demonstrations by the end of the week.

Changes from LE C API

The most significant difference would be the fact that instead of returning or using byte pointers, the wrapper assigns LE entities a numerical value that is referenced internally by the wrapper. With this system, syntax will still remain greatly unchanged from its C counterpart.

Aside from this, there will also be a few extra commands to help give you access to structures such as Vec3's and Vec4's, aswell as some entities' properties that would not normally be accessible aside from C code.

Prerequisites

DarkBasic Professional
Leadwerks Engine 2.3+

Progress

= Finished
= In Progress
= Postponed

Application Commands
Body Commands
Buffer Commands
Camera Commands
Collision Commands
Controller Commands
2d Drawing Commands
Emitter Commands
Entity Commands
File System Commands
Framework Commands
Graphics Commands
Input Commands
Joint Commands
Light Commands
Listener Commands
Material Commands
Mesh Commands
Model Commands
Network Commands
Pivot Commands
Raycasting Commands
Shader Commands
Sound Commands
Surface Commands
Terrain Commands
Texture Commands
Timing Commands
Vehicle Commands
World Commands

12/3-12/5/2010 Finished mesh, model, pivot,shader, sound, and surface commands.

11/30/2010 Finished entity, file system, framework, graphics, input, joint, light, listener, and material commands.

Screenshots


Thanks for checking out my progress! Be sure to check back soon for more updates!

Randy
bergice
16
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 29th Nov 2010 12:59
Wow!

51fa1db0ec7c4af52d93a6f5d0e86bc5

Davel_Kerriel
13
Years of Service
User Offline
Joined: 4th Nov 2010
Location:
Posted: 29th Nov 2010 17:25
Awesome !
Good luck for coding the wrapper.
I suppose that we must buy the license for Leadwerks Engine to use this wrapper ?
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 29th Nov 2010 18:40
Unfortunately, yes. I'm thinking of making a DX10 wrapper/engine after this which would not require another engine, but for right now I'm focusing on this and RL work. Both of which have been keeping me plenty busy.

Thanks for the support, and after I get out of work, I will get back to work on the wrapper. I plan to get another good chunk of commands done tonight. I'm iching to get to the display commands so I can start tinkering again.
Eminent
13
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 29th Nov 2010 21:54
YEAH!!! If you finish this, it would be awesome! The screens look very impressive. On thing though, have you seen any performance changes with this plugin?


Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 29th Nov 2010 22:20
Very slight difference from a compiled LE program in C. The difference does show a bit more after you start using numerous for/next,while/endwhile, and so forth, but all in all, it seems just as useable as LE in any other language. If you plan on utilizing LE's Lua scripting, this would clear up a lot of overhead as well.

As for finishing it... I've actually already finished it a couple times already now. Now just going through rewriting because of a change of format. At first I was trying to mimic DBP functions of the same nature such as "le set display mode" as opposed to "Graphics(800,600)." After getting opinions from several other users, I decided to rewrite to use the same syntax as the C API so that way we can still use the LE wiki with it, which is an invaluable tool. Thanks for your interest! Getting ready to go grab some dinner, but after that I plan on getting started converting again.
Davel_Kerriel
13
Years of Service
User Offline
Joined: 4th Nov 2010
Location:
Posted: 30th Nov 2010 10:14
What about performance ?
Is that faster than the DBpro in-built engine ?
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 30th Nov 2010 15:11
Well, it would be difficult to judge the two simply because they are so unalike. I can tell you though I can run a dense sandbox level with 2048x2048 terrain with tons of entites-all normal/specular mapped-and still have framerates of 120+ on a rather mediocre machine. When it comes to shaders, Leadwerks has DBP beat hands down. The only problem with that is the stiffer requirements. LE uses SM3.0 and as such, you would need a compatible video card.
Davel_Kerriel
13
Years of Service
User Offline
Joined: 4th Nov 2010
Location:
Posted: 30th Nov 2010 19:34
Really nice.

Thank you for your time and explanations.

An alternative 3D engine for dbpro could be a nice addition.

About your idea to create a wrapper for DX10, I don't think it's a good idea, since DX11 is now out.

Good luck again, this is really a nice project ^^
The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 30th Nov 2010 20:06
Quote: "Wow!"

I was going to say the same thing!
Would like to know how it works, though?
What is the syntax? Is it the same as in DBPro, and additionnal LE commands? Is it like using the LE engine from within DBPro? Can we use all the features the LE engine uses?

Cheers

SLAYER RULES! YEAH, MAN!!
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 30th Nov 2010 23:02 Edited at: 30th Nov 2010 23:03
The command list is the same as the C API. There are a few excluded functions such as any callback functions. Aside from the C API, there will be a few extra "helper" functions that will help with storing and reading different sized vecs. Theres also a possibility of additional helper functions if and when needed. Thanks for your support!

[offtopic] Yes, Slayer does in fact rule [/offtopic]
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 1st Dec 2010 01:36
This is a nice idea, but really what you're doing is taking a language, ripping it apart and replacing 99% of it with Leadwerks. Its quite sad that TGC could never make DBP as powerful as Leadwerks.

FYI this should run as fast as Leadwerks does in C for the most part. The differences are in the execution of any code written in DBP, this happens much slower than C because the C compiler is much better at optimizing its output.

Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 1st Dec 2010 03:38
Thats probably the best way to describe it. I like the idea of using a case insensitive language myself. That and I just think the core of DBP is a great fun language to rapidly test ideas.
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 3rd Dec 2010 18:32
Just figured I'd stop and let you guys know that I am still actively working on this plugin. The cause for the slowdown was for some internal bug fixing. I also have been writing somewhat of a garbage collector for Vec3's and other vecs. You can retrieve an id for a vec by using the Vec3 command, but to ensure it is not overwritten, you must use a new command, StoreVec. If this is not done, you risk that vec to be overwritten by another in the case of creating too many. It may sound confusing at first but it was about the only solution I could think of to retain the syntax of the LE API.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 3rd Dec 2010 18:46
Is there a deal to be done here between you, TGC and Leadwerks?
I'd like to think you will get something in return if you finish this.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 3rd Dec 2010 21:23 Edited at: 3rd Dec 2010 21:25
Waiting for my Leadwerks license to be sent now. The one thing I noticed is they never really did implement the networking they were working on almost 2 years ago, or at least it doesn't seem that way. Can't tell because they lock out visitors to the important forum areas.

Luckily, Leadwerks works with several languages, so I can still use DarkNet.

I haven't decided if I'm going to make any of my current projects with Leadwerks, but with the Torque users discount I couldn't pass up the deal.

So sad about Torque. I knew they were doomed as soon as they sold out. The license became more restrictive, and basically killed off their indie user base.

Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 3rd Dec 2010 22:54
@matty halewood: I'm just doing this solo. It began as an experiment that worked out really well. I realized I could abstract the entire commands set and just went from there. Right now I'm not going to be charging anything, mainly because this is the equivilent of a header for C. I only changed somethings around to make it more accessible from DBP. After I have it released, I may setup a fresh page with a donation button or so forth, but I'm not sure yet. I'm mainly doing this for myself, but I'm more than happy to share and help others

@KISTech: As for the multiplayer commands, I can't say much about them... but they are there, lol. I just haven't tried them yet. Then again there should be nothing stopping you from using multiplayer plugins for DBP either.

I'd have to agree on the Torque thing as well. I'm a TGE, T2D, and T3d user, lol. (amongst many other platforms)


Pretty much done with my bug testing for now, so its back to converting the last command sets. After that the only thing to do is write an app to take in my c source code and spit out a string table for me... yes, I'm that lazy, lol. That and I think theres around 300 some commands, lol. I think I may hear COD: Black Ops calling my name, but if I don't start back up today again, I should at least have most of it finished by the end of tomorrow.


Randy
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 5th Dec 2010 02:52
Email me. I may have something you will find useful.

Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 7th Dec 2010 22:06
I had a bit of a snag involving string tables, but I'm back on the ball. This time I'm adding them by hand and testing. I already have a small demo running with meshes, physics bodies, and materials.

This will take a while longer then if my stringtable generator wouldn't have worked properly but at least it will get proper testing before release.
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 9th Dec 2010 00:19 Edited at: 9th Dec 2010 00:23
Figured I'd show off a little video of the plugin in action, so without further ado:

Edit: couldn't get embedding to work, so heres a link instead:
http://www.youtube.com/watch?v=VU9babYAvXo
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 9th Dec 2010 00:42
Wow, thats awesome.
How will this work then, can we use it?
We need the license right? Is that just if we want to release something or will we need one to even try it?

Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 9th Dec 2010 03:46
When I release it, it will be released on the Leadwerks Werkspace. You will need a Leadwerks license to use it. There won't be a charge for the plugin. I can't release it publicly because of EULA restrictions. Making the download available on Werkspace will ensure only Leadwerks licensee's have access to it.

As for demos, I will be able to distribute precompiled demo's but unfortunately you will need the license to be able to use it yourself.

Thanks for the reply!

Randy
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 9th Dec 2010 11:38 Edited at: 9th Dec 2010 11:42
I thought it would be something like that, this will make the transition to leadwerks really simple for people here which is great.


EDIT: Could you post the code from that demo?

Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 9th Dec 2010 13:04
Normally Leadwerks source should be put on the Leadwerks Werkspace, but as the EULA has no mention of this, I will make an exception to show how easy it is.



If anything, I suppose it will just give Josh a little free advertising, lol.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 9th Dec 2010 14:38
Thanks alot Coldfire, Leadwerks is a real option for me in the future and it is good to see how easy it is to use, although I would probably use C++.

I also wanted to demonstrate to the DarkGDK open source project team what kind of interface I would like with an engine and this is a good example, thanks again.

Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 9th Dec 2010 19:01
I'd have to say the most powerful way to use Leadwerks is C or C++. This is more for prototyping ideas then anything else--not to say you couldn't release a commercial project with it if you so choose. I myself confess that I use C with Leadwerks mostly, but IMHO Darkbasic is just a funner/less restrictive language.

As for the layout of the engine, that is all Josh's doing. I just copied the format hes already laid forth. I would have to agree though, it is a beautiful example. Thanks for the reply!

Randy
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 9th Dec 2010 22:13
Nice. Can't wait to play with this.

Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 15th Dec 2010 13:21
Still trying to get this finished in my free time. Its just been hard trying to get ready for Christmas. I've been working overtime at work trying to make sure everything goes smoothly. I've been working on it here and there, but I'm not sure I'll have time to release it before Christmas. I've thought about releasing it as is, but I would prefer to wait for a finished product.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 15th Dec 2010 17:54 Edited at: 15th Dec 2010 17:54
I'm to busy to do anything with it right now anyway.

The Wilderbeast
18
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 1st Feb 2011 19:12
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 12th Feb 2011 05:04
Unfortunately, I'm working on getting a new video card at the moment. My main GFX board fried and I'm awaiting taxes to get a new one. Right now I can't even use LE for the moment with my backup card. I very much intend on completing this project, unfortunately, it is just on the back burner till I get a new card.
General Jackson
User Banned
Posted: 13th Feb 2011 04:01


Imbedded it for you.

Nice work on the plugin.

I am Southern, and I love Grits. Feel free to ask me what grits are if your a yankee
Coldfire
15
Years of Service
User Offline
Joined: 22nd Oct 2008
Location: Indiana
Posted: 26th Feb 2011 00:03
Figured that I'd mention that I have resolved my video card issues and plan on continuing the project here in a couple days. I have learned a bit more C++ in the time my video card was kaput and have decided to rewrite it in a new and improved format. Rest assured, the project is not dead.

In the next few days I plan to reorganize my first post to reflect the fact that I am rewriting the plugin as well as clear the progress list and start with a fresh slate. By that time I should at least have a few of the commands sets finished so you will be able to see my progress. One of the best parts of rewriting code is that its much easier after rewriting, oh, about 8-9 times or so, lol.

This next build will be released to the public. It will only be available on the Leadwerks Werkspace for registered users, but it will be "free"ware/donation-ware for any LE owners. I will write some simple demos to show functionality so people without an LE license can at least check it out.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 27th Feb 2011 01:51
Nice!!

Login to post a reply

Server time is: 2024-04-26 22:35:09
Your offset time is: 2024-04-26 22:35:09