![]() | ![]() |
Basic4GL is a free BASIC programming language for Win32 platforms with built in OpenGL v1.1 support. Basic4GL is a compiler and virtual machine, using a easy, simple syntax based on traditional BASIC. It is designed to be an easy to learn, easy to use language for writing games, 3D demos and utilities without all the setup hassle associated with most language compilers.
Basic4GL is built around the OpenGL 3D accellerated graphics library. It automatically handles such tasks as creating an OpenGL window and initialising OpenGL for you, so you can skip all the usual linking, header file and initialisation and start writing OpenGL code from line 1.
For example, here's a complete, working OpenGL program in Basic4GL
glBegin (GL_TRIANGLES)
glVertex3f (0, 10, -30)
glVertex3f (8, -4, -30)
glVertex3f (-8, -4, -30)
glEnd ()
Basic4GL comes with a number of Nehe tutorial programs (converted to Basic4GL format).
Vectors and matrices are integrated directly into the Basic4GL language as 1D and 2D arrays respectively. Mathematical operators such as multiplication (*) and addition (+) behave appropriately on vector and matrix types, so you can write vector and matrix notation algebra directly into your programs.
You also get a standard library of trig functions and matrix creation routines (designed to mirror OpenGL's matrix creation routines), which makes trigonometry calculations quick, easy and compact to implement.
If you don't feel like writing OpenGL code or you just want to write some 2D sprite based games you can try Basic4GL's 2D sprite and tile engine. Use it to create 2D side scrollers, shoot-em-'ups, and animations without writing a line of OpenGL code.
Once you've written your masterpiece, a few clicks will turn it into a stand-alone Windows executable file which you can distribute to whomever you want.
The Basic4GL programming language is designed to be simple, flexible and very hard to crash! Run-time errors (such as array index out of bounds) are caught cleanly, and all resources (such as textures or file handles) are automatically cleaned up for you when the program finishes.
All editing takes place within the Basic4GL built in IDE, consisting of a syntax highlighting editor and a full symbolic debugger.
Basic4GL compiles and runs your changes in an instant, so you can tweak and experiment until you're completely satisfied (without having to reboot each time ;) without ever having to leave the Basic4GL programming environment.
Basic4GL isn't my day job! It's an application written in my own time because I felt like it.
As such it's not designed to compete with commercial products, a few of which are linked to on the right for your consideration. It doesn't compile to native machine code, and Basic4GL is definitely not going to be the next C++!
Basic4GL is intended as a replacement for the old, free, beginner friendly, BASIC languages like QBasic/GWBasic that made programming accessible and easy to get into, but upgraded with some modern features to keep it up-to-date and interesting.
Basic4GL has come a long way, and a huge part of this is due to the support, suggestions, criticisms, code and tutorials contributed by users. To everybody who has helped out, thank you!
There are a number of ways you can help make Basic4GL a better program for everyone:
dim age
input "How old R U"; age
print "You said "; age