Page 1 of 4

Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 13 Aug 2009, 09:20
by DesignDevil
Hello tS'lers - i present here my actual project.

I'm working on the conversion of the tS 6.6 SDK from C++ to FreeBasic. That means, you can now develop your tS PlugIns within a Basic Dialect nearly to the good old QBasic - or any other Basic Language.

Why FreeBasic?

- As the name say: FreeBasic is free - it is a open source project
- The Language is easy to understand (to learn) but powerfull enough to work with
- FreeBasic creates fast and small code without any runtime librarys
- There are a lot of librarys which can be used with FreeBasic (i.e. DataBase, Graphic Libs etc.)
- A really good help is available as documentation (in english and also german) and also a good comunity in both languages
- And at last point: i don't like C++ ;)

So, what have i done so far?

- I converted the C++ header files into the FreeBasic language (still in progress).
- I figured out the problems with using resources in the dll. That means: you can easly create your PlugIn Window per Drag 'n Drop in the FormEditor of the FreeBasic IDE (i use FBEdit as example) and start with coding.
- I wrote my first PlugIn to test the possibility if i get this to work (still in progress - see attached image)

CONLUSION:
If you are interested by this project and writing your own tS PlugIns - maybe you have experience in C++ OR any Basic language - feel free to help me.

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 13 Aug 2009, 19:35
by froo
Hi DesignDevil. It's good to see this. Keep it up! :)

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 14 Aug 2009, 19:32
by DesignDevil
So, i'm finshed.

I have written a tutorial about using the FreeBasic conversion of the trueSpace SDK and i made a package which inludes:

- The original SDK
- A sample TSX (Wheely)
- A Tutorial about installing and using the FreeBasic conversion, using the sample TSX and writing your own TSX in FreeBasic

you get the package on my website (SDK + STUFF): http://www.designdevil.de

Questions, Tips - give it to me ;)

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 16 Aug 2009, 17:38
by Emmanuel
Oooooh ! This looks VERY interesting.

You deserve a huge thank you for this awesome work :superbanana: :superbanana: :superbanana:
I have plenty of plugins ideas in mind but a very little knowledge of C++... so this could be the chance to make my dreams come true !

At the moment I am rather busy but I promise I will be back soon on this thread !

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 16 Aug 2009, 20:47
by DesignDevil
Thanks a lot.

Well, it is not finished yet. From time to time i find a issue in some of the functions. But, hey, it is the v1.0 ;)

For now i try to translate all original sample plugins into FreeBasic to get more experience and to give more samples.

FreeBasic himself is not the easiest basic language but this is founded in the "role" that his has to play as a "up to date compiler".

It's not so easy to learn as to the QBasic time. But if you have a bit experience in VisualBasic, PureBasic or or another language, then you can find here a good language to work with.

The reason for all that is, that i self have a lot of ideas in mind for plugins. And this although i have a big collection on my website. Also i write computer programs since 20 years now, but C++ was ever to difficult to me. I don't no why because i can write in many Basic dialects, php, delphi. Also JavaScript (a bit) ... but C++ doesn't go into my head ;)

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 20 Aug 2009, 12:03
by DesignDevil
Hi folks ... the version 2.0 is UP ;)

I have rewritten the complete code as i detected that the created code by the SWIG converter was terrible wrong.

I rewrote every line of code so that we now don't have to assign every variable as a pointer - which is a lot easier to write and, more importend, to understand.

I rewrote also the tutorial and translated more samples from the original SDK into FreeBasic.

Be aware of the following: The "viewcam" sample doesn't work correctly. But also the original does that not. But my FreeBasic version does the same failure so i'm sure i translated the code correctly ;)

If anyone has a idea how i could fix that contact me - it would be cool to get this to work.

Download on my website .

And now: let's write some cool plugins.

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 20 Aug 2009, 13:42
by First Light
Thanks, DesignDevil. I hope to try something similar for the Workspace Side of tS 7.61 in the future.

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 21 Aug 2009, 12:33
by froo
Hi DesignDevil.
You might want to create a thread for the FreeBasic" TS 6.6 SDK at http://www.truespaceplugins.com" onclick="window.open(this.href);return false; as well:


http://truespaceplugins.com/forum.html" onclick="window.open(this.href);return false;

Froo

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 21 Aug 2009, 12:42
by DesignDevil
Sound like a good idea - thx froo.

btw - FREEbasic not REALbasic ;)

Re: Developing tS 6.6 (Modeler) PlugIns in a Basic Language

Posted: 21 Aug 2009, 14:12
by froo
Doh sorry about that. Coffee was not yet brewed. That's what I get for thinking before caffeine...

I fixed it. Thanks.

Froo