blitz max and monkey x

BlitzMax Forums/BlitzMax Beginners Area/blitz max and monkey x

yossi(Posted 2014) [#1]
what are the advantages and disadvantages of blitz max compare to monkey x for desktop development ?


Henri(Posted 2014) [#2]
Hello, here are some thoughts on subject.

Advantages:

1. Blitzmax has faster building system meaning quicker testing

2. Blitzmax has better GUI support in a form of MaxGUI and wxMax, and also has more variety in 3rd party modules. Database module is one that I use frequently

-------------------------------------------
Disadvantages:

1. Blitzmax deveplopment has somewhat halted in favor of MonkeyX, so eventually MonkeyX will reach/surpass Blitzmax (probably)

-------------------------------------------
Conclusion:

At this stage Blitzmax is better suited for desktop development


-Henri


dawlane(Posted 2014) [#3]
Monkey-X(aka Monkey) has the advantage that is doesn't rely on a custom built binary compiler that targets only one CPU architecture (technically two with PPC but does any still use old Apple Mac?). Monkey on the other hand generates compiler specific code (e.g. C/C++/java/javascript/Flash) which intern is passed to the systems own compiler tool chain if installed. This means with the right know how, you can compile your code to other CPU architectures or operating systems if the necessary libraries are present.

It fails on a number of things virtually for the same reason of the fact it has to target a number of devices.
1) There is no official GUI widget support.
2) For a number of devices you can only use GLFW (OpenGL) and OpenAL. For Window desktop you do have the option of using XNA, but other wise it doesn't use DirectX directly. I not sure but Playstation Mobile target I think is OpenGL.
3) Anything that's missing you will have to implement yourself.

At the moment BlitzMax is better for desktop development for Windows and for the time being OSX. Linux requires you to jump through a few hoops and many more hoops if you are using a 64bit distribution. Look through the Linux Discussion section for an idea.


degac(Posted 2014) [#4]
For me Monkey-X is better if you want to target mobile devices (Android, iOS, WP) or web (this includes mobile devices again...) with HTML5 and Flash.

For desktop BlitzMax is better, tested and with a full range of possibilities (many modules, OpenGl, DX7/9 or DX11, 3d engines, databases, SSH and so on... just check Brucey's modules to see what could be done).

Personal opinion: I will keep Monkey-X ONLY for mobile/internet, while BlitzMax for desktop Win/Mac/Linux... creating a 'multi' target device/environment ask to make 'sacrifices' (just think to open/read a file: it depends on target, devices & OS).


ImaginaryHuman(Posted 2014) [#5]
Lots of really useful modules for BlitzMax are not available on Monkey. Also Monkey doesn't support some language things like pointers, which I use quite often in Max. Also not sure about things like multithreading?


yossi(Posted 2014) [#6]
since for now I only interested in desktop development I will stick to blitz max.


Grisu(Posted 2014) [#7]
Good decision! BlitzMax is useful for that.


ziggy(Posted 2014) [#8]
As long as Monkey can compile to BlitzMax, you can expose any BlitzMax module to monkey and have the best of both. Monkey as a language (I'm not talking about modules) is far superior to BlitzMax as it has Overloading, Generic, Interfaces and nicer modular encapsulation of code.


Oddball(Posted 2014) [#9]
I'd have to disagree with Henri here. It may have been true in the past that BlitzMax was better for desktop, but monkey x has now come far enough to be on a par with BlitzMax for desktop, with the added advantage of being future proof.


Henri(Posted 2014) [#10]
I like the idea behind Monkey, and the language structure seems more in unison to other popular languages, BUT...to me it seems more game oriented and the lack of official GUI is a big minus for desktop developer. Looking at Monkey roadmap, there isn't going to be one in a while.

-Henri


Derron(Posted 2014) [#11]
@overloading, generics, interfaces

Why should I need them (ok, convenience) as during "export to blitzmax" that features just get replaced with things I could achive using Blitzmax too ?

Do not misunderstand me here... convenience is good and I would like to have things like overloading in Blitzmax, but it isn't really needed, it is just to have a coder feel more welcomed as he does not have to care for the given parameters. Move(x,y), Move(pos), ... is nice but a Move(x,y), MovePos(pos), ... is also a thing which feels "natural".


Sure you can have some kind of prototype, export to blitzmax, include some blitzmax-only-modules and code around it... ahh yes (if I understood correctly what you wrote).

Currently I use: libxml and maxlua + reflection + gnet-modded-networking. How easy is it to expose current code to a lua script to make moddable AI/behaviour possible ?


Sure "Monkey-X" is of interest for me... especially with the "blitzmax is dead"-discussions around in the forum, but I doubt that it can compare with BlitzMax in the _current_ state.


bye
Ron


ziggy(Posted 2014) [#12]
Sure you can have some kind of prototype, export to blitzmax, include some blitzmax-only-modules and code around it... ahh yes (if I understood correctly what you wrote).
No, I was not saying this. I was saying you can expose all modules to Monkey and code all in monkey and not even touch a single BlitzMax line. Interfaces and Generics (not only overloading) allows for a better coding paradigm (in my honest opinion http://en.wikipedia.org/wiki/Interface-based_programming ) and Monkey does also have Properties. Also, the language-wise modular nature of Monkey is, in my opinion, better than the BlitzMax one. I love BlitzMax becouse of how mature it is and the amount of available modules, but as a language, Monkey is way better.


Derron(Posted 2014) [#13]
Could you elaborate a bit concerning "exping modules to monkey". Let's assume I want to use MaxLUA - how to do this?


bye
Ron


dawlane(Posted 2014) [#14]
Derron I think I know what ziggy means. As BlitzMax modules get compiled to libraries. You should be able to link them the same way as any other library as long as the functions are exported. It would then just the a case of writing a bit of Monkey wrapping code and adding the library to the link process. Would be worth exploring this avenue for desktops, but could cause problems if you want to port code to 64bit CPU's and other devices.

Edit: Thought thinking about it. It could be problematic or impossible if those libraries are tied closely to the BlitzMax core libraries.


ImaginaryHuman(Posted 2014) [#15]
But if you expose blitzmax modules to monkey and compile monkey code into blitzmax code then you're limited to the platforms blitz supports plus no future-proof.


Yasha(Posted 2014) [#16]
If you stick cleanly to the module interface then the future-proofing status of BlitzMax is a nonissue, as long as someone is working on a portable version of the module. The nature of a compiled target has no implications, good or bad, for the future of portable code currently compiled to that target, any more than compiling to ARM suddenly prevents you from compiling to x86.


ziggy(Posted 2014) [#17]
Could you elaborate a bit concerning "exping modules to monkey". Let's assume I want to use MaxLUA - how to do this?

You could create a blitzmax file that imports maxlua and import that file to monkey by using:

Import "myfile.bmx"

That's all AFAIK. Then I think you should create any class in monkey and any method and tell what are the corresponding classes on blitzmax.
Extern 
Class MyClass Extends Null="MyBmxClass"

	Method Length:Int() Property="length"
	
	Method Compare:Int( str:String )="compare"

	Method Find:Int( str:String,start:Int=0 )="find"
	Method FindLast:Int( str:String )="findlast"
	Method FindLast:Int( str:String,start:Int )="findlast2"
	
End
Public

the literals just correspond to the class and classmembers names in the target language. the good thing is that this does not create any kind of glue code. It just tells Trans (the monkey compiler) how to translate things to the target language.