Reasons BlitzMax rules

BlitzMax Forums/BlitzMax Beginners Area/Reasons BlitzMax rules

JoshK(Posted 2006) [#1]
I have come to the conclusion that BlitzMax is really awesome. Here's why:

Interacting with external libraries is now a snap. If you use OpenGL or WinAPI, this will make it much easier. You no longer have to use a lot of banks or wrapper dll's, and the function pointer implementation is much better than PureBasic's.

The new types system is really flexible and fun. You can do things like entity.position.x, something I have wanted for a long time, since I came across it is MaxScript. The OOP stuff might seem a little weird in theory, but when you start writing your program, it just falls into place. Just start writing your program like you normally would, then add some common classes whenever you see a use for them. Don't go overboard with the extended classes, just use them when and if they are convenient.

The IDE is much better. It is better at stopping a runaway program. When you select multiple lines of text and indent, the bottom line is no longer missed. You can lock the current build file, so that every time you compile, that file will be run. This is like having a project file, but without all the extraneous BS.

The new pixmap class makes it much easier to manipulate image data, and to convert it to an OpenGL texture. Unlike the old RGB Blitz images, pixmaps give you access to alpha values.

It really is quite good.


JoshK(Posted 2006) [#2]
Also:

You can use REM and EndREM to comment out a block of text.

You can set a function to be called when the program ends or crashes. If you use a program log, this will close the file so that you can see where the error occured, even if you aren't running in real debug mode.


EOF(Posted 2006) [#3]
My personal favourite things are:

* SuperStrict
Helps me to be a more disciplined coder

* Frameworks / Modules
Create nice small applications and only include the stuff you need. Also, updates and fixes are likely to be more regular since Mark/Simon only need to upload the new module and we can SyncMods to get the stuff.

Having the BRL modules to play with also lets you see whats going on under the hood.

*OOP
Yup, entity.position.x makes far more sense than entity\position\x
You can avoid using a lot of the BlitzMax 'wrapped' functions and go OOP too:
panel:TGadget=CreatePanel(blah)
panel.SetLayout 1,1,1,1
*Shortcuts
No more spaceship.Xpos=spaceship.Xpos+50
You can now do spaceship.Xpos:+50


CS_TBL(Posted 2006) [#4]
not to mention:
- INCBIN
- eventhooks

These 2 are the most useful to me, in combination with types 'n methods, and local+dynamic arrays.


EOF(Posted 2006) [#5]
Oh, and another neat thing about the IDE, you can code directly in C and compile the results.
Just "Save As" and give the code a *.c extension before you do.

Forgot to mention this one:
' Slicing

Local a$="The cat sat on the mat"
Print a[..7]		' "The cat"
Print a[12..14]		' "on"
Print a[19..]		' "mat"



semar(Posted 2006) [#6]
The module concept comes also very handy; you can easily add new functions to the whole language, and use it in every project. You can then share the module in an open-source way if you like - that is, giving out the source .bmx file - or just share a compiled module preserving the source.

Another nice thing is that you can continue to code in the standard fashion - I mean, without OOP; and later, open your mind and use the object-oriented capabilities provided.

Without to mention that BlitzMax can also make DLLs.

Yes, BlitzMax is a very nice piece of cake. And the 3D module will be the cherry on the top of it !

Sergio.


hub(Posted 2006) [#7]
it's a real pleasure to code with bmax.


Dreamora(Posted 2006) [#8]
semar: You are not allowed to make DLLs without a special license. This was discussed on an other thread and means normally that you break the license under which you bought BM ie you might lose your license


Damien Sturdy(Posted 2006) [#9]

semar: You are not allowed to make DLLs without a special license.



WHAT????


semar(Posted 2006) [#10]
semar: You are not allowed to make DLLs without a special license. This was discussed on an other thread and means normally that you break the license under which you bought BM ie you might lose your license

Ouch, I didn't know that. Could you please provide a link to the thread you refer ?

Could we have an official answer about this topic ?

Sergio.


Yan(Posted 2006) [#11]
http://www.blitzbasic.com/Community/posts.php?topic=53607&hl=make%20DLL


N(Posted 2006) [#12]
Could we have an official answer about this topic ?


I asked and got an official answer. Making a DLL with BMax is off limits. When I inquired in private about a license I was told that they would not provide a license (basically, because BlitzMax can't handle making DLLs that work properly -- much like how threading is borked too). So if you want to make DLLs, get a different language.


JoshK(Posted 2006) [#13]
I was told that a special license was possible, but that BlitzMax was probably not a good language to use to compile a dll.

I think they mostly don't want someone making a wrapper dll and licensing it.


N(Posted 2006) [#14]
That and this:

I did manage to talk with Mark this week about dll support.

The problem is in my mind the garbage collector is used to
managing things from the bottom of the call stack so I think
you need to manually initialize and collect from the main of your C application.
He said something about locks on every call
but that sounded a bit heavy handed...

There are likely other gotchas and I sure don't want to be
responsible for any more twisted panties so like threading
and trashing gl texture states without restoring them when
sharing with glmax2d, we don't currently advocate building runtime libraries.


Quoted from an e-mail from skidracer.


bradford6(Posted 2006) [#15]
twisted panties could be a good thing.

in the spirit of cross platform programming DLL creation should not be that much of a big deal anyway.

There are so many great Gnu-Like licensed cross platform libraries that do what 99% of us need right now and on MAC/Linux/Win32:

LUA
ODE
OPENGL
OGG
ZLIB


am i missing the boat here?


puki(Posted 2006) [#16]
Yeh, but you have to admit that B3D is cuter than BMax.


Perturbatio(Posted 2006) [#17]
Yeh, but you have to admit that B3D is cuter than BMax.

B3D is the wrinkly old man that sits in the corner at pubs.
Occasionally, old friends come over to say hello, casual acquaintances nod as they pass, but the rest of the world moves on.

It has the experience, but lacks the acuity to articulate it.


MrCredo(Posted 2006) [#18]
currently the IDE ia a nightmare - here is a way to use scintilla-library. And this library is much better -> folding, ultra-fast highlighter and "loader" and more...

And i do not see any innovations in the IDE. i posted ideas on mass. long time ago i started such IDE with blitzplus - but this richedit is so slow (and it is also slow in blitzmax) - so that i canceled my project...

currently i use scintilla for another project (not IDE) - and i like it - it is so fast

another part at the moment that i dislike is: unfinished modules. i miss many tree-list-functions. i miss few 2D-graphics commands...



but... blitzmax is better than at the beginning - with this automatic garbage-collector... here are now more modules... blitzmax is fast and easy...


ImaginaryHuman(Posted 2006) [#19]
I like that BlitzMax works on the Mac! Plus has OpenGL which is cool.

I also like how mature it is now compared to the original BlitzBasic, which was great but limited.

It seems to have a lot of flexibility and well thought-out ways of doing things.

I think it is undermarketed, but it seems to be going well so far.


CoderLaureate(Posted 2006) [#20]
If you want code folding check out Blide.

I like the speediness of the language. The OOP could be a little tightier, but, it is an excellent example of an object oriented version of the BASIC programming language none the less.

The lack of Method overloading is (IMHO) a terrible oversite. I use it all the time in C# it's quite handy. Also, interfaces would be a nice to have, but not necessary (we have the Abstract modifier that almost acts like an interface.

Overall, I love the language for it's the expandability, and speed. Who needs DLL's anyway? Modules work just fine. I also wish it had thread safe multi-threading, but there are ways around that as well.

OH! Let's not forget about the cross platform compatability. I own a Mac and a PC and I love the fact that the source code can be edited on either box.

-J9t


Pineapple(Posted 2006) [#21]

The lack of Method overloading is (IMHO) a terrible oversite



I got slated on another thread for saying BlitzMax should have overloading... I overload methods in C++, and it's a pretty useful feature!

Dabz


CoderLaureate(Posted 2006) [#22]
It's a handy way of keeping your methods organized.


Koriolis(Posted 2006) [#23]
Also, interfaces would be a nice to have, but not necessary (we have the Abstract modifier that almost acts like an interface.
In my mind interfaces are muh more needed on the contrary. Overloading is just a handy syntactic sugar that can make code clearer *if used correctly and with parcimony*.
But nothing like Java interfaces can't really be achieved in BlitzMax. Without multiple inheritance, the Abstract keyword will only let you have a class implementing a *single* interface (aka abstract class). There's no way you can have a single class adhering to 2 distinct interfaces.
So on one side you have a missing syntactic sugar, and on the other side a missing feature that cannot be simulated without huge kludge.
Let's be clear, I'd like that to have that syntactic sugar too.


Pineapple(Posted 2006) [#24]

It's a handy way of keeping your methods organized.



Exactly... One Identifier, multiple use's! :)

Dabz