It is EXTREMELY simple!
I'll reveall to you the main gist of it!
When I first finished having fun with DB, I wanted DBPro, so I checked up one thing my father tried to teach me about... my father once tried to teach me java and the main thing which makes Java and C++ stand out, object orientation. I found an article in the FAQ which clearly stated object orientation was not possible in DBPro, the two main things that make object orientated programming great:
The abilty to reuse commands by simply going back to an earlier class, or a method within it and the idea that you could save the code for the gun being fired in one place, and the character moving in another, and linking them together in one main source file...could not be achieved in DBPro. When I first recieved DBPro I managed to prove that all wrong...
The first step I checked out was loading previous command sets that have been used inside the file. That was pretty easy because all I had to do was to create labels above different commands or command sets and later on, simply go back to them using the gosub or goto command. And for those of you who use methods as functions...You can probably work out what to do yourself.
Let us now try testing it{
Shoot_The_Gun:
(bla bla bla bla)
(bla bla bla bla)
(bla bla bla bla)
return
do
pulling_the_trigger:
If mouseclick()=1 then gosub shoot_the_gun
return
loop
}
Don't forget the return command if you need it!
Now the second step... Loading different classes from the other end of the "my documents" folder. The darkbasic toolbar on the right contains many things including a list of functions, media and icons used for your project but the thing that is truelly important is the source file section where you can add different source files to your project, these include browsing already made source files throughout the computer and creating one on the spot. When done, those files will be linked, you can check and load the different labels and functions in each source file.
Try it, it works! I'm amazed at how simple it is!
The labels and functions act as methods and the different source files you used act as classes. If you are confused or unsatisfied, please say and when I do prove that it works then I hope people will start using my method!
It's amazing you're reading this, surprise... you still are.