TracNav
- Introduction
- Credits and Contributors
Overview
Zen Core
Zen Engine
Zen Enterprise
Miscellaneous
taBBall Scripting
Contents
- Page 1 is this page which has a general overview.
- Page 2 describes the flow of the initial script execution.
- Page 3 describes how the game client initialization occurs.
- Page 4 describes how to create actions.
- Page 5 describes how to create the default key mappings and attach them to actions.
- Page 6? describes how to create the initial scene.
Overview
For an overview of how Zen Scripting works, take a look at the general scripting documentation.
taBBall, like all game clients made with the Zen Engine framework is actually a plugin, not a full blown application. Among other things, this makes it possible to run the game client inside of other applications such as Zen Studio (for debugging and for editing the game) as well as within web browsers such as Firefox, Safari, Chrome and Internet Explorer.
Initial Script
In order to make taBBall behave like an application, we use the ZGameLoader executable and pass it some parameters:
ZGameLoader_d.exe client.xml taBBallClient lua scripts\client\init.lua
How does this relate to scripting? We'll get to that in a second.
The first parameter is the XML configuration file that helps ZGameLoader register the application with the Zen Framework. It looks something like this:
<?xml version="1.0" encoding="utf-8"?> <?indiezen version="1.0"?> <application id="ZGameLoader" name="IndieZen Client Game Loader" version="0.3.0" provider-name="IndieZen.org"> <plugin-path path="C:/dev/Zen/plugins"/> <plugin-path path="C:/dev/Zen/examples/taBBall"/> <module-path path="C:/dev/bin"/> ` <requires> <import plugin="Framework"/> <import plugin="ZOgre"/> <import plugin="ZInput"/> <import plugin="ZLua"/> <import plugin="ZCam"/> <import plugin="ZNewton"/> <import plugin="ZTerrain"/> <import plugin="ZSky"/> </requires> </application>
ZGameLoader_d.exe client.xml taBBallClient lua scripts\client\init.lua
The second parameter is the name of the plugin that contains the game client.
The third and the fourth parameters are the important one's related to scripting.
The third parameter lua indicates to ZGameLoader which scripting language to load.
The fourth parameter is the relative path to the initial script that should be loaded.
To continue, follow along to the next page for more details.
