Basic4GL
   HOME

TheInfoList



OR:

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 ...
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 th ...
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 hardwa ...
. While being interpreted, it is also able to
compile 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 ...
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 hardw ...
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 instruction (computer science), instructi ...
programs. It uses a
syntax In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituency) ...
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 software testing, test and debugging, debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the pr ...
. Basic4GL is not designed to compete with programming languages such as
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
; 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 BAS ...
. 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 in ...
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 l ...
,
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 typ ...
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 (computing), interface, offering a service to other pieces of software. A document or standa ...
.


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 GLBasic is a commercial BASIC programming language that can compile to various platforms including Microsoft Windows, Windows, Linux, Mac OS X, and some handheld devices. The language is designed to be simple and intuitive. Overview GLBasic star ...
, 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 Numeral system#Positional systems in detail, positional numeral system that represents numbers using a radix (base) of 16. Unlike the decimal system ...
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 serv ...
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
, 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 ...
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 "M ...
.


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 sound engine but later replaced with Audiere.


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 (programming), variable that is given ''local scope (programming), scope''. A local variable reference in the subroutine, function or block (programming), block in which it is declared overrides ...
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 comp ...
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 mathematics ...
.


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 sy ...
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, mirrorin ...
, 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