This is now a fully native Android application, using OpenGL ES 2 for the display.
I’ve ported the OpenGL text grid and re-implemented the corresponding BASIC text functions (print, locate, cls, color etc). I can now run simple non-interactive text programs, like this maze generator which I dug out of the Basic4gl forums.
My next goal is to get some basic interactive text programs working, like the “Snake” demo. For this I need to think about how input is going to work. A lot of mobile games have an on screen d-pad/joystick and buttons for directional input and I had considered building in something similar, but I think I’ll just expose the touch input API and implement some examples in BASIC code. The Basic4GL “include” mechanism works fine for building up a library of standard functions in BASIC itself.
However adding new builtin functions introduces a new problem: Basic4GL won’t recognise them so you can’t compile and test your program. The solution will be to create a plugin DLL containing the new functions to use with Basic4GL. The functions will either do nothing or emulate the mobile functions where appropriate, like using mouse input to emulate touch input.
Last thought for now – I’m probably going to name this “Basic4GL Mobile”. I had been thinking of Basic4Mobile, or Basic4Android, but it turns out Basic4Android has already been used (b4x.com), and Basic4Mobile is too similar (imo). “Basic4GL Mobile” is a bit of a mouthful but it should be a safe bet that it’s not in use and won’t be confused with somebody else’s product.