This page describes how to create a program in Basic4GL Mobile and get it running on your Android phone or tablet.
You will need:
Click here to download the installer (free version):
Run the file and follow the prompts to install Basic4GL Mobile.
Then run Basic4GL Mobile. You should see the Basic4GL Mobile IDE.
From here you can key in a BASIC program, run it and debug it. You can also view the help files, which explain the Basic4GL BASIC language syntax, and the different commands for computation, sprite graphics etc.
It's a good idea to check everything works, by loading and running a sample program:
The snake game should popup in a second window:
If you instead get a popup saying "glfwCreateWindow() failed", then it means your graphics card or drivers are not advanced enough.
Updating your drivers may help if you're lucky.
Please note I do plan to make Basic4GL Mobile more compatible with integrated graphics
cards (depending on when GLFW adds support for creating windows in software mode - or
if I get around to patching it in myself), so keep an eye out for updates.
I apologise to anyone who is unable to use Basic4GL Mobile in the meantime.
You can play snake by left clicking and dragging with your mouse to simulate touching the screen and swiping (actually touching the screen on your PC won't do anything though, even if you have a touch enabled screen).
When you're done, close the window with the mouse or press Esc.
Click here to go to the Google Play store page:
Or search for "Basic4GL" in the Google Play store.
Install the App, and run it.
The first time it runs not much happens, because there's no BASIC program to run.
The important part is the "Please place 'program.vm' in folder:" message, and the folder to place it in. This is often /storage/emulated/0/basic4gl, but not always, so be sure to check where it is on your phone/tablet.
"program.vm" is the compiled program ready to be run on the Basic4GL virtual machine.
The Android Basic4GL App needs this, as well as any files that your program uses (like images etc - snakedemo doesn't use any though).
It's easy to create:
This is the most complicated step.
Later versions of Basic4GL Mobile and the Basic4GL Android App will connect to each other over the network and synchornise files automatically. But for now you will need a 3rd party application to transfer files over.
You need to transfer:
Other files must be placed at the same path relative to program.vm as they are on your PC, relative to the BASIC source file.
One way is to share the folder on your PC, and use an Android file explorer App that is compatible with Windows file sharing to copy the files over.
Another way is to store your BASIC program (and program.vm) in a cloud storage folder like DropBox, Google Drive or OneDrive, then use a 3rd party Android App to synchronise it with the basic4gl target folder on your phone/tablet.
This webpage describes the cloud storage method, as it is the quickest and easiest method once setup correctly.
You will need to:
Here I've configured a one way sync from my Google Drive (Basic4GL/Program sub-folder) to the /storage/emulated/0/basic4gl folder on my tablet.
I strongly recommend a one way sync, as it means that deleting the basic4gl folder on your phone/tablet won't automatically delete all the files from your cloud storage folder (which could happen with a two way sync - be very careful).
The first time the sync runs it may take a little while if you have a lot of image files in sub-folders. But after that re-syncing should be quite fast, as it only needs to transfer the changed files.
Exit the synchronisation App on your phone/tablet and run the Basic4GL App.
"snakedemo" should now be running on your phone or tablet.
As you're developing a game/program in Basic4GL mobile, you'll want to transfer it across to your phone/tablet often, to see how it runs on a mobile device.
This means recreating program.vm, re-syncing it across and then re-running the Basic4GL App.
You can streamline the process slightly by instructing Basic4GL Mobile to update the program.vm file whenever you run your BASIC program on your PC:
Now to update your BASIC program on your phone/tablet, you need only:
This process will be streamlined further in a future release.
The PC and Android Apps will be able to network directly with each other and synchronise files without needing a third party App.
Keep an eye out for updates.