Join thousands of game developers in our forums and read over 2 million messages
Purchase vouchers for use on future orders or as a gift for others.
toolbar powered by Conduit
Join thousands of game developers in our forums and read over 2 million messages
Purchase vouchers for use on future orders or as a gift for others.
toolbar powered by Conduit
The Unity scripting pack takes your DarkBASIC Professional games to the next level. Unity marries the commercially used Lua scripting language with DarkBASIC Professional.
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:
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:
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?
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.
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.
Unity fully implements the new and updated Lua 5.0 language.
There are currently no special offers containing this product.