Translating from Blitzmax to Monkey (language)

Monkey Forums/Monkey Programming/Translating from Blitzmax to Monkey (language)

GfK(Posted 2011) [#1]
Hello.

I'm thinking about converting some Blitzmax games to Monkey. I appreciate that this might be an open-ended question but what pitfalls can I expect when doing this?

I'm using some third party modules for Blitzmax (ZipStream, LibXML, TimelineFX etc), which I'm obviously going to have to find alternatives for, but what else do I need to look out for? For instance, does Monkey have any form of stream support yet or do we still have to lump everything into a string and save it? Is there any target-specific stuff that's going to trip me up?

One big problem I found when playing around today is that Method onUpdate() does not work. Wasted half an hour trying to figure out why then realised that method names appear to be case-sensitive?? Changed it to OnUpdate() and everything worked. Why are they case-sensitive?? Is everything?!

So many Q's!


Tibit(Posted 2011) [#2]
Yeah everything is caseSensitive, that can be a big one when converting.

Logic in Methods, Functions usually goes pretty well from my experience.

Boxing of variables (i.e. no Var) may lead to some rewriting, tough often it results in neater code.

Performance has been an issue for me. Create as few objects in runtime as possible and I have been more lazy with this in Blitzmax than in Monkey, but this is only a problem in extreme cases.


therevills(Posted 2011) [#3]
do we still have to lump everything into a string and save it?


This ;)

Is there any target-specific stuff that's going to trip me up?


Sound! The different targets have different sound formats...

Why are they case-sensitive?? Is everything?!


Because case-sensitive IMO is better... is eveything mostly - keywords like "if" are not.


wiebow(Posted 2011) [#4]
Hi GfK,

Yes, this can be confusing. A lot of the Java rules seem to apply for Monkey now. I learned a lot of how to work with monkey by checking out Java for a time.