Blitzmax2java 'convertor'
BlitzMax Forums/BlitzMax Programming/Blitzmax2java 'convertor'
| ||
here is a little blitzmax to java convertor you may want to port your game to mobile device would using regular expressions help to improve it? its not perfect by any means, function arguments are not converted, and some other imperfections are there, e.g. FOR and NEXT You also need gldraw.java to emulate max2d which is based on my unofficial glmax2d you will need to know java to complete full conversion of a game. |
| ||
Does this alleviate the dependency on blitzmax's modules, ie convert your code to java and java handles all of the other functionality? Does java thus replace all of bmax's module functionality? |
| ||
No, he's saying it's different. Java is a different programming language and your games will be inherently limited because of Java's VM base! Because Java is inherently slower than other languages, everyone would do well to write any programs they intend to run in a Java RTE in Java, and not in a different language, so that they run as fast as possible (you're going to want them to). The difference in speed, due to abstraction, might be comparable (comparison for Linux users only) to the difference between opening a PDF with xpdf and opening the same PDF with acroread (Adobe's reader). I think you're going off on a tangent, slenkar. If you are trying to develop for mobile platforms, you might consider GLBasic. I would have went for it instead of BlitzMax, but (and don't take this the wrong way) it seems to be developed and supported almost entirely by one person. |
| ||
I think you'd find it easier to write a proper parser for BlitzMax and compile to Java using the information gained from the parser. |
| ||
Well how do you account for Java's networking or multithreaded capabilities? I'm not trying to say that your efforts don't mean anything, slenkar (if someone wants to write a complete Java parser for BlitzMax then I encourage them to do so); I just want people to be informed of what a move to Java means for them. |
| ||
Interesting Slenkar I am using BlitzMax2Mobile (my project) but instead relying on MobileProcessing as an interface for graphics, audio, Key/Touch input, fonts etc ... Java can be a royal pain to get working and you begin to realise how fussy it is. * Functions which are non-void types MUST return something (BlitzMax defaults to False if nothing is stated) * The Switch{} needs break's to split up Cases * The Java compiler complains at simple things such as using padding in values. E.g, myvar[008]=76 // *Doink* 008 causes errors A quick example of how my auto-translation is going: BlitzMAX JAVA Using gl sounds interesting. I've been wanting to avoid using MobileProcessing since its support is lacking and I would rather go straight from Max code to Java -> WTK emulation launch What are you using to compile and test your java code? |
| ||
A quick example of how my auto-translation is going: Looks intersting, Jim! Does java thus replace all of bmax's module functionality? I think 'simple' things like types, functions etc. are convertable but internal functions/types would need hard work to convert. Also i don't know whats about copyright and so on of the BRL modules?! |
| ||
Just for anyone that might find it useful. jabaco |
| ||
Jim Brown- Im using Eclipse, its slow going, my convertor isnt very good :) |