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.

Program Announcements / Dev-C++ DarkBASIC Professional Plugin Template

Author
Message
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 5th Jan 2007 07:45 Edited at: 28th Jun 2007 03:19
It's exactly as it sounds, this is a template for Dev-C++ which will allow you to create a DarkBASIC Professional plugin.

I give credit to IanM, and Three Score, for having made some of the functions which are provided. Remember to make a .ini file for your plugins, and enjoy!

Credit to TK15H for the DBP command list.

Cheers,

-naota

NEW!
Showcase is out!
I've created a showcase as a DLL has finally been created with this template (By someone other than me). This honor goes to GatorHex for his DarkFish Encryption DLL. When my website is out, the showcase will have it's very own webpage, for now, it sits neatly at the bottom of this thread.

Tutorial is out!
Check out the tutorial for the template/SDK. Click the below image.


Version 3 is out!
Version 3 of the template is out. It has been almost completely rewritten, and is actually an SDK with a template attatched. The SDK is very intuitive, and well explained within the template itself. It has 3 examples included with it, and any binaries that might be needed for testing.

Download the newest version here!

OLD!
THE DBP-C++ WRAPPER HAS BEEN FINISHED!!!
The wrapper, however, is not available in this post.

March 6th post.

This is the 2nd version.




SHOWCASE
Dark Fish Encryption - Author: GatorHex - Requested Extra Data: Webpage

Attachments

Login to view attachments
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 5th Jan 2007 14:58
Ah neat. I'll have a look at it right now.


You are not alone.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 5th Jan 2007 22:48 Edited at: 6th Jan 2007 00:54
Yea, that console dll i made, was made with this, as well as the other dlls i'm working on. I'm sure you'll have fun with it

[edit]
48 views, and only 1 response?

Suggestions, criticism, comments, etc, are all welcome. Or even, an explanation of what you plan to do with it would be nice.

enjoy,

-db
[/edit]

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 6th Jan 2007 22:53 Edited at: 16th Apr 2007 07:15
Anything?


Albert Einstein believed that imagination is more important than knowledge.

Attachments

Login to view attachments
MadrMan
18
Years of Service
User Offline
Joined: 17th Dec 2005
Location: 0x5AB63C
Posted: 7th Jan 2007 19:04
how to make the example work? ..
i commented the D3dx9tex.h because i didnt have it, and uncommented the 4 lines of code that had something to do with that file, then i uncommented the getinteger in the string table.
compiled, put the dll in the plugins-user directory.
put this code in dbp: "print getinteger() : wait key"
and then it says variable getineger() does not exist, so i assume the function didn't got exported.. soooo.. ? *confusion*

im quite a noob at c++ but (un)commenting lines isn't that hard is it?


Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 7th Jan 2007 19:12
Sounds great, I don't have the time to check this one out at the moment, but I've bookmarked this page.

Click Me!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 8th Jan 2007 07:59
Good to know seppuku!

@MadrMan
Can you show me exactly what you did? Also, I think that the string table command was "GET VALUE[%L%getInteger" so it would appear as this:



In addition, it is wise to call "START MY PLUGIN" before doing anything, it provides direct access to dbp, and allows for strings to be returned.

Also, you do need the DirectX 9 SDK. Here is a DevPak to one (Link):
http://www.devpaks.org/details.php?devpak=136

I like this, its only 6 megs, doable for dial-up even. Especially compared to the 400 at microsoft.

So, you should uncomment those DirectX Lines, and test it out. If you need a lesson in string tables (for dbp), I would be more than happy to post one up.

-db

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
MadrMan
18
Years of Service
User Offline
Joined: 17th Dec 2005
Location: 0x5AB63C
Posted: 8th Jan 2007 12:03
well it works now, it seems the one i compiled (without the directx sdk) works fine, i didnt realise the command name changed from getinteger() to get value(), Thank you!, great work btw


Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 8th Jan 2007 12:20
Can you make any sort off plugin?
Do you need to know C++?
Looks really good! I will try it out soon!


Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th Jan 2007 04:54
Yes, any sort of plugin, within reason i mean. I doubt you can change the direction the moon orbits with it, but if you think you can go right ahead, lol.

Yes, im afraid you do have to know c++. However, there are many great sites to learn from. Just search C++ tutorials and you'll get some results.

-db

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Jan 2007 00:48
Anything I can extend on here?

-db

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 10th Jan 2007 20:39
An example/tutorial/explanation!


You are not alone.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Jan 2007 21:33
Uh, sure.

C++ File (Add on to it)


RC File (In String table)



Now, for darkBasic Pro string tables.

Firstly, you need the number of the command (1+) in order (1, 2, 3, not, 1, 2, 5, 6, 99, 35), then a string which follows (in quotes). For the first part of that string, is the command you want to use in DBP (Uppercase only). The second part is the parameters, if the function returns a value the second part starts with '[' and then the next character would be '%'. If the function does return a value, the character after % would be the simble for what value it returns, for example, an integer is 'L', a string is 'S', the other values are shown in the RC file, within the stringtable (commented). Then, the following values are the tokens for the parameters (Just like with the return value). After all of your parameters have been filled, place another character '%'. And the following value is the name of the exported function.

That's the end of the string, so you should end the quote.


Please note, you will need to make the INI file which accompanies your program. Here is an example one:


Basically: COMMAND=helpfile.ext=STATUSBAR_TEXT

Hope that helps a little bit (for people).

-db

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
Valle
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 10th Jan 2007 22:01
Very good work !

If I was better in cpp I'd use it ^^


Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Jan 2007 01:00
Thank you.

There are many tutorials out there.

-db

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 11th Jan 2007 04:05
Could you make a Plugin that printed the text between certain symbols?
For instance instead of

You do it,

That way when you need to do a new line you don't have to keep writing 'print' all the time. It could also probably have an automatic word wrap function.
Anyway could this be done with your plugin?


Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Jan 2007 06:44
No. However:


10 is the carriage return, 13 is the newline. They both need to be there, in that order.

-db

GameDeveloper, make your own games with a drag-and-drop interface. Basically t3dgm+fpsc editor combined.
http://forum.thegamecreators.com/?m=forum_view&t=86045&b=8&p=2
dark donkey
18
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 28th Jan 2007 10:26
Nice, i can see this coming handy since i am learning c++.

Nice one
Darkdonkey

load file "worlddomination.wrl",1
Kieran
18
Years of Service
User Offline
Joined: 6th Aug 2006
Location: Hamilton, New Zealand
Posted: 8th Feb 2007 05:54
looks nice db, thanks for this it really helps

~Kieran
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 26th Feb 2007 17:07
Good work DB - I used this template for my antialiased text rendering plugin, and it worked out just fine. Saved me a lot of time - thanks.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 26th Feb 2007 21:51
Thank you.

I am also working on a DBP C++ Wrapper (For Dev-C++) which will allow you to call DarkBASIC Professional commands directly from your C++ code. Here is an example:



I went with DGDK syntax on that one

Cheers,

-db


Enter my forums here.
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 27th Feb 2007 02:49


Thats like the dark GDK for free

-Mansoor S.

(Formerly Xenocythe)
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 27th Feb 2007 02:57
Lol, thank you.

If any one is interested, this is what has been done with that portion so far:


Cheers,

-db


Enter my forums here.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 27th Feb 2007 11:45 Edited at: 27th Feb 2007 11:47
Sweet. Would you (or anyone else) be interested in converting my culling code (written in DBP) over to a plugin? I would love to see what the speed differences were.

http://forum.thegamecreators.com/?m=forum_view&t=67369&b=6

It uses a few free plugins, but only really needs the dkshop one for the get matrix element command since DBP doesn't have any way to get the data back from the matrix4's. I also have his c++ code that he used to make the get matrix4 element command if it will help.

[edit] Also if anyone is interested, that code may not be the latest version. If you contact me, I'll make sure you have the latest and simplest version with all DBP code but the get matrix4 element dkshop command.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 27th Feb 2007 22:22
I can try that later.


However, frustum culling is only math if you think about it. I'm sure I can get it made into a plugin for you.


Cheers,

-db


Enter my forums here.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 27th Feb 2007 22:35
If you finish the wrapper I might be able to do it myself as well. I'm not totally c++ illiterate ... just mostly lol. I can read and modify code pretty good, I just can't start from scratch and create with it like I can with BASIC languages.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 27th Feb 2007 23:01
ok.

Well, im working on the wrapper today. Its in my todo schedule.



Cheers,

-db


Enter my forums here.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 3rd Mar 2007 05:27
Hello, this is a direct snippet from the wrapper. You DGDK users might be familiar with the majority of these commands, which is one reason why I chose DGDK style syntax.



Cheers,

-db


Enter my forums here.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 6th Mar 2007 08:18
UPDATE
Version 2.0 of the Dev-C++ template has been made.


If I happen to upload the wrong files, please tell me.


Cheers,

-db


Enter my forums here.

Attachments

Login to view attachments
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 6th Mar 2007 12:09
It looks like a very useful project - but you might just want to check the legal issues before going too much further. The dbpro dll's which I assume you are using/wrapping may be restricted by copyright. I think this may be why IanM's project, which I think did the same sort of thing as this, got withdrawn after conversations with TGC. I don't know for sure - just speculating.

Just don't want to see a lot of hard work go to waste.

TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 6th Mar 2007 15:07
Quote: "I think this may be why IanM's project, which I think did the same sort of thing as this, got withdrawn after conversations with TGC."

No, IanM voluntarily removed his interface library without TGC asking it of him. There are no laws being broken by this code (unless the EULA has changed and I'm not aware of it).

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 7th Mar 2007 03:25
There is no law I am aware of, which prevents the user from calling DLLs.

This, can ONLY make plugins for DarkBASIC Professional.

Im sure DarkPhysics, Sparky's collision, and many numerous other plugins for DBP have not gone against the EULA.

If I recall correctly, we are licensed to use DBP, and this is one of the many numerous reasons why, and how, I use DBP.


Cheers,

-db


Enter my forums here.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 8th Mar 2007 11:52
Ok - just wanted to make sure you had your back covered.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 8th Mar 2007 22:44
No problem. And thank you.


This should help with your plugin as well, if you choose to use it, or if you have your own system.



Cheers,

-db


Enter my forums here.
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 10th Mar 2007 14:38
looks very nice...

right now, is it possible to call DBPro commands from c++...

also, will this be usable with the microsoft c++ (visual studio express) compiler...

thx

--Mike
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Mar 2007 19:48
Thank you.


It can call DBPro commands from C++.


As for the MSVC++ thing, I am unsure. Perhaps. However, it is saved as a Dev-C++ template, and not a vc++ template. So, it may require some converting.



Cheers,

-db


Enter my forums here.
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 24th Mar 2007 20:24
What I would suggest is having a code converter program that would convert a DB Pro function into a dll function. This would make things a whole lot easier.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 24th Mar 2007 20:44
That might actually be able to be done....


It would definately save me alot of time. ^_^





Cheers,

-db

Enter my forums here.
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 29th Mar 2007 19:39
I can't get the the template by it self to compile. Do you need to add anything to it to get it to work...

Here's the error report:


Do you have any help file for the commands that are included?

If not can you tell me how to set one up?

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 30th Mar 2007 01:40
Do not use any spaces in the your file names, or in any of your directories used to compile the project, and it should work.



Cheers,

-db

Enter my forums here.
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 31st Mar 2007 20:32
How would you call your DB Pro commands?

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 31st Mar 2007 20:52
Just use your normal commands, except, with db in front, and case sensitive. All commands now work like this, there is db in front of them, and each new word (Where a space would be is what counts as where a new word would be) is uppercase.

For example:


Something like that.




Cheers,

-db


"We arent terrible people.... Horses are terrible people." - Peter Griffin
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 31st Mar 2007 21:14 Edited at: 31st Mar 2007 21:15
Thanx!

I have been having trouble getting the commands to work in Dark Basic Professional. It says "Unknown command".

My .ini file:


When I checked the dll files exports I saw a blank name and and r for exported functions. I put the get value in the string table that you had in the template.

I attached the dll file and the ini file.

Also is there a way to change the dbprint...and other commands to what you want? I was wondering because I was making an IDE and I wanted to adjust the structure to what I want for my revised language.

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 31st Mar 2007 22:20
Well, there seems to be nothing wrong with the files that you sent, but rather the source code.

Would you please post all your files? Resending the DLL, and the INI is unnecessary though.



Cheers,

-db


"We arent terrible people.... Horses are terrible people." - Peter Griffin
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 1st Apr 2007 02:27
Here is the source.

I started a new project and just used the getinteger that was already in the template and put the string in the resource.

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 1st Apr 2007 03:09
ok then. I'll have a look.


Cheers,

-db


"We arent terrible people.... Horses are terrible people." - Peter Griffin
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 8th Apr 2007 19:56
To explain what I am trying to do:

http://forum.thegamecreators.com/?m=forum_view&t=102021&b=1

This is a link to one of my threads. I am trying to create my own scripting language using Dark Basic Pro. I am adding on commands as if they are functions that the user can't see. I have about 150 commands (functions) made and about 20 of them are windows api commands. Very useful.

They are for my Dark World Gaming Engine.

That's why I suggested a function convertor.

Once I get the template working I will work on it.

I am having a problem with calling the dbpro commands built in...do you have any documentation???

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th Apr 2007 04:51
Ok, I understand.
I will have a look into your problem when I get home, and onto my computer. I will also have a try at building a function converter, however, the converter will most likely be a DOS application, if for some reason you can not run any DOS programs, please mention so.

As for the problem calling built in DBPro commands, this is why:

Some code to check if a DLL has been included:


As far as I know, there is no way to force a DLL to be included from your plugin. Though, it would be nice, and I know exactly how it would be done too. Quite a shame really that Lee Bamber didnt do this, though i'm sure this isnt the kind of plugin that he intended.


Cheers,

-db


"We arent terrible people.... Horses are terrible people." - Peter Griffin
Gamers for sale
19
Years of Service
User Offline
Joined: 19th Nov 2005
Location: Some where beneath the elements
Posted: 10th Apr 2007 03:39 Edited at: 10th Apr 2007 03:48
To make things more clear I just want to find a way to convert made up code to something that the Dark Basic Professional Compiler can understand. What I intend to do with this is have a program that would sit next to the compiler to "pre-compile" code. To get this to work I am using a plugin that would be used to execute my pre-compiler and convert the code over and send that string of data to the compiler to be compiled and built into an exe. Then to make it seem that the user has the commands I will use the .ini file to make fake commands that will be converted over into real commands when the program is run.

I wanted to try the function converter for the 150 some functions I had and since that won't work I will just try to create a pre-compiler that will be used to mask over the Dark Basic Professional Language.

I think I can run DOS applications because I have XP. Most of anything DOS related that I would create would be coded in batch files.

I also was looking for a way to use my functions to create commands. I will give you a sample over e-mail as a part of my windows api commands. I don't want to post it here though. From there once I have a basic idea of how to use the template I should be fine with creating the rest of my commands. (Note: I will be loading and calling dll files.)

What I need to know:
-How to send a string of data to be compiled
-How to send a path of the exe that the built application would be created.
-How to create a dll to do this, something like:


It is a great goal just involves a lot of theoretical concepts.

If this idea has no way of working then what can I do to "Fake" making my own commands, so users can't see my functions source code?

(The source would be in the pre-compiler)

Edit: Sources:

http://forum.thegamecreators.com/?m=forum_view&t=96546&b=8
http://forum.thegamecreators.com/?m=forum_view&t=102021&b=1
http://forum.thegamecreators.com/?m=forum_view&t=86737&b=10

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Apr 2007 08:42 Edited at: 11th Apr 2007 08:46
Well, I did some work on the parser and ran into the need to create a simple program to convert a text file of commands into the equivalent c++ version. So, here is an example:
Input File


Output File


And the program is attatched. No comment on use, its pretty straight forward. Just make sure you have a similiar file to the input file so you could test out your commands. The commands can be in any case.

Cheers,

-db

[edit]
I could build a simple pre-compiler which could convert source code into a ".dbl" (DarkBASIC Library). My own special file format. That would most definately be a quick solution. And, actually, I will make that my next project. However, for the time being, I am working on the DBP2CPP. And is going quite well.
[/edit]


Albert Einstein believed that imagination is more important than knowledge.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-23 08:04:50
Your offset time is: 2024-11-23 08:04:50