| Basic4GL | |
|---|---|
| Paradigm | Procedural |
| Developer | Tom Mulgrew |
| First appeared | 2002; 24 years ago (2002) |
| Stable release | v2.6.4 / July 30, 2017; 8 years ago (2017-07-30) |
| OS | Windows,Linux |
| License | GPL (free software) |
| Website | basic4 |
| Influenced by | |
| QuickBASIC,GW-BASIC | |
Basic4GL (B4GL; fromBasic for openGL) is aninterpreted,open source version of theBASICprogramming language which features support for3D computer graphics usingOpenGL. While being interpreted, it is also able tocompile programs on top of thevirtual machine to produce standaloneexecutable programs.
It uses asyntax similar to traditional dialects of BASIC and features anIDE and a very thorough and comprehensivedebugger.
Basic4GL is not designed to compete with programming languages such asC++; it was intended to replace older languages such asQBasic orGFA BASIC.
Basic4GL features the usual commands that you would expect to find in a version of BASIC such as...
It also includes a few features thatC programmers will be familiar with, such as support forpointers,structures and most importantly the entire OpenGL v1.1API.
Tom Mulgrew created Basic4GL from a desire to be able to run OpenGL functions easily and quickly,[1] without all of the setup normally required in a language such as c++ and be more stable. He built a virtual machine similar to one used at his workplace. It started simply, with few OpenGL functions and minimal other functionality. The first version was relatively popular.[1]
The first version was namedGLBasic,[1] which also happens to be a commercial programming language. The issue was civilly resolved, and Mulgrew's project renamed Basic4GL.
Mulgrew set himself the goal to expand Basic4GL to the point that it could load and display andMD2 model.[1]
2.3.0 - Added networking capability[2]
2.3.5 - Support for code compilation at runtime[3]
2.4.2 - Changed sound system from OpenAL to Audiere[4]
2.4.3 - Support for Plugin DLLs added[5]
2.5.0 - Support for functions added[6]
2.5.8 - Support forhexadecimal numbers[7]
Basic4GL was designed to run on theWindowsoperating system, but versions were being developed forLinux andMac OS. Meanwhile,Gambas also features an OpenGL 2.1 component, with GL bindings also available forFreeBASIC andQB64.
Basic4GL was being ported over to Linux. The major difference between Basic4GL for Windows and the attempted Linux version is that it uses theSDL library rather than Windows specific libraries to initialize an OpenGL enabled window.
A version for Mac OS was also under development. No working versions have been released.
Based on the Linux build, a project to create an extended version of Basic4GL that wraps more closely to the SDL library (not to be confused withSDLBasic).[8]
A successor to Basic4GL was also being developed dubbed "Basic4Games". Only one preview has been released.
A port of the language to theJava virtual machine.[9]
DimAForA=0To4Printr"Hello "; ANext
When the above code is entered into Basic4GL and executed, the following is output to the monitor screen.
Hello 0Hello 1Hello 2Hello 3Hello 4
When Basic4GL was first released it could only play sounds but in 2006 support for music was added using theOpen Al sound engine but later replaced withAudiere.
When Basic4GL was first released it had no support forfunctions. That changed however when version 2.5.0 was released in January 2008. Now Basic4GL has full support forlocal variables,parameters,forward declaration andrecursion.
In August 2006 support forPluginDLLs was added to Basic4GL. This means that you can write your own commands and include them in the Basic4GL programming language, all you need is a C++Compiler. Plugins expand the capabilities of Basic4GL and manyexist, providing such things as physics engines,TrueType Fonts, collision detection etc.
Both Basic4GL for Windows and the new Linux version have been placed onSourceForge, this means that people are free to develop the languages and make improvements to them.
Basic4SDL: It's mostly an OpenGL+SDL playground for 3d graphics and such... But it works on linux and stays pretty true to the BASIC syntax.
While Basic4GL has gone quiet, a port of it to the JVM, Basic4GLj is in active development.
{{cite web}}: CS1 maint: bot: original URL status unknown (link){{cite web}}: CS1 maint: bot: original URL status unknown (link)