The Game Creators
The Game Creators Home Online Shop Click to Login
 
DarkBASIC Professional
Order Online
Hands on DB Pro
International Sites
Brazilian DarkBASIC Professional site Brazil
French DarkBASIC Professional site France
German DarkBASIC Professional site Germany
Italian DarkBASIC Professional site Italy
Japanese DarkBASIC Professional site Japan
Newsletter
Issue 82 is out now
The Game Creators Newsletter
Get our free newsletter
Forums
Join thousands of game developers in our forums and read over 1.4 million messages
Free Software
Download a free version of FPS Creator
Twitter
Keep up to date with all the latest events at The Game Creators
Programming
GBN
Dark Game Studio
Get Firefox!
Unity - The DarkBASIC Scripting Pack

The Unity scripting pack takes your DarkBASIC Professional games to the next level. Unity marries the commercially used Lua scripting language with DarkBASIC Professional. Order Now

What is Unity?

Unity is a Third Party Command set that allows your DarkBASIC Professional games to utilise the Lua scripting language in your games. Lua has been used in the games industry for years - and its users include, but are not limited to:

  • Blizzard - Warcraft III
  • Bioware - Baldur's Gate
  • Lucasarts - Grim Fandango
  • Crytek - Far Cry
  • Sierra - Homeworld 2
  • Electronic Arts - Various Projects

The industry has been using it for years - now it's your turn. The uses of Unity are not limited to scripting. The plugin can also be used to:

  • To load structured files (for example save games) quicker and easier than before
  • To replace DarkBASIC Professionals arrays - Lua provides you with arrays that grow, shrink, order and shuffle on demand. You can also use strings as array keys, instead of just numbers
Learn about Unity

Click a link to jump to that section:

Beginner - What is scripting?
Intermediate - How do I use the plugin?
Advanced - What are the technical specifications?

What is scripting?

In most games, all media (for example, textures and models) are located outside of your program file. Normally only game logic is held within the actual EXE file. By using scripts, you can abstract core game logic and actions, such as the code that makes a noise when a certain level is loaded, or code that makes a certain character speak when you start the game, and place these pieces of logic in text files, called scripts, outside of your main application. When you're ready to use that bit of code, you simply load the script and the code is executed.

As an example, consider when you load a level. In some cases you may want a cut-scene to play, in others you may want a voiceover to sound, or perhaps you may want the player to only start with a certain weapon. If you coded this game with standard procedural code you would end up with a lot of IFs or similar conditional statements in your code - and things would quickly spiral out of control. Wouldn't it be easier to have a simple script file that loaded and executed when the level starts? Something like the following:

PlayCutscene("lev-03")
GiveWeapon(Player,Guns["AK47"])

Right now this might sound like something you could achieve using functions and external DBA files in DBPro - the difference is that Lua is an entire language all in itself. Designed from the start to be a tiny and simple language it offers programmers extensibility. Lua scripts run in a safe environment, have automatic memory management, and powerful string and dynamic data handling features. Consider it a 'glue language', allowing a component-based approach to development. Although a simple language in structure, it is a very powerful one. Offering: advanced data-types, a fully threaded environment, arithmetic/relational and logical operators, concatenation, control structures, functions, iterators, very powerful array handling, matrices, linked lists, queues, string buffers, data serialisation, metatables and object orientated programming functionality (classes, inheritance, multiple inheritance, and privacy).

This is a small taster of the power of scripting. There is an excellent article on Lua on the Gamedev.net web site here, and we'd recommend you read it if still not convinced about its usefulness.

How do I use the plugin?

Using Unity couldn't be easier. Simply use the command LOAD LUA, and your script will be loaded and executed. There is no need to initialise the scripting engine first.

You don't have to use scripts however - you can also take advantage of Lua's powerful data storage engine. This can be started and used simply by calling a command such as LUA SET STRING straight off - Unity will sort out any initialisation that needs to be done for you.

No external DLLs are required, so all you need to distribute is your game EXE file and any relevant media and scripts.

What are the technical specifications?

Unity fully implements the new and updated Lua 5.0 language.

  • Lua 5.0
  • Fast loading, compilation and execution of code
  • Flexible PHP style arrays
  • Automatic memory management and garbage collection
  • All File IO, Mathematical and Core command libraries integrated with the plugin
  • Multi-threading via Lua co-routines
  • Support for object orientation
  • The plugin
  • 25 new commands
  • Full support for directly reading and writing to Lua variables
  • Full access to the contents of Lua arrays
  • Call functions written in Lua from your DarkBASIC Professional games
  • Access the 3D DarkBASIC world directly from your scripts
  • Ability to load compiled scripts or scripts as text files - using just one command
  • Innovative message queue system for Lua to/from DBPro communication
  • Full keywords list and help files with example code for each command
  • Full tutorials included to help you get started
Order Now

Unity

This DarkBASIC Professional DLL will add Lua 5.0 scripting support to your games and applications.

  $ Dollar € Euros £ Sterling Click to Buy
Price: $20.00 €12.99 £10.99 Click here to buy

The LUA Scripting Pack is distributed electronically.
You must download this product. Download instructions are sent after purchase.
It is not available boxed or on CD. DarkBASIC Professional 5.9+ is required to use this pack.

Ultimate Expansion Pack 2008

Save 30% - This pack contains 12 great DarkBASIC Professional extensions:
Dark Physics, Dark A.I., Enhancement Expansion Pack, Unity (Lua), EZ Rotate, Texture Max, Dark Ink, 2D Kit, Enhanced Animations, Dark Lights, Extends and Styx.

  $ Dollar € Euros £ Sterling Click to Buy
Price: $249.99 €158.99 £124.99 Click here to buy
You Save: $107.94 €74.89 £62.90  

All items in this pack are distributed electronically.
You must download these products. Download instructions are sent after purchase.
This pack is not available boxed or on CD. DarkBASIC Professional 6.1+ is required to use Dark A.I and Dark Physics.


Send this page by Email Printer Friendly Page Web Site Assistance



Dark Data
A library that gives one the ability to create a database with keyed filing systems, and resuable direct access records Read >
DarkCLOUDS
Creates a live, real-time sky for your DarkBASIC Professional games Read >
Dark Video
A complete movie encoder and decoder solution Read >
DarkNet
Multiplayer library Read >
Green-Ear
Integrated voice and text chat, voice morphing, private channels and more. Read >
Dark Physics
A complete royalty-free physics engine. Read >
Tree Party
Realistic tree system built for real time game renderings Read >
Dark Source
Source code snippet collection Read >
PureGDK
Dark Basic for Pure Basic Read >
Dark Ink
Brand new print library Read >
2D Kit
Extension new 2D commands. Read >
Enhanced Anims
Comprehensive 3D animation DLL. Read >
Dark Shader
Easy and impressive shader creation. Read >
Dark Lights
Fast light mapping system. Read >
Dark A.I.
Pathfinding, teams and zones. Read >
STYX
ActiveX, Flash, XML and much more. Read >
eXtends
Hundreds of exciting new commands. Read >
Unity
LUA scripting support for your games. Read >
EZ Rotate
Easy object and world rotation. Read >
Enhancement Pack
OGG replay, File Blocks, EAX and more. Read >
Texture Max
One model, infinite variations! Read >
Nuclear Glory
A comprehensive collision system. Read >
Pure Plugin
DLL creation system. Read >
Cloth & Particles
3D Cloth & Particles. Read >
Newsletter 82
Read our free monthly newsletter online

10 year anniversary, DarkBASIC Pro FREE, Lee Bamber Interview & loads more!

Subscribe for free:

DB Pro
GBN
Latest Releases

FPSC Model Pack 36
DB Pro Add-on Pack 2009
FPSC Model Pack 35
FPSC Model Pack 34
Dark Data
FPSC Model Pack 33
FPSC Model Pack 32
FPSC Model Pack 31
DB Pro Upgrade 7.4
DarkCLOUDS
Dark Video
Magic Particles
FPS Creator Bonanza

User Gallery
Who (2)
Delphi
VR-arena2 botmania
VR-arena2:botmania
Who
Inside The Horror
Visit our new screen shot Gallery