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.

DLL Talk / Make your own DLL Program

Author
Message
ThomasFN
19
Years of Service
User Offline
Joined: 26th Aug 2004
Location:
Posted: 17th Jul 2005 23:41
I think the game creators should develop and create a program that you type in Dark Basic code (functions) and it will make a dll that can be loaded into dark basic with the functions. So like dark basic but making .dll files not .exe files. Do you agree?

Dgamer
21
Years of Service
User Offline
Joined: 30th Sep 2002
Location:
Posted: 18th Jul 2005 00:41
Why not just export the functions into a dba file and use #include?

This sig has been dullified!
Mr Underhill
21
Years of Service
User Offline
Joined: 23rd Apr 2003
Location: The Forgotten Worlds...
Posted: 18th Jul 2005 02:11 Edited at: 18th Jul 2005 02:13
Because it's not a .DLL, of course!
I'm just kidding; there actually are a couple of good reasons:
Includes have to be copied between projects. .DLLs don't.
If you give out an include, everyone and their brother will know what your source code is, so you can't, for instance, sell your include files like you can with .DLLs.
You can't change an include file without re-compiling your entire project. You can change a .DLL (at least, you can change a .DLL loaded with "Load DLL")
Correct me if I'm wrong, but aren't DLLs slightly faster than includes?

I edit my posts, and so should you!

IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 18th Jul 2005 02:24
the dlls would also take up more memory than the includes as they would have to be loaded into memory at run time, also making it slightly slower

another thing dbpro does not compile to windows compatable binaries, the compile to the _virtual.dat file which relies on the dark basic exe to run, now if they were going to create a dll making program it would have to contain a dll version of the darkbasic runtime, meaning that it would work slower than if it was compiled as an include

overal why bother using a dll for a built in collection of functions? and are you sasying that people would be willing to buy a function made out of other functions, if they are good at programming then i serously doubt that they will and if you do find anyone stupid enough to pay for an include file slap them hard then point them to the code snippets

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 1280mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
Mr Underhill
21
Years of Service
User Offline
Joined: 23rd Apr 2003
Location: The Forgotten Worlds...
Posted: 18th Jul 2005 02:51 Edited at: 18th Jul 2005 02:51
Quote: "overal why bother using a dll for a built in collection of functions? and are you sasying that people would be willing to buy a function made out of other functions, if they are good at programming then i serously doubt that they will and if you do find anyone stupid enough to pay for an include file slap them hard then point them to the code snippets"

Hmm. Good point, I never really thought about that before. I agree that a simple "DB->DLL" converter wouldn't be a good idea.

IMO, what we really need is a free/inexpensive version of the DGSDK designed and licensed exclusively for plugin making, like IanM's interface from a few years back. That way we could mix C++ and DB code to make efficient, fast plugins specifically for DBPro.

I edit my posts, and so should you!

AndLabs
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 18th Jul 2005 06:03
Just a theory: use the Dark Games SDK to make a DLL as a simulator for acutally using DarkBASIC to make one!

For the Software You Want, AMPERSAND LABORATORIES is the place! [URL=http://www.andlabs.com/]
[/URL]
IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 19th Jul 2005 01:20
u don't need an interface lib - just call the functions in the dll's i've seen it work before

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 1280mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
ThomasFN
19
Years of Service
User Offline
Joined: 26th Aug 2004
Location:
Posted: 19th Jul 2005 02:03
All I want a dll for is so I can put functions into DarkBASIC (pro) without people 'nabbing' my code. And I don't really want to learn c++ and have dll entry points and curly brackets and semi-colons to worry about - just some easy to maintain DB code.

Mr Underhill - I agree with you. A free \ inexpensive vesrion of the DarkGAME SDK

AndLabs
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 19th Jul 2005 05:33
Well, you can use Visual Basic instead of C or C++. It's been proven to work with DarkBASIC Pro. But I don't think a DBPro DLL would work with DarkBASIC Pro.

Here's just a little experiment:

The GoodPixel.dba -> GoodPixel.dll Code:


Compile, and change the GoodPixel.exe file to GoodPixel.dll

The UseGoodPixel.dba -> UseGoodPixel.exe File


Compile and execute UseGoodPixel.exe

The result of the compile/execution?
NO compiler error
YES runtime error "Runtime Error 9704 - Could Not Call DLL Function at Line 2"
If the program persisted, you may get a similar error, but saying "Line 4"
If the program persisted, it will end.

So the result of the experiment? DarkBASIC Professional can NOT handle DLL creation! If you try to convert a DBPro EXE to a DLL, the DLL will not have any files - just an Icon Group and a Version if you look at it in Colin Wilson's XN Resource Editor (http://www.wilsonc.demon.co.uk/delphi.htm), a good free resource editor.

But since the Dark Games SDK is made for C++, DLL creation is likely to be possible with it, as long as you are sure to add initialization functions to the DLL.

For the Software You Want, AMPERSAND LABORATORIES is the place! [URL=http://www.andlabs.com/]
[/URL]
IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 20th Jul 2005 04:12
Quote: "Compile, and change the GoodPixel.exe file to GoodPixel.dll"


you mean re-name it? that isn't a dll then is it? a dll has a different layout to an exe hence why it isnt named exe

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 1280mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 20th Jul 2005 05:45
Dont' rename exes as dlls - it's like renaming a source dba file to an exe file - it won't work. This is what AndLabs was showing.

@IanG: Yeas, that is what AndLabs is showing - different structure.

@ThomasFN: I'm better at making functions than games, too. It's better to just give these away as a service to the community. People should respect you for providing them with the functions to begin with. It's also nicer to use functions - don't have to get all sorts of dlls.

(Of course, I don't ask for credit for any of my functions, but you could ask for a place in the credits.)

See my functions here:
http://forum.thegamecreators.com/?m=forum_view&t=57481&b=1

-Xol

Ion Extension: 28 DBp functions: http://forum.thegamecreators.com/?m=forum_view&t=57481&b=1
IonRay IDE for DBPro in progress
AndLabs
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 20th Jul 2005 05:49
It is a DLL file to Windows, but like I said, it won't have any functions. DarkBASIC Pro is only for executable apps, and won't have function resources within the executables.

For the Software You Want, AMPERSAND LABORATORIES is the place! [URL=http://www.andlabs.com/]
[/URL]
TKF15H
20
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 20th Jul 2005 05:52
The creation of DLL files out of DB code is not pointless. If you have hundreds of lines of code in your project, you could want to put chunks of it in a seperate file, compile it once and then link to it. Also, there are many things that can be done in DBP that aren't easy, so "make your own" is not always an option. Like collision code, I've no idea how that works so I'd rather use someone else's. But someone else may not be willing to share his source, so if he had an option to build a .lib file, it would come in handy.
As mentioned before, DBP doesn't export native Windows EXEs, rather it makes a _virtual.dat file. This is no problem AFAIK, if TGC wanted to do something about it. The compiled code could go into a .lib file, and is embeded to the final _virtual.dat file on compile time.

Its a nice feature to have, but I prefer a stable U6. The current version crashes randomly on my PC.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
Xolatron old
20
Years of Service
User Offline
Joined: 25th Jan 2004
Location: The Star Forge Language: DBpro
Posted: 20th Jul 2005 06:24
TKF15H,
To divide up source code, you can always put groups of functions in different attatched source dba files.
I think that most of the people posting these questions really just want to make their own dlls to make money. Considering that they haven't realized that DBp CANNOT make dlls, they probably aren't experienced enough at DBp to make any functions worth paying for.

-Xol

Ion Extension: 30 DBp functions: http://forum.thegamecreators.com/?m=forum_view&t=57481&b=1
IonRay IDE for DBPro in progress
empty
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 20th Jul 2005 09:28
One key phrase in TKF15H's post was compile it once and then link to it. Besides providing a way to distribute stuff without giving the source away, it'd also save time with bigger projects. It doesn't need to be a DLL (to create DLLs with the current compiler/linker would need a lot of work anyway), not even a MS compatible static library file. It could be an internal format, and also contain additional information (for example pre-defined types).


Play Nice! Play Basic! Version 1.08
ThomasFN
19
Years of Service
User Offline
Joined: 26th Aug 2004
Location:
Posted: 22nd Jul 2005 22:35 Edited at: 22nd Jul 2005 22:36
What I mean, is a seperate dll maker which makes dlls darkbasic can handle easier. And anyway, you'd want dlls when you wrote a cool bit of code, and you could make it into a dll, sell it, and get a bit of cash.

Selling it as a dba - anyone could copy your code - i think its called intulectual copyright or somethink

TKF15H
20
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 23rd Jul 2005 09:57 Edited at: 23rd Jul 2005 09:59
Quote: " What I mean, is a seperate dll maker which makes dlls darkbasic can handle easier. And anyway, you'd want dlls when you wrote a cool bit of code, and you could make it into a dll, sell it, and get a bit of cash."

Looks like you didn't understand my post.
There are reasons against using DLLs:
1) People can steal them.
2) They're harder to generate. Impossible with the current setup, as the actual code is put in a _virtual.dat file, not an EXE.

By generating a .LIB file, it's basiclly the same thing, but without the two disadvantages. The code in the LIB is compiled (just like a DLL would be) but when you make a game that uses that LIB's functions, the LIB is embedded to the _virtual.dat file. All this without having to share your code.

Quote: "Considering that they haven't realized that DBp CANNOT make dlls, they probably aren't experienced enough at DBp to make any functions worth paying for."

Yeah, but their intentions doesn't really matter. It's a feature that would be benefitial to many other people.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
re faze
19
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 23rd Jul 2005 13:03
anything can be decompiled.
TKF15H
20
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 24th Jul 2005 01:08
true, but a decompilation is not as easy to use as the original source.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
ThomasFN
19
Years of Service
User Offline
Joined: 26th Aug 2004
Location:
Posted: 25th Jul 2005 22:16
People can't steal your DLLs if you put a special authorization code thingy into it - You have to use a different code for each computer you develop your DLL with - people have to pay for a code. Meaning people can't steal them. Whats more, its almost impossible to decompile a DLL which has been encryted. And I don't know why people would want to, they should just buy it and use it.

TKF15H
20
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 26th Jul 2005 20:30
Quote: " People can't steal your DLLs if you put a special authorization code thingy into it "

People can always steal software. There is no crack-proof code. And even if there was, they'd just share the authorization code.
Quote: "And I don't know why people would want to"

Some do it for the fun of getting it to work, others do it because they're dead broke. Still others are just plain stingy.

WarBasic Scripting engine for DarkBasicPro
DC emulator code size: 14.3MB, 553,214 lines
IanG
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 26th Jul 2005 23:18
Quote: "People can always steal software. There is no crack-proof code"


An example of this is Steinberg, who make cubase, for you to make cubase work you need to have a special dongle plugged into your computer and apparently, according to one of my friends, someone has cracked it by writing a low level driver of some sorts - so that shows how far crackers will go

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon xp 2600+, 1280mb, GeForce FX 5200 128mb, 200gb, xp pro sp2

Login to post a reply

Server time is: 2024-05-04 09:24:11
Your offset time is: 2024-05-04 09:24:11