Thought I would put a quick update outlining what’s happening with the IwGame Engine. In-app purchasing has been started, so hopefully that will make it into 0.32. We are looking at a way of combining iOS and Android in-app purchasing into the same system (CIwGameMarket). Will provide more details when the system is up and running.
One cool change that’s just been finished is XOML Conditions. XOML conditions are variables that evaluate to either true or false and their value is an expression of other variables. Lets take a quick look at an example:
<!--Create a bog standard int variable that contains the current level --/> <Variable Name="current_level" Type="int" Value="1" /> <!--Create a condition variable that tests that the current level is between 1 and 9 --/> <Variable Name="low_level_extras" Type="condition" Value="current_level GTE 1 AND current_level LT 10" />
The above condition variables value is basically an if statement which translates to:
if (current_level >= 1 && current_level < 10)
But what use is that to anyone you may ask?
Lets consider that we have an actions group such as that show below:
<!-- Next scene action --> <Actions Name="NextScene"> <Action Method="LoadXOML" Param1="MainScene.xml" /> <Action Method="LoadXOML" Param1="LowLevelExtras.xml" Condition="low_level_extras" /> <Action Method="KillScene" /> </Actions>
The above actions set would usually just load the MainScene scene and run it then load the LowLevelExtras scene and run that. However using the condition variable LowLevelScene will only be loaded and ran if the condition variable low_level_extras equates to true, allowing us to only load the extra stuff if the level is between 1 and 9. The condition variable is evaluated at run-time so you can change variables and affect the result, allowing a very dynamic system to be put together.
It may seem like a small change but it adds the ability to add mark-up side logic, which IMO is huge. My mind is whirring away with ideas for its use at the moment!
Conditions can be attached to individual actions as well as actions groups
XOML bindings are currently being implemented (nearly finished). This allows you to bind properties of objects such as actors and scenes to XOML variables using a bindings list. When you change the value of the XOML variable it also changes the value of the property that it is bound to. This system will be particularly useful for hooking up UI’s and HUD’s to in-game data.