GLBasic

GLBasic

GLBasic 8
Developer(s) Dream Design Entertainment Software
Stable release
12.312 / January 4, 2014 (2014-01-04)
Operating system Windows
Platform Windows, Intel/PowerPC Mac, Linux (and Xbox Linux), OS-X, Pocket PC, GP32, GP2X/GP2X Wiz, iPhone, iPad, Palm Pre/Pixi, HP WebOS devices (HP TouchPad, Pre2/3, Veer), Open Pandora, Palm Pre 2/Tablet, Android
Type Compiler
License 2D Free version for Windows, Mac and Linux (can also be used to compile time-limited versions for other supported platforms), Commercial version, Free School Version
Website www.glbasic.com

GLBasic is a commercial BASIC programming language that can compile to various platforms including Windows, Linux, Mac OS X, as well as some handheld devices. The language is designed to be simple and intuitive.

Overview

GLBasic started as an interpreted language with 2D commands (GL stands for Graphics Language). It now uses the GCC compiler for many different platforms to achieve fast, native code results. The GLBasic precompiler "GPC" converts the simple BASIC language into C++ code and compiles it later. Thus, the user can extend GLBasic using the INLINE command to mix C/C++ code directly with GLBasic source code. Due to this, GLBasic can easily access third-party dynamic libraries on all platforms. The GLBasic SDK comes with an IDE, debugger and a graphics engine built on OpenGL (or OpenGL ES) for the platforms Windows, Linux, Mac OS X, iOS and WebOS. For handheld devices (Windows Mobile, GP2X and GP2X Wiz), GLBasic uses its own close-to-hardware routines for fast graphics.

To compile for the iPhone or iPad, you will need an i Mac (on which to compile the generated code - to comply with Apple's requirements) and the latest version of Xcode, which is a free download from the Apple website.

To be able to actually run the program on an iPhone or iPad (GLBasic programs will not work on the emulator), you need to be a member of the iPhone Apple Developer Connection.

Since the release of the 8.054 beta, it became possible to compile for the Open Pandora machine as well. However, with the lack of Windows programming tools half of the compiling process is performed on Windows, and the other half on the actual machine. Since version 10, the IDE directly builds packages on Windows for the Pandora.

Version 8.230 and above can compile for the Web-OS devices like the Palm Pre without additional hardware or developer program membership requirements. Support for the HP TouchPad was added in September 2011 via a web-update.

Version 10.057 added support to build application packages running on Android devices.

GLBasic comes with numerous examples.

Online Publication

Apps created with GLBasic can be uploaded to the Apple App Store, Google Play, and HP's App Catalog; all of which require a developer account. Costs to the developer and pre-publication review level depend on the publisher used.

For Apple iOS the iOS Developer Program costs 99 USD per year. All apps published on the app store are required to undergo a two-week, review-and-approval process prior to publication.

For Android there is a one-time fee of 25 USD. Apps published via Google Playstore are not subject to an approval process and are immediately available to the public.

Publishing via HP's App Catalog requires a free account. Apps placed for sale through HP's App Catalog undergo a five-day review process before publication.

A wrapper for the Intel AppUp Centre SDK is also available for GLBasic.

Features

GLBasic has the following features:

General

3D Features

2D Features

Network Features

Compiler

IDE

GUI system

GLBasic comes with the source code to DDgui, an easy-to-use GUI system, allowing all supported platforms to have the same look at feel across all platforms.

For Windows, Linux and Mac GLBasic has ported a Tcl/Tk wrapper that offers a native OS look.

Versions

GLBasic has gone through the following revisions :

Sample code

Hello World

// this is a comment
// Print "Hello World" to the screen position 0,0 (top, left)
PRINT "Hello World", 0,0
// swap backbuffer and visible screen, prepare backbuffer for next rendering
SHOWSCREEN
// wait for a key to be pressed
KEYWAIT

Limited Object Oriented Scope

With Version 8, GLBasic added basic object-oriented commands to the TYPE command. This allows structures to access itself (using the 'self' command) and to have functions within TYPEs

Simple OOP Test

 TYPE Tvec
  x;y;z
  FUNCTION null:
   self.x = 0; self.y=0;
  ENDFUNCTION
  FUNCTION add: v AS Tvec
   INC self.x, v.x
   INC self.y, v.y
   INC self.z, v.z
  END FUNCTION
 END TYPE
 LOCAL vec AS Tvec, vec2 AS Tvec
 vec.null()
 vec.x=50
 vec2.x = 100
 vec.add(vec2)

Version 8 also has the ability to encrypt (using 128-bit Blowfish) and decrypt strings.

The Future

Due to the author having problems with ARM64 iOS compilers, various other problems and insufficient time to update the software, the source code (and the forum post about it) was made to those forum members who had a post count of at least 100. The download weighs in at around 2.5 GB compressed.

See also

References

External links

This article is issued from Wikipedia - version of the 11/27/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.