Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: Raizor on September 07, 2011

Title: Purebasic vs Freebasic
Post by: Raizor on September 07, 2011
As a lot of people here code in basic, I was wondering what the differences are between Purebasic and Freebasic. I understand Purebasic costs money and Freebasic is free (nice descriptive name). Are there any other real differences and is the code compatible between the two?
Title: Re: Purebasic vs Freebasic
Post by: Jim on September 07, 2011
I know they are not compatible with each other - almost all BASICs are different, and that Freebasic is very good.  I haven't used PureBasic.

Jim
Title: Re: Purebasic vs Freebasic
Post by: padman on September 08, 2011
Hmm, I guess it's as always just a matter of taste which Basic to choose. I personally find Purebasic a little easier to use. You can easily include pictures and music in your code without the hassle of using BMPtoRAW or WHATEVERtoRAW (cool tools nevertheless rbz!;)) by just using the INCLUDEBINARY command for example. Then I also find drawing on the screen and moving sprites around easier. And so on and on. I got stuck with PB just because I found out that the OSDM (yeah, yeah shame on me ;)) is coded with it. And I wanted to do such oldskool effects too. If it were coded in FB I would have given that a try first probably.
Anyway, you can port code from PB to FB (and vice versa) without huge problems though. Even I managed to do that. :D
Title: Re: Purebasic vs Freebasic
Post by: Raizor on September 08, 2011
Thanks for the response Jim and Padman.

Padman, what is OSDM? Old School something something?? :)

What about using OpenGL in PB and FB, is that possible and flexible? I'm sure I read something on here the other day about PB not being able to do proper 3D with OpenGL.
Title: Re: Purebasic vs Freebasic
Post by: padman on September 08, 2011
OSDM is the OldSkool Demo Maker. It's similar to the RSI Demo Maker on Amiga. Have a look here (http://testaware.bplaced.net/) for more info.

You can code OpenGL in PB without any problems. With the same syntax that's used in other languages. (just add an underscore to the actual command) An OpenGL snippet in PB looks like this for example:



Code: [Select]
glBegin_(#GL_QUADS) ;Draw A Quad
  glVertex3f_(-1.0, 1.0, 0.0) ;Top Left
  glVertex3f_( 1.0, 1.0, 0.0) ;Top Right
  glVertex3f_( 1.0,-1.0, 0.0) ;Bottom Right
  glVertex3f_(-1.0,-1.0, 0.0) ;Bottom Left
glEnd_() ;Done Drawing The Quad

And of course you can do 3D with it. What you read about is the possibility to compile native Purebasic commands using OpenGL instead of DX 9 for portability reasons. PB can produce portable code for Linux and MacOSX too. And some native Sprite3D commands don't work with the OpenGL subsystem. That's all. (PB sorta "translates" its commands before compilation using either DX7, DX9 or OpenGL)
Title: Re: Purebasic vs Freebasic
Post by: Raizor on September 08, 2011
Ah, never knew such a thing as OSDM even existed. Good stuff :)

Thanks again for the info, it is very helpful.

K++ (I always forget to say that)
Title: Re: Purebasic vs Freebasic
Post by: padman on September 08, 2011
No prob. :)
Title: Re: Purebasic vs Freebasic
Post by: Shockwave on September 08, 2011
I have used Purebasic and Freebasic, I used Freebasic a lot more than Purebasic but in terms of capabilities I think that they are about equal, you can use GL, pointers and inline asm in both languages so they are ideal frameworks for small intros.

For bigger projects you'll be better off sticking with .net though.
Title: Re: Purebasic vs Freebasic
Post by: Raizor on September 08, 2011
Thanks Shockwave. I think I'll have a look at Freebasic.
Title: Re: Purebasic vs Freebasic
Post by: Hotshot on September 08, 2011
Both are good and for Freebasic....You used his framework Easy GL2D http://www.dbfinteractive.com/forum/index.php?topic=4793.0 :)
Title: Re: Purebasic vs Freebasic
Post by: Rbz on September 09, 2011
All I know is that every library wrapper I made for Freebasic a version for Purebasic appears as fast as a blink of an eye. ;)
Title: Re: Purebasic vs Freebasic
Post by: va!n on September 09, 2011
PureBasic comes with libs which are compiled to libs and they are closed source, so you cant fix a bug in a lib. Afaik freebasic comes with no precompiled libs and include the full source of the needed lib. So compilation time may take an eye blink longer but you can fix and extend existing libs. Btw, the stuff i saw over the years, PureBasic will be used mainly for Appz/GUI and FreeBasic more more Gfx things!? (I know only the FB related intros/demos/sources on this forum, so dont see what apps with GUI are coded in Freebasic on the other side)
Title: Re: Purebasic vs Freebasic
Post by: Raizor on September 09, 2011
All I know is that every library wrapper I made for Freebasic a version for Purebasic appears as fast as a blink of an eye. ;)

Heheh rbz :)

Vain, thanks for the extra info, again, very useful.
Title: Re: Purebasic vs Freebasic
Post by: padman on September 09, 2011
Quote
...PureBasic will be used mainly for Appz/GUI and FreeBasic more more Gfx things...
I use Purebasic mainly for craptros.  ;D
Title: Re: Purebasic vs Freebasic
Post by: jace_stknights on September 09, 2011
Hmmm for myself, I downloaded FreeBasic first. But PureBasic was so simple to use... Thanx to Pad for the examples!
I think FB has more habilities, as said first in the topic. But for myself, I wanted a simple and productive dev prog. Purebasic does all I want (for the moment!)

And like Pad, I mainly use it for craptros   :carrot: