About Monkey 2 › Forums › General Programming Discussion › Transition from blitzmax to monkey 2?
This topic contains 4 replies, has 4 voices, and was last updated by
Yue 1 year, 10 months ago.
-
AuthorPosts
-
June 10, 2017 at 4:42 am #8565
I use what I learned in BlitzMax, or I have to start again with Monkey 2 ?, The learning curve applies something similar to objects, in such case if I understand blitzmax, I will be easy to learn Moneky 2 ?. Greetings.
June 10, 2017 at 6:45 am #8567There are many language similarities but also some differences that could cause confusion.
Most of BlitzMax’s language concepts have direct Monkey2 equivalents (eg Functions, Objects, Methods, Globals, Locals, Interfaces, Pointers, Modules, Public, Private, etc) but Monkey2 also has additional concepts (eg Interfaces, Virtual Methods, Abstract Classes, Enumerated types, Operator Overloading, Fibres, Structures, Lambda Functions, etc).
You can structure your own code to not use those additional language features, and therefore convert standard object-oriented BlitzMax code quite easily to equivalent Monkey2 code. However, some of Monkey2’s modules make extensive use of the additional language features and require at least a passing understanding of how they work.
A good example is MojoX, Monkey 2’s GUI module. It is quite different than MaxGUI.
So, yes, you can use much of what you learned in BlitzMax – you won’t have to start again. But you will need to build upon that knowledge…
June 10, 2017 at 6:48 am #8568I think you’ll find that there’s a lot less different then you might think. It’s a bit more strict in its syntax but that’s not necessarily a bad thing. I would suggest to download it and take a look at some of the examples to start with.
June 10, 2017 at 7:12 am #8572Main differences:
1. you need a Main() function and some ‘standard’ Methods (depending on what type of app you need)
2. syntax is case sensitive
3. List, Maps etc must be type-specific (List<MyType>)
4. superstrict & beyond
5. many things are equivalent (syntax)
6. array & splicing a little different
7. less immediate than Bmax (open IDE – write a simple Print – hit F5)
8. lack of a OS GUI
9. filesize (but I think it can be optimized)June 11, 2017 at 3:26 am #8605Thank you so much for the comments. I am happy to know that what I learned will serve as a platform to move to monkey 2, where the great motivation is 3D. For now I will continue, in my epic battle of creating a small video game. Best regard.
-
AuthorPosts
You must be logged in to reply to this topic.