Basic4GL (B4GL; from ''Basic for openGL'') is an
interpreted,
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
version of the
BASIC
BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming l ...
which features support for
3D computer graphics
3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for t ...
using
OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve ha ...
. While being interpreted, it is also able to
compile
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily ...
programs on top of the
virtual machine
In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized har ...
to produce standalone
executable
In computing, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instructions", as opposed to a data fil ...
programs.
It uses a
syntax similar to traditional dialects of BASIC and features an
IDE and a very thorough and comprehensive
debugger
A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its execut ...
.
Basic4GL is not designed to compete with programming languages such as
C++; it was intended to replace older languages such as
QBasic
QBasic is an integrated development environment (IDE) and interpreter for a variety of dialects of BASIC which are based on QuickBASIC. Code entered into the IDE is compiled to an intermediate representation (IR), and this IR is immediately ex ...
or
GFA BASIC
GFA BASIC is a dialect of the BASIC programming language, by Frank Ostrowski. The name is derived from the company ("GFA Systemtechnik GmbH"), which distributed the software. In the mid-1980s to the 1990s it enjoyed popularity as an advanced BA ...
.
Basic4GL features the usual commands that you would expect to find in a version of BASIC such as...
*PRINT
*INPUT
*
GOSUB
BASIC (Beginners' All-purpose Symbolic Instruction Code) is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College ...
It also includes a few features that
C programmers will be familiar with, such as support for
pointers
Pointer may refer to:
Places
* Pointer, Kentucky
* Pointers, New Jersey
* Pointers Airport, Wasco County, Oregon, United States
* The Pointers, a pair of rocks off Antarctica
People with the name
* Pointer (surname), a surname (including a li ...
,
struct
In computer science, a record (also called a structure, struct, or compound data) is a basic data structure. Records in a database or spreadsheet are usually called "rows".
A record is a collection of ''fields'', possibly of different data types ...
ures and most importantly the entire OpenGL v1.1
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
.
History
Tom Mulgrew created Basic4GL from a desire to be able to run OpenGL functions easily and quickly,
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.
[
The first version was named GLBasic,][ 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 and MD2 model.][
]
Versions
2.3.0 - Added networking capability
2.3.5 - Support for code compilation at runtime
2.4.2 - Changed sound system from OpenAL to Audiere
2.4.3 - Support for Plugin DLLs added
2.5.0 - Support for functions added
2.5.8 - Support for hexadecimal number
In mathematics and computing, the hexadecimal (also base-16 or simply hex) numeral system is a positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system representing numbers using 10 symbols, he ...
s
Platform
Basic4GL was designed to run on the Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
, but versions are being developed for Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
and Mac OS
Two major famlies of Mac operating systems were developed by Apple Inc.
In 1984, Apple debuted the operating system that is now known as the "Classic" Mac OS with its release of the original Macintosh System Software. The system, rebranded " ...
.
Basic4GL for Linux
Currently Basic4GL is being ported over to Linux. The major difference between Basic4GL for Windows and the new Linux version is that it uses the SDL library rather than Windows specific libraries to initialize an OpenGL enabled window. There is also a Linux-based project to create an extended version of Basic4GL that wraps more closely to the SDL library known a
Basic4SDL
Basic4GL for Mac
A version for Mac OS is currently under development. No working versions have been released.
Example code
Dim A
For A = 0 To 4
Printr "Hello "; A
Next
When the above code is entered into Basic4GL and executed, the following is output to the monitor screen.
Hello 0
Hello 1
Hello 2
Hello 3
Hello 4
Features
Support for sound and music
When Basic4GL was first released it could only play sounds but in 2006 support for music was added using the Open Al
OpenAL (Open Audio Library) is a cross-platform audio application programming interface (API). It is designed for efficient rendering of multichannel three-dimensional positional audio. Its API style and conventions deliberately resemble those ...
sound engine but later replaced with Audiere
Audiere is a high-level audio API. It can play Ogg Vorbis, MP3, FLAC, uncompressed WAV, AIFF, MOD, S3M, XM, and IT files. For audio output, Audiere supports DirectSound or WinMM in Windows, OSS on Linux and Cygwin, and SGI AL on IRIX.
Audi ...
.
Functions and subroutines
When Basic4GL was first released it had no support for functions. That changed however when version 2.5.0 was released in January 2008. Now Basic4GL has full support for local variable
In computer science, a local variable is a variable that is given ''local scope''. A local variable reference in the function or block in which it is declared overrides the same variable name in the larger scope. In programming languages with o ...
s, parameters
A parameter (), generally, is any characteristic that can help in defining or classifying a particular system (meaning an event, project, object, situation, etc.). That is, a parameter is an element of a system that is useful, or critical, when ...
, forward declaration
In computer programming, a forward declaration is a declaration of an identifier (denoting an entity such as a type, a variable, a constant, or a function) for which the programmer has not yet given a complete definition.
It is required for a com ...
and recursion
Recursion (adjective: ''recursive'') occurs when a thing is defined in terms of itself or of its type. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in mathematic ...
.
Plugins
In August 2006 support for Plugin DLLs 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
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
. Plugins expand the capabilities of Basic4GL and many
exist, providing such things as physics engines, TrueType
TrueType is an outline font standard developed by Apple in the late 1980s as a competitor to Adobe's Type 1 fonts used in PostScript. It has become the most common format for fonts on the classic Mac OS, macOS, and Microsoft Windows operating ...
Fonts, collision detection etc.
SourceForge
Both Basic4GL for Windows and the new Linux version have been placed on SourceForge
SourceForge is a web service that offers software consumers a centralized online location to control and manage open-source software projects and research business software. It provides source code repository hosting, bug tracking, mirrori ...
, this means that people are free to develop the languages and make improvements to them.
Basic4Games
A successor to Basic4GL is currently being developed dubbed "Basic4Games". Only one preview has been released.
See also
References
External links
*
*
*
*
*
*
{{BASIC
BASIC programming language
Video game development software