PB / B+

BlitzPlus Forums/BlitzPlus Programming/PB / B+

WillKoh(Posted 2004) [#1]
I breifly checked out the 'PureBasic' language that seems similar to BlitzPlus. Wich one creates fastest (and/or smallest) executables? How do they compare when doing individual pixel manipulation / graphics algorithms (we may also include the old 'Blitz2d' here)?


soja(Posted 2004) [#2]
PB creates the smallest executables, simply because BlitzPlus-compiled programs usually have more stuff statically linked into the program than necessary. They're both fast, though it probably varies depending on what type of benchmark, and I'm not sure of any concrete examples. In general, PB is more feature-rich than BlitzPlus in its current state, but also more complicated.


LarsG(Posted 2004) [#3]
PB's not complicated.. it's just a bit different... :)


MrCredo(Posted 2004) [#4]
Wich one creates fastest (and/or smallest) executables?

fastest: NO!!! I tested many codes (that was important for me) and it was every time slower.

smaller: YES


Kanati(Posted 2004) [#5]
I'd have to say PB is the better package... regretably.

Kanati


RexRhino(Posted 2004) [#6]
PB is faster for non graphic applications... BlitzPlus faster for a graphics application (game or such).


Seldon(Posted 2004) [#7]
I agree. I did a simple program that was drawing in full screen a background and few images, with B+ and with last (registered) version of PB. I used Sprite() command in PB (that works directly with DirectX) and DrawImage in B+. In both cases, images were loaded in video-memory. B+ (but also Blitz2D) was faster. I didn't write any FPS or so, as the difference was viewable with your own eyes. PB still is better for normal applications, but for games, B+ is the best choice.


MrCredo(Posted 2004) [#8]
"PB is faster for non graphic applications..."

no i testet non graphics stuff - PB was slower (in some tests BB was 10x faster)


LarsG(Posted 2004) [#9]
MrCredo: I would like to see those test...


darklordz(Posted 2004) [#10]
Same here. I for one know that PB would kick B+ in the app departmeny anyday...


CodeGit(Posted 2004) [#11]
PB is DEFINITELY better for app programming.


Russell(Posted 2004) [#12]
PB has a somewhat quirky command set, but as far as speed is concerned, it's hard to say PB is graphically slow when it does real-time alpha blending (something that B+ does not do well).

B+ has an easier to learn and more consistant command set, but PB is a bit more flexible, I feel, especially in the area of Windows\API programming...

Which brings me to this one little tidbit: It is available in 3 versions for the same price (although only the Windows and Linux versions are "current" - last updated in January...about due for the next version any time):
Amiga (Just send Fred an e-mail if you want the full install lha file), Windows and Linux (both version 3.81)

PB can also compile Dll's and you can select your own icon for your program before compiling!

Right now, they work great together. But PB 4.0 and Blitz Max are both, supposedly, on the horizon so who knows if you'll need both packages at that time...

Russell


darklordz(Posted 2004) [#13]
not to mention that PB uses the OGRE 3D Engine and that pb has open gl support.... Witch i guess b+ also has but pb is a bit more flexible...


Russell(Posted 2004) [#14]
PB's implementation of the OGRE engine is in its' infancy still, but there is real potential there. It remains to be seen whether it will be able to give B3D a run for it's money ;)

3.89 beta was just released to reg'd users, and 3.90 is around the corner after that, so 4.0 is probably about 3 or so months away.

I wonder how far away BMax is (I know that's the 97th time it's been asked on this forum, but Mark's worklog entries are few and far between and I'm just wanting to know SOMETHING "concrete"!)

Thanks,
Russell


WillKoh(Posted 2004) [#15]
Hrm.. I never thought I'd get so many replies. The topic is a bit off-topic and I new "it depends on..." was an unevitable answer. To complicate things further, I wonder if anyone knows about the potential of ruby in graphical taks? I like object oriented programming but am not familiar with C/C++, only VB which some say is not really object oriented.

My discussions with my self kinda go in circles: I prefer to make apps rather than games, but I want detailed control (and speed) concerning the GUI (thinking of going manual draw), otherwise something will always disappoint you(me).

Take the visual basic RichTextBox: (how does it compare to the "edit" gadget in PB, btw?) SelStart, SelLength properties return diffrent to diffrent event procedures, and it's quite inpossible to make a foolproof way of finding out where the cursor is *and* what key was pressed.

Or what about adding XP-style menus? The control (free) that creates them will create an extra thick ugly solid-color frame around menus if the visual theme is WinXP, rather than the nice shadow. If I then try to change the code of the control (provided) it is much more complicated that it's blitz equivalent would be...

Making my own GUI and visual editor would be the dream I guess, but to quickly be able to create something that looks and works as one expects (here today, for a code editor to make my GUI perhaps) is also nice, but visual basic lets me down there.

The reson I involved ruby at the beginning of this post is that it is supposed to be very logical and straightforward, and give a lot of control of things, and that Matz guy seemed to share a good dream of making things simple (like hi-level) yet powerfull (like lo-level). To what extent he succseeded and if ruby is worth learning, I dont really now...


WillKoh(Posted 2004) [#16]
Though I got more responses than I thoguht, I never ment to *end* the discussion here!


Jürgen(Posted 2004) [#17]
Maybe Blitz Max (whenever released) will be a better solution than Pure Basic 4.0. I tried Pure Basic, and the GUI support is really fast enaugh! You know, a MessageBox("Hello World") - Example is an Executable with about 8 KB, and seems to run faster than you finished clickin on the icon (even when first started). To the RichText - question: The 'edit'-gadget is not as mighty as the RichText - thing - but you can easily access to real richtexts through the Windows - API. Since the source code of the Pure Basic - Editor is downloadable (which would also be great for the Blitz one!), you can watch how this works, because the editor (like the Blitz-Editors) uses RichText-APIs.

Surely, you can do APIs through BlitzPlus and BlitzMax, but there is a *little* different - PureBasic 4.0 will be free for every user registered since 1997, BlitzMax will have its price (I think at least 100 Euro / Dollar??) Long time ago, when I bought Blitz2D, one said "there will be updates forever..."

So let's take a look at a BlitzMax Demo (whenever), maybe its so fast and small and cute that it beats me!


Cold Harbour(Posted 2004) [#18]
On paper I suppose PB is better for apps, it certainly has more built in features. I have both but I use B+ almost always for my apps. B+ is by far the better programming language.

It's crippled and half finished....but it's crippled and half finished in a beautiful kind of way.

Remember, BMX isn;t going to have an event engine straight away. I think the order is something like, base BMX, 3D engine, then maybe an event engine/gui thing.

Unless someone else writes one that is. I hope they do.
Mark's dropping all the hints. He's saying, "Look I'll write all the tricky compiler stuff but I just don't have time to do everything. So I'll make it all open source so someone else can make a GUI .... and make some cash too".

Anyway I'm rambling.


Dreamora(Posted 2004) [#19]
Pluses of PB:

Free updates for lifetime. As Blitz is changing to BMax something you won't get there.

Crossplattform Windows - Mac - Linux

Types and Interfaces: Allows to simply use COM Interfaces. Sructure (types in BB+) and Interfaces support inheritance. This means no need of complicated wrapping of DLLs anymore!

Integrated DX9 residents for usage of the DX9 structures and interfaces without extra work of converting. OpenGL integration was already mentioned.

PB is not for game programming but for App programming. So the special 2D features have slowdowns ( normal sprites are fast but sprite3d with alpha and blending can become quite slow as not hardware accelerated )

Real pointers not "memory handles" like in BB+


Michael Reitzenstein(Posted 2004) [#20]
Crossplattform Windows - Mac - Linux

Oh really?


Barnabius(Posted 2004) [#21]
It's Windows, Amiga, Linux and Amiga version is quite old now...

BlitzMax will be Windows, Mac, Linux compatible.

Barney


Sphinx(Posted 2004) [#22]
http://purebasic.myforums.net/viewtopic.php?t=12461


Tracer(Posted 2004) [#23]
MacOSX version is nice.. but as the graphics department of PB will still be slow as thick dog poo in a tube, useless apart from apps.

Tracer


pantsonhead.com(Posted 2004) [#24]
I use PB for apps and Blitz for gfx oriented stuff.

Realistically they excel in different areas which I think is a good thing. Any decent programmer knows you should always use the best tool for the job. It's nice to have the choice of two excellent products.