Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

GLBasic

From Wikipedia, the free encyclopedia
Commercial BASIC programming language
GLBasic
GLBasic 8
DeveloperDream Design Entertainment Software
Stable release
15.004 / August 4, 2017; 8 years ago (2017-08-04)
Preview release
15.238
Operating systemWindows
PlatformWindows, 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
TypeCompiler
License2D 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
Websitewww.glbasic.com

GLBasic is a commercialBASICprogramming language that can compile to various platforms includingWindows,Linux,Mac OS X, and somehandheld devices. The language is designed to be simple and intuitive.

Overview

[edit]

GLBasic started as aninterpreted language with2D commands (GL stands for Graphics Language). It now uses theGCCcompiler for many different platforms to achieve fast,native code results. The GLBasic precompiler "GPC" converts the simple BASIC language intoC++ code and compiles it later. Thus, the user can extend GLBasic using the INLINE command to mixC/C++ code directly with GLBasic source code. Due to this, GLBasic can easily access third-party dynamic libraries on all platforms.The GLBasicSDK comes with anIDE,debugger, and a graphics engine built onOpenGL (orOpenGL ES) for the platformsWindows,Linux,Mac OS X,iOS, andWebOS. For handheld devices (Windows Mobile,GP2X, andGP2X Wiz), GLBasic uses its own close-to-hardware routines for fast graphics.

To compile for theiPhone oriPad, you will need aniMac (on which to compile the generated code - to comply with Apple's requirements) and the latest version ofXcode, 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 iPhoneApple Developer Connection.

Since the release of the 8.054 beta, it became possible to compile for theOpen 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 thePalm Pre without additional hardware or developer program membership requirements. Support for theHP TouchPad was added in September 2011 via a web-update.

Version 10.057 added support to build application packages running onAndroid devices.

GLBasic comes with numerous examples.

Online publication

[edit]

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

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

ForAndroid there is a one-time fee of US$25. Apps published viaGoogle Play Store 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 theIntel AppUp Centre SDK is also available for GLBasic.

Features

[edit]

GLBasic has the following features:

General

[edit]
  • Programs are written in BASIC.
  • String and numbers are automatically converted between types.
  • Arrays can be a fixed size or dynamic.
  • Sound, graphics and data can be compressed into a single file.
  • Users can define their own types. Types within type anddynamic arrays are allowed.
  • C code can be included by putting appropriate code between a starting and ending command, or can be included during compilation. In addition, for Windows, functions within DLLs can be called.
  • A few features are only available in PC format.
  • Programs for the iOS can use OpenFeint.

3D features

[edit]
  • The 3D engine is simple to use and maintains fast processing of objects
  • Objects can be animated
  • Works with most of the common 3D formats
  • Objects can have shadows
  • An Entity System is available as a free open source library package

2D features

[edit]
  • Sprites can be rotated and scaled and take account of blending and tinting values.
  • Lines, filled rectangles, and other shapes can be drawn.

Network features

[edit]
  • TCP/IP and UDP/IP sockets are available, as well as a higher-level library built atop the IP-sockets.

Compiler

[edit]
  • The compiler is cross-platform. You do need an Intel Mac to compile the generated iPhone code though, as per Apple's legal requirements.

IDE

[edit]
  • The editor is Windows only, but can run at a decent speed in most virtual machines. WithWine though, you can only compile for windows. Crossover/Mac support is given since version 10.
  • A third-party editor for the Mac is being worked on.

GUI system

[edit]

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

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

Versions

[edit]

GLBasic has gone through the following revisions:

  • Version 1.2 - The first version of GLBasic (also known as The DiNGS Game Basic sequel) (2000)
  • Version 2.4 - This introduced PocketPC support
  • Version 3.0 - (Codename: Behemoth) added TYPEs
  • Version 4.0 - Introduced the ability to interface with Window's DLLs and introduced compiling for the Xbox (if Linux is installed on it). It should also run on standard Linux, although there is no hardware acceleration, so programs run much slower. (2007)
  • Version 5.0 - Introduced compiling for the Apple Mac as a Universal application
  • Version 6.0 - Introduced integers into GLBasic for the first time. Previously variables could either be floating-point or strings (December 2008)
  • Version 7.0 - Introduced the ability to compile for Apple iPhone and iPod Touch devices. (August 2009)
  • Version 8.2 - Now free for non-commercial Projects, supports Open Pandora platform, iPhone/iPad support (August 2010)
  • Version 9.0 - Introduced the ability to compile for Palm WebOS (Palm Pre, Palm Pixi). (March 2011)
  • Version 10.057 - Introduced the ability to compile for Android
  • Version 10.109 - Added support forWebOS pads like the HP TouchPad
  • Version 11.0 - Added HTML5 support
  • Version 12 - Improved HTML5 port, native GUI library (January 2014)
  • Version 14* - Other platforms now installed as plugins, PRESCALER, improved debugging (August 2015) *skipped v13
  • Version 14 - Update: introduces support for IPv6 in network commands, libPNG updated (October 2016)
  • Version 15 - "Unicorn", Improved debugging options, adds True Type Fonts (November 2017)
  • Version 16 - Available throughSteam, renewed C++ compiler, Windows x64 support (March 2019)

Sample code

[edit]

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 renderingSHOWSCREEN// wait for a key to be pressedKEYWAIT

Limited object-oriented scope

[edit]

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

[edit]
 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 can encrypt and decrypt strings using 128-bitBlowfish.

The future

[edit]

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

[edit]

References

[edit]
  • This article is based on content taken fromGP2X wiki, which is available under the terms of the GFDL.

External links

[edit]
Dialects of theBASIC programming language (list)
Classic
Microsoft
Texas Instruments
Hewlett-Packard
Locomotive Software
Microcomputers
Minicomputers
Time-sharing computers
Other
Extenders
Procedure-
oriented
Proprietary
Free and
open source
Withobject
extensions
Proprietary
Free and
open source
RAD
designers
Proprietary
Free and
open source
Defunct
C,C++
Open source
Freeware
Retail
Discontinued
Java
Open source
Freeware
Retail
Discontinued
JavaScript
Open source
Haxe
CLI (.NET)
Open source
Freeware
Retail
Discontinued
Flash
PHP
Open source
Proprietary
R
Python
Open source
Proprietary
Pascal,
Object
Pascal
Open source
Freeware
Retail
Discontinued
BASIC
Open source
Freeware
Retail
Discontinued
Go
Open source
Freeware
Retail
Eiffel
POP-11
Online
Retrieved from "https://en.wikipedia.org/w/index.php?title=GLBasic&oldid=1185152154"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp