Monken: SemiAutomatic BlitzMax to Monkey Converter

Monkey Archive Forums/Monkey Projects/Monken: SemiAutomatic BlitzMax to Monkey Converter

Earok(Posted 2012) [#1]
Hi all,

Announcing the first alpha release of Monken, a semi-automatic tool for porting BlitzMax projects to Monkey!

So far, it's been used to port the BlitzMax "Breakout" demo, which can be seen
here.

The download for the tool, including Monkey Source code and a tutorial for porting the Breakout demo, is available on
my site.

The tool is still in an extremely rough Alpha stage. I'm keen to get help for the project, so please let me know if you're interested in collaborating on it.


Raz(Posted 2012) [#2]
Wow, that sounds great Earok :) I look forward to having a play with it this weekend.


wiebow(Posted 2012) [#3]
I am going to test this, trying to port the component based framework Artemax to Monkey. Let's see how it goes!


Earok(Posted 2012) [#4]
Thanks guys :D have fun.

As I said before, it is still at a very rough alpha stage (about one day's worth of development). Though I'd definitely love any feedback, requests, fixes etc that you might have for it.


Neuro(Posted 2012) [#5]
This is definitely cool, gonna try it out with an old Max project from a few years ago :).


matt(Posted 2012) [#6]
I'll try it out on some of my BMX code, too.


matt(Posted 2012) [#7]
I must be doing something very wrong, as I can't get this working.

:/


Earok(Posted 2012) [#8]
Cheers Neuro,

Hi Matt, my apologies, it's likely to be my fault! What's the specific problem?

Have you ran through the tutorial?


Paul - Taiphoz(Posted 2012) [#9]
dude if you nail this , your gona instantly jump to the top of a lot of peoples favorites list's.

gona try it out as well.


Paul - Taiphoz(Posted 2012) [#10]
Could not get this to work, I tried it on a small sample of max code and even though I followed the tutorial it would not create any output in the out folder.

Have you hardwired it to only work with breakout ?


matt(Posted 2012) [#11]
Same issue for me, I tried it with my own code renamed to breakout.bmx and nothing was output to the output folder


Paul - Taiphoz(Posted 2012) [#12]
anyone had any joy with this?


NoOdle(Posted 2012) [#13]
I was wondering how the main loop could be detected? For example in Blitzmax you could have:
While Not Keydown( 1 )
how could you tell that was the main loop and not a while loop containing logic?


Paul - Taiphoz(Posted 2012) [#14]
without looking at the code, he could just look for an update and render function as their both very commonly used function names in the main loop.

are via adding a tag of some sort like 'this is main lookp or summit like that.

all that aside I would settle for getting it to work even partially :)


NoOdle(Posted 2012) [#15]
he could just look for an update and render function as their both very commonly used function names in the main loop.
less than perfect in my opinion; it would be nice to get a universal translation but there doesn't seem to be a simple solution. With user input it would be fairly easy; you tell the app which loop to treat as main.


Earok(Posted 2012) [#16]
Regarding automatic detection of the game loop, that's something I wasn't even going to try for a couple of reasons, one is that the game could have numerous game loops, the other is that there's a huge number of different ways a gameloop could look and you'd need to code for a lot of different possibilities.

My idea is to simplify the porting to the point where all you'd need to do is cut-paste the game loop into the OnUpdate section, though the idea of tagging the gameloop is a good idea. I'll give it some thought. The render loop is already taken care of automatically.

It's possible that there's some condition I hadn't thought of in your max code that's causing it to break before it saves the output, do you mind emailing me the code you're trying to convert along with media? I'll make sure it can port before releasing V0.2

earok3d at gmail dot com.


Paul - Taiphoz(Posted 2012) [#17]
I would but it's a big project and one I'm not willing to send out in source form, sorry..

I will try your code on a smaller project and see how it goes, as for tagging the meain loop it would be the best option, and with minimal effort, just parse looking for #mainloop and #mainloopend and then copy that into onupdate, you could also then parse whats inside the tags and try and convert to an appropriate loop or a generic one.

There may be a number of ways to create a loop, but they all essentially do the same thing, so if I use a while end loop, to convert it to a repeat until the programmer can then fine tune it once its actuall converted over.


NoOdle(Posted 2012) [#18]
need to be careful though, repeat and while are different.


Paul - Taiphoz(Posted 2012) [#19]
the difference is subtle tho, and easily tweaked to work with a different loop.