IwGame Engine v0.33 Released – Unified Android and iOS in-app purchasing

New here? What’s IwGame? IwGame is an open source free to use cross platform game engine for iPhone, iPad, Android, Bada, Playbook, Symbian, Windows Mobile, LG-TV, Windows and Mac, built on top of the Marmalade SDK. You can find out more and download the SDK from our IwGame Engine page.

I can tell you one thing, testing in-app purchasing from scratch is NOT an easy task, in fact its a pain in the a** to be quite honest. However, like anything that’s cool its worth doing. Its been a while coming but we finally put together a unified API for in-app purchasing on the Android and iOS platforms. To see the end product in action check out Puzzle Friends on Android (the new name for the free version of cOnnecticOns (I must have been off my head when I invented the name cOnnecticOns :)). The iOS version is currently with the great Apple reviewers in the sky.

Ok, here is the list of changes for 0.33:

  • In-app purchasing added for Android and iOS (IwGameMarket)
  • Scenes can now be augmented after they have been created (like partial classes)
  • Scenes can now be layered visually
  • New SetAllTimelines action added to XOML that will set the timeline of all scenes
  • SetVariable action now allows you to specify the scene in which the variable lives
  • Resources can now be tagged with a tag name
  • New RemoveResource and RemoveResources actions that allow removal of resources from global resource manager
  • New CallActions action added that enables execution of other actions lists
  • Actor now has ScaleX and ScaleY bindings
  • Relative actor depth is now 0 for linked actors
  • UDID removed from IwGameAds for iOS
  • Scenes now have a ClipStatic property that will force the clipping area of a scene to stay in place on screen instead of moving with the scenes camera
  • BUG FIX: Scene NotifyResuming now called properly
  • BUG FIX: CIwGameAnimInstance::setAnimation() no longer crashes if NULL is passed
  • BUG FIX: IwGameAdsView sprites are now updated correctly

The most interesting addition this update is the well hidden IN-APP PURCHASING for iOS and Android. With the aid of copy and paste lets take a look at the changes in more detail:

IwGameMarket – Unified In App Purchasing API for iOS And Android

Its an incredibly tough job to get noticed in the app stores these days with approaching half a million apps available in the larger stores (insane competition), its an even tougher job persuading Joe public to part with their money for your app. Many developers are turning to developing freemium titles as a means to increase visibility (app users are much more likely to download a free app) and earn money by offering the app in a limited form then allowing users to purchase additional content and game features. As of IwGame v0.33, basic in-app purchasing is now available for iOS and Android using a wrapper around Marmalade’s EDK in-app purchase extensions called IIwGameMarket.

IIwGameMarket is a not a concrete class however so you cannot just create one and use it. Instead it provides a basic interface for creating the platform specific market class as well as access to common functionality. At the moment the following marker classes are available:

CIwGameMarketiOS – Uses iOS in-app purchasing
CIwGameMarketAndroid – Uses Android market billing
CIwGameMarketTest – This version is a test class that you can use to simulate purchases / errors etc in the simulator.

IwGameMarket is designed to allow you to initialise and set-up and use in-app purchasing in a platform agnostic fashion, allowing you to query / purchase content very easily.

IwGameMarket works using a product list system, where you create and add CIwGameMarketProduct products to the IwGameMarket. Each CIwGameMarketProduct represents a single consumable / none consumable product that can be purchased.

Setting up the IwGameMarket is very simple, you simply call IIwGameMarket::Create() which initialises the correct market for the platform that your game or app is running on then set-up a few handlers, depending upon which messages you want to handle. Below shows a quick example:

IiwGameMarket::Create("Your android public key");
IIwGameMarket::getMarket()->setReceiptAvailableHandler(PurchaseComplete, NULL);
IIwGameMarket::getMarket()->setErrorHandler(PurchaseError, NULL);
IIwGameMarket::getMarket()->setRefundHandler(Refunded, NULL);	// Android only

Note that if you are releasing for iOS only then you do not need to supply your Android Market public key, simply pass no parameters to Create().

In this example, we have told IwGameMarket that we want to be notified when a purchase receipt is available, when an error occurs or when a transaction refund has happened.

When done with the market don’t forget to clean it up using:

IIwGameMarket::Destroy();

Now that the market is set-up we need to add products, below shows a quick example:

// Which OS are we running
int os = s3eDeviceGetInt(S3E_DEVICE_OS);

// Create product 1
CIwGameMarketProduct* product = new CIwGameMarketProduct();
product->Consumable = true;
product->ID = 1;
product->Name = "10 Coins";
if (os == S3E_OS_ID_IPHONE)
	product->ExternalID = "com.companyname.gamename.coinsx10";
else
	product->ExternalID = "coinsx10";
product->Purchased = false;
IIwGameMarket::getMarket()->addProduct(product);

// Create product 2
product = new CIwGameMarketProduct();
product->Consumable = true;
product->ID = 2;
product->Name = "50 Coins";
if (os == S3E_OS_ID_IPHONE)
	product->ExternalID = "com.companyname.gamename.coinsx50";
else
	product->ExternalID = "coinsx50";
product->Purchased = false;
IIwGameMarket::getMarket()->addProduct(product);

In this example, we create 2 products, our first represents 10 in-game coins, whilst the second represents 50 in-game coins. The ExternalID property is the product ID as defined in the in-app purchase section of your app in iTunes Connect for iOS or the product id of the in-app purchase in the in-app purchase section of your Android Market product control panel for Android. ID can be anything you like but will need to be unique.

Now that the system and product set-up are out the way, lets take a look at how to purchase a product. Firstly you need to call PurchaseProduct() passing in the ID defined in the CIwGameMarketProduct that you added earlier:

if (IiwGameMarket::getMarket()->PurchaseProduct(product_id))
{
}

You then need to add code to the callbacks that we added in our set-up:

int32 MarketScene::PurchaseComplete(void* caller, void* data)
{
	int type = IIwGameMarket::getMarket()->getLastPurchaseID();
	if (type == 1)	// 10 coins
	{
		GAME->AddCoins(10);
	}
	else
	if (type == 2)	// 50 coins
	{
		GAME->AddCoins(50);
	}

	return 1;
}

int32 MarketScene::PurchaseError(void* caller, void* data)
{
	// Display an error to the user

	return 1;
}

int32 MarketScene::Refunded(void* caller, void* data)
{
	// Only available on th Andriod platform
	CIwGameString id = IW_GAME_MARKET_ANDROID->getRefundedID();

	// Player was refunded so take back the items(s)

	return 1;
}

Augmenting Scenes

Another cool new feature in v0.33 is the ability to augment a previously created scene and add extra stuff to it after the fact. You can for example have a basic common scene that provides the basic background of the scene. This gets loaded by many other scenes and serves as its basic background. After its been loaded you can declare the scene a 2nd time and add additional elements which will then be integrated into the original scene.

Layered Scenes

Scenes can now be depth sorted (visually only). This is incredibly useful as previously scenes would always be drawn in the order in which they were added to the game class. There is no limit to the layer number of a scene.

Tagged Resources

Resources can now be given a tag name, allowing you to identify groups of resources. New actions have also been added that allow the removal of specific resources or groups of tagged resources from the global resource manager. We added this new features because we found that sometimes it is very useful to have resources in the global resource manager so they can be shared across scenes, but later needed a way to remove those resources when done with them.

Calling Actions Lists

Its now possible to call an actions list from an action. This is great if you want to define lots of different action sets then pick and choose which ones you want to use.

And that’s it for this update, please enjoy.

IwGame Engine v0.32 Released – Data Bindings and Conditional Variables

New here? What’s IwGame? IwGame is an open source free to use cross platform game engine for iPhone, iPad, Android, Bada, Playbook, Symbian, Windows Mobile, LG-TV, Windows and Mac, built on top of the Marmalade SDK. You can find out more and download the SDK from our IwGame Engine page.

A lot of bugs (mostly minor) have been reported since the forum went live so we decided to release 0.32 now and push in-app purchasing to another future release (hopefully 0.33).

We finally got cOnnecticOns approved for BlackBerry PlayBook, its now on sale on BlackBerry App World. Version 2.0 also went live today for iOS on iTunes and for Android on the Android Market / Amazon. Not happy with Samsung however, the game has been knocked back on Bada 1 and 2 numerous times for minor issues that should be footnotes!

Ok, on with the changes, here is the list of changes for 0.32:

  • New XOML RemoveAllScenes action added – This will remove all scenes excluding the scene that is provided
  • Data bindings now added to XOML – You can now create a bindings list which pair properties up to variables. Changes made to those variables will bautomaticaly be applied to the object that they are bound to.
  • Actors and Scenes now support data bindings
  • Conditions variables now added to XOML – A condition variable allows you to string together some basic logic based on the value of other variables, these can then be attached to Actions to create conditional actions
  • Actions and Action groups now support conditional variables
  • IIwGameXomlResource now have parents
  • CIwGameString now supports encoding / decoding to / from hex
  • CIwGameSprite now has a RebuildTransformNow() method
  • CIwGameSprite now has an update method where the trabnsform will be rebuilt. This ensures that all transforms have been buuilt before rendering
  • CIwGameScene now has a PreDestroy() method which gets called when a request to destroy a scene is received
  • CIwGameActorImage now has a SetSrcRect() method
  • Added sound and music volume control to CIwGameAudio
  • CIwGameSound now accepts a paramater that allows you to specify volume, frequency and panning when playing a sound effect
  • BUG FIX: PNG lib fix for Visual Studio 2008
  • BUG FIX: Mac compile issues
  • BUG FIX: CIwGameSprite setScale() fixed
  • BUG FIX: Precision issues graphical glitches at lower resolutions
  • BUG FIX: Actor collilsion size now read corrctly from XOML
  • BUG FIX: CIwGameActorText text aligment now applie correctly
  • BUG FIX: When an actor or scene has a timeline attached, the first frame was not benig set before displaying the object
  • BUG FIX: CIwGameTextSprite hit test fixed
  • BUG FIX: CIwGameAds – VServ local now set correctly
  • BUG FIX: CIwGameScene – Initial camera transform is now built correctly
  • BUG FIX: CIwGameString::URLEncode now calculates correct buffer size
  • BUG FIX: CIwGameString::URLDecode now checks for the correct character
  • BUG FIX: Infinite loop removed from CIwGameXmlNode::GetAttribute()

The most exciting changes for us at least are the XOML data bindings and conditional variables / actions. They enable the creation of some very complex and ultra re-usable stuff. We are planning on starting a library of useful generic classes and XOML layout files that can be used as plug-ins to help create games and apps even quicker. Our first experiment with this is to create a set of XOML files and scene classes that handle ScoreLoop integration. If this is successful then we will release this as a plug-in library that you can simply drop into your own games and style with your own styles. Will blog about this in the near future.

XOML Data Binding

Data binding is the ability to map properties of objects to XOML variables. Changes to those variables will be immediately reflected in all properties of all objects that are bound. Lets take a look at a quick example:

We declare a global variable that holds a profile name:

    <Variable Name="ProfileName" Type="string" Value="None" />

Next we create a bindings set that contains a single property called “Text” that is bound to the “ProfileName” variable that we just defined:

    <Bindings Name="SC_ProfileBindings">
        <Binding Property="Text" Variable="ProfileName" />
    </Bindings>

We now attach our bindings list “SC_ProfileBindings” to a text actor:

    <ActorText Name="NameLabel" ......... Bindings="SC_ProfileBindings" />

Now if we change the ProfileName variable in XOML or in code, our NameLabel actor’s Text property will be automatically updated.

We opted to use independent binding lists (as opposed to in-line bindings as used in XAML / MXML) because they are re-usable, the same bindings list can be used across many objects. They are also much more readable as bindings are not intermingled with normal property values.

Note that if you also have a timeline animation that updates the same property then the timeline is given priority and the timeline will write over the binding value.

Binding lists can be attached to scenes and actors. The following properties can be bound:

CiwGameScene:

  • Position
  • Angle
  • Scale
  • Colour
  • Clipping
  • Timeline
  • Binding
  • Camera
  • Type
  • Active
  • Visible
  • AllowSuspend
  • AllowResume

CIwGameActor:

  • Position
  • Depth
  • Origin
  • Angle
  • Scale
  • Colour
  • Velocity
  • Angular Velocity
  • Timeline
  • Binding
  • Type
  • Active
  • Visible
  • Collidable
  • HitTest

CIwGameActorImage (in addition to those present in CIwGameActor):

  • Size
  • SrcRect
  • Image

CiwGameActorText (in addition to those present in CIwGameActor):

  • Text
  • Rect

Binding sets that are defined outside a scene will be assigned to the global resource manager, whilst bindings defined inside a scene will be assigned to the scenes resource manager.

Data bindings offer a way to create complex scenes and user interfaces without having to manually update the properties of the individual elements

Conditional Variables and Actions

XOML supports a new variable type called a condition variable. A condition variable is a variable that contains an expression that is defined by a list of variables, operators and values. Lets take a look at a quick 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 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" />

We create an integer variable called current_level and assign it the value of 1. Next we create a new variable called “low_level_extras” that is of type “condition”. The most interesting part of our condition variables is the value, which is:

     current_level GTE 1 AND current_level LT 10

Unlike normal variables which contain constant values of some kind, condition variables contain dynamic expressions that are evaluated at run-time. The end result of a condition variable is always either true or false. The above expression in terms of C code would read like this:

     bool low_level_extras = (current_level >= 1 && current_level < 10);

Condition variables aren’t much use on their own and are usually used in conjunction with actions to provide conditional action functionality whereby an action or actions group will only be executed if a certain set of conditions are met. Lets take a look at a quick example:

    <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 group is called when we click a button to start a game. The actions group starts by loading the MainScene XOML file which creates the main game scene. Next the condition variable “low_level_extras” is checked to see if It is true, if current_level is between 1 and 9 then the variable will return true and the additional XOML file “LowLevelExtras” will be loaded. If however the current_level variable is less than 1 or greater than 9  then the additional XOML file will not be loaded.

This is just a very simple example showing how conditional actions can be used to re-use and extend XOML code.

And that’s it for this update. Thank you to all those who have downloaded cOnnecticOns on one platform or another and massive thanks to those who left us a review, you are awesome.

XOML Conditions – New IwGame Feature Coming Soon

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

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.

 

 

 

 

IwGame Engine v0.31 Released – Facebook and Full cOnnecticOns Source Available

New here? What’s IwGame? IwGame is an open source free to use cross platform game engine for iPhone, iPad, Android, Bada, Playbook, Symbian, Windows Mobile, LG-TV, Windows and Mac, built on top of the Marmalade SDK. You can find out more and download the SDK from our IwGame Engine page.

Its been a tough week, my Apple Mac blew a gasket and refused to boot. Didn’t know this until I had spent 4 hours trying to make the Mac boot from Snow Leopard, but you cannot boot a Mac Mini from any version of the OS other than the original version that came with the Mac! Arrrgggghhhhh, insanity! In the end I turned my office and house upside down to find the original Mac disk.

Finally got cOnnecticOns cleaned up and submitted to the app stores. I also added 10 more levels and a game editor that allows players to create up to 20 of their own levels on-device and play them. I plan to allow sharing of these custom levels in a future version. We also added Facebook posting to IwGame and therefore has now been added to cOnnecticOns. You can find our more info about the game at http://appliter.com/apps/connecticons/connecticons.aspx

Ok, onto the update. IwGame v0.31 is kind of a special release because it contains the FULL source and assets of the game that you will see on Android Market and very soon Blackberry App World, Apple iTunes and SamsungApps for Bada.

Here’s the full list of changes for 0.31:

IwGame 0.31 Changes:

  • cOnnecticOns full commercial game with source and assets provided as an example of engine usage
  • CIwGameFacebook added – Currently provides login and wall posting access
  • New AddVariable action added which allows you to add a positive or negative value to a XOML variable with limits
  • New EnterValue action added that brings up the devices keyboard allowing the user to enter a value into a XOML variable
  • New UpdateText action added will update a text actor with the value of a variable
  • New Exit action added that allows the user to exit the game
  • 3rd paramater added to XOML actions
  • DoSleep added to CIwGameBox2dWorld to enable / disable object sleeping, also added to scene XOM
  • IIwGameXomlResource now has an actual type, allowing type checking for exact object types
  • OnKeyBack and OnKeyMenu events added to scene and XOML. These fire when back and menu keys are pressed
  • BUG FIX: CIwGameSprite position and origin now 32 bit vectors, which helps prevent positions overflowing
  • BUG FIX: When a scene is destroyed and it has touch focus it was causing a crash
  • BUG FIX: If a scene becomes inactive or invisible it now loses touch focus
  • BUG FIX: Velocity / angular velocity now applied when actors have no physics attached
  • BUG FIX: JPEG image data is now correctly converted from BGR to RGB
  • BUG FIX: CIwGameString, find index now properly reset

As well as the release of the full source for cOnnecticOns, we also snook a few extra col bits and bobs in there.

New CIwGameFacebook Class

The main purpose of this class is to allow the user to log into facebook and interact with it. Right know, only logging in and wall posting functionality is provided using the following method:

bool PostWall(const char* message, const char* link_uri, const char* image_uri, const char* name, const char* description);
  • message – Message to display to the users wall visitors
  • link_uri – URL that the user will visit when clicking on the wall post link
  • image_uri – URL of an image that you would like to be displayed along with the post
  • name – The title of the post
  • description – Description of the post (displayed in weaker font beneath title)

A Facebook wall post will look something like this:

Post to Facebook example
POst to Facebook Example

New XOML Actions

It is now possible to add a value onto an existing XOML variable using the new AddVariable action. You can also update a text actor with the value of a variable in XOML. Here’s an example showing how the editor in cOnnecticOns uses both actions together to create an up / down UI element that the player can use to change the number of cOnnecticOns available in the level:

        <!-- Create change connecticons buttons -->
        <InertActor Name="ConnectButton2" Position="0, -200" Size="81, 84" SrcRect="555, 482, 81, 84" Image="sprites1">
            <ActorText Name="ConnectButton" Depth="0" Font="trebuchet_12" Rect="-100, -50, 200, 100" Colour="0, 0, 0, 255" Text="2" />
            <InertActor Name="DownButton" Position="-60, 0" Angle="-90" Size="48, 51" SrcRect="868, 299, 48, 51" Image="sprites1" Depth="0" OnBeginTouch="DownBeginTouch" OnEndTouch="DownEndTouch" OnTapped="DownTapped">
                <Actions Name="DownBeginTouch">
                    <Action Method="SetTimeline" Param1="buttonin4_anim" />
                    <Action Method="PlaySound" Param1="ui_tap" />
                </Actions>
                <Actions Name="DownEndTouch">
                    <Action Method="SetTimeline" Param1="buttonout4_anim" />
                </Actions>
                <Actions Name="DownTapped">
                    <Action Method="AddVar" Param1="EditorConnecticons" Param2="-1" Param3="0" />
                    <Action Method="UpdateText" Param1="ConnectButton" Param2="EditorConnecticons" />
                </Actions>
            </InertActor>
            <InertActor Name="UpButton" Position="60, 0" Angle="90" Size="48, 51" SrcRect="868, 299, 48, 51" Image="sprites1" Depth="0" OnBeginTouch="UpBeginTouch" OnEndTouch="UpEndTouch" OnTapped="UpTapped">
                <Actions Name="UpBeginTouch">
                    <Action Method="SetTimeline" Param1="buttonin5_anim" />
                    <Action Method="PlaySound" Param1="ui_tap" />
                </Actions>
                <Actions Name="UpEndTouch">
                    <Action Method="SetTimeline" Param1="buttonout5_anim" />
                </Actions>
                <Actions Name="UpTapped">
                    <Action Method="AddVar" Param1="EditorConnecticons" Param2="1" Param3="10" />
                    <Action Method="UpdateText" Param1="ConnectButton" Param2="EditorConnecticons" />
                </Actions>
            </InertActor>
        </InertActor>

The mark-up marked in red show the new AddVar and UpdateText XOML actions.

Basically when the user taps the DownButton actor the OnTapped event fires which calls the DownBeginTouch actions list. This actions list contains two actions:

AddVar – This adds -1 onto the EditorConnecticons variable and limits it to 0, so it does not go below 0.
UpdateText – The next action copies the value of the EditorConnecticons variable into the ConnectButton text actor, which updates the number of connecticons on screen.

Support for Android Back and Menu Buttons in XOML

It is now possible to attach actions in XOML to the menu and back button events in a scene by handling the OnKeyBack and OnKeyMenu events. Note that only the current scene will handle button events.

Text Input via XOML

Using the new EnterValue XOML tag you can bring up the device keyboard and allow the user to input some text into a XOML variable.

cOnnecticOns

As previously mentioned the full source to cOnnecticOns has been provided to enable developers to see a real working commercial game utilising IwGame. The first thing you will notice when looking at the code base is just how little code is actually there. This is because much of the mundane functionality such as creating layouts, handling events, creating animations, scenes etc.. are all handled by XOML. Please note that the supplied XOML is not optimised in way shape or form, in fact I have done many things long hand so as not to make the scripts convoluted and difficult to understand. When creating your own XOML you should probably focus more on re-use with templates, styles and global actions / animations etc..

Here is a brief overview of the provided XOML scripts:

  • Actors – This file contains physics materials, shapes and game object templates
  • Common – Contains common styles, animations and actions that are used across many scenes
  • ConfirmDialog – This is the dialog box scene for the rest scores action, it is displayed to the user when they attempt to reset their records
  • EditLevelSelect – Level selection screen that allows the user to select a custom level to edit
  • Editor – The level editor scenes
  • GameComplete – Shown to the player when they complete all zones and all rounds
  • Help – The basic help dialog that is accessible from the main menu
  • HUD – The in-game HUD that displays the scores and game buttons
  • Intro – The IwGame intro that is displayed at game boot
  • LevelCleared – The end of level score dialog that is displayed when the user completed or fails a round
  • LevelSelect – Level selection screen that allows the user to select a level to play
  • LevelSelect2 – Level selection screen that allows the user to play a custom level to play
  • Menu – The main front-end menu scenes
  • PauseMenu – The in-game pause men scene
  • ZoneLocked – Dialog scene that is displayed when the player finishes round 10 but has not unlocked all levels in the zone
  • ZoneSelect – Zone selection scene
  • Scenes 1 to 30 – Game level scenes
  • Scenes 101-120 – Custom blank level scenes

Note that some files contain more than one scene. For example, each game level file contains the pause menu, the main game level scene as well as the in-game HUD. The pause menu and HUD exist as separate XOML files so they can be re-used across all levels.

The code base contains implementations of the following custom scenes:

  • EditScene – Level editor scene, contains level editor logic
  • GameScene – A game level scene, contains game logic
  • LevelSelectScene – Custom scene for level select that handles updating of the scores in the level screen
  • ZoneSelectScene – Custom scene for zone select that handles updating of the lock / unlocked status of each zone

The following custom actors are also used:

  • ConnectActor – An actor that connect two bugs together with minimal logic
  • CounterActor – This is the main bug actor (originally called counters), handles all bug logic / collision etc
  • FloaterActor – Handles floating / fading text
  • GravityPlacerActor – Special actor that can be modified to change gravity within the editor
  • InertActor – Basically an actor that doesn’t much other than display itself
  • PlacerActor – A basic placeable object, used to position actors in the editor
  • SelectorActor – A basic selector actor used by the editor object selection screen to select which object to place

The rest of the code is pretty bog standard stuff. Game is the implementation of CIwGame and contains initialisation and shut down. Probably the most interesting part is where the custom XOML classes and events are added using the following code:

	// Add custom classes to XOML system
	IW_GAME_XOML->addClass(new InertActorCreator());
	IW_GAME_XOML->addClass(new GameSceneCreator());
	IW_GAME_XOML->addClass(new LevelSelectSceneCreator());
	IW_GAME_XOML->addClass(new ZoneSelectSceneCreator());
	IW_GAME_XOML->addClass(new CounterActorCreator());
	IW_GAME_XOML->addClass(new PlacerActorCreator());
	IW_GAME_XOML->addClass(new GravityPlacerActorCreator());
	IW_GAME_XOML->addClass(new SelectorActorCreator());
	IW_GAME_XOML->addClass(new EditSceneCreator());

	// Add custom game actions to XOML system
	for (int t = 0; t < CIwGameXomlAction_Global::Action_Max; t++)
 		IW_GAME_XOML->addAction(new GameXomlAction_Global((GameXomlAction_Global::ActionType)t));

These custom actions and events allow us to tie our game logic much closer to our XOML code.

Well that’s it for this update. We were aiming to get conditional XOML actions in for 0.31, but unfortunately it didn’t make it, but should do for 0.32.

IwGame Engine v0.3 Released – The 36 hour game

New here? What’s IwGame? IwGame is an open source free to use cross platform game engine for iPhone, iPad, Android, Bada, Playbook, Symbian, Windows Mobile, LG-TV, Windows and Mac, built on top of the Marmalade SDK. You can find out more and download the SDK from our IwGame Engine page.

Well, Dan said a few weeks ago that “it’s only until you eat your own dog food that you know you have to improve the taste of it”. I thought about this and decided that we really needed to create a game using the engine to show its various features in action. So with this, I began work on a game (currently unnamed), but decided that the game would take a few weeks to finish off, so moved over to producing a completely new game from scratch but with a simpler design. The end result was a game that was created in less than 36 man hours, including art production, coding, design and scripts (I was aiming for 24 hours but I came across a a few nasty bugs that took a fair bit of time to fix). In addition,. I underestimated how difficult it would be to put levels together without an actual editor. I will very likely build an actual editor into the cOnnectiCons game itself to allow players to create their own levels. So the game ended up with 20 levels, with an additional 20+ levels coming later.

You can take a quick look at cOnnecticOns at http://www.youtube.com/watch?v=sVa8TWYQEsQ and here are a few screen shots of our 36 hour game cOnnecticOns:

Connecticons screen shot
Connecticons screen shot
Connecticons screen shot
Connecticons screen shotConnecticons screen shot
Connecticons screen shot
Connecticons screen shot

We have already started submitting the game to app stores, so when we release the source “Don’t go getting any ideas lol”. The source will be provided as a learning exercise, and not for someone else to make a quick buck off.

Ok, now that’s out the way, lets take a brief look at the changed that have arrived in IwGame v0.3:

  • Support added for particle based actors via CIwGameActorParticle and CIwGameActorParticles as well as XOML via ActorParticles and Particle tags. Particles can be defined individually or in batches using random parameters. Particles have position, linear velocity, angular velocity, scale velocity, colour velocity, depth velocity, velocity damping, lifespan and repeat
  • Support for Marmalade fonts has been added via CIwGameFont wrapper and a new XOML Font tag
  • All rendering now uses IwGx instead of Iw2D. This offers more control over rendering as well as makes the code more portable / versatile in the future
  • All internal rendering upgraded to sub pixel coordinates offering MUCH smoother rendernig
  • New 2D rendering class added CIwGameRender2d. This cklass allows batch rendering of primitives and rendering of text CIwGxFontPreparedData prepared text
  • New very powerful template system added to XOML. The template system allows you to create a complex piece of XOML using paramaters that can be passed in when the template is instantiated. Templates can also be instantiated from code using CIwGameTemplate::Instantiate()
  • CIwGame::addScene() can now auto bring a scene to the front of scene stack
  • New global actions added to XOML – Launch, setBGColour, SetCurrentScene and BringtSceneToFront
  • Actors and sprites now have a depth property allowing you to add 3D depth to them
  • Actors and sprites now have an origin attribute
  • Support added for sprites and actors for none uniform scaling
  • Support added for linked actors. A linked actor will utilise the transform, colour and visibility of the actor it is linked to. In XOML, you can use the new LinkedTo tag to set linkage or the more natural and readable method of defining actors within actor tags. This system allows complex multi-patr actors to be created and animated
  • Actors now support OnCreate and OnDestroy events in code and in XOML
  • Scenes now support OnCreate, OnDestroy OnGainedFocus and OnLostFocus events in code and in XOML
  • New text based actor and sprite types added CIwGameActorText and CIwGameTextSprite.
  • Animation system now supports linear, quadratic, cubic and quartic on / out easing in code and in XOML. In addition value interpolation can be enabled / disabled
  • Animations now support absolute and delta values
  • Animation timelines now support OnStart, OnEnd and OnRepeat events in code and in XOML
  • CIwGameAudio::PlayMusic now supports repetition with additional parameter in XOML
  • New CIwGameSlotArray class added for efficient resizable arrays
  • Actor Box2D collision system was broken and inefficient. The system has been completely reworked and now uses the new more efficient CIwGameSlotArray
  • CIwGameBox2dBody now has new awake and active methods
  • CIwGameCamera now supports velocity, damping and touch panning. Touch panning will pan the camera to follow the users finger
  • More than one scene can now receive input events using the new AllowFocus functionality in code and in XOML
  • New findClosestActor and findFurthestActor methods added to CIwGameScene
  • CIwGameBitmapSprite now supports colour per vertex
  • CIwGameSpriteManager supports enabling / disabling of batching and a new centre of projection property for depth used by depth sprites
  • CIwGameInput reworked to better support multi-touch
  • PlayTimeline, StopTimeline and SetTimeline now supports a second parameter which points to the scene or actor that the timeline change should be made to
  • Actors can now be marked for hit testing in XOML
  • Image files can now be loaded directly from XOML without the need for Marmalade resources files
  • CIwGameScene and CIwGameActor based objects are now marked as destroyed when they are removed so they cannot be found in a scene or actor search
  • CIwGameXmlNode now supports cloning
  • Bug Fix: Actors now take into account their visibility when being hit tested
  • Bug Fix: CIwGameActor::setCollidable no works
  • Bug Fix: StartTimeline action now restarts a stopped timline properly
  • Bug Fix: Clipping rect is now transform by the scenes transform (will not clip correctly against rotated scenes however)
  • Bug Fix: XML parser fixes
  • Bug Fix: CIwGame game scene switch scene bug fixes
  • Bug Fix: CIwGameAds::ErrorFromResponse fix that were causing some valid ads to be in error
  • Bug Fix: CIwGameAnim fixes
  • Bug Fix: Polygon based Box2D bodies now fixed
  • Bug Fix: Sprite rendering transform fixed
  • Bug Fix: CIwGameBitmapSprite with no loaded image no longer crash
  • Bug Fix: CiwGameString crashes fixed (were causing rare problems with XML system)
  • Bug Fix: Fixed issue with CIwGameXmlAttribute::GetValueAsColour not checking for correct parameter count
  • Bug Fix: On device scene shut down camera deletion fixed

Ok, that’s a shed load of changes, but I can assure you that they are all for the better. IwGame is now a professional grade and fairly stable engine that can be used to create games in as little as 36 hours!

Lets take a look at some of the new additions in more detail.

Templates

I want to start with my utmost favourite change to 0.3 which is templates. I am so in love with templates that I feel like I could almost marry one! They saved me so much time when developing cOnnecticOns. Templates allow you to create large sections of XOML as templates then instantiate those large
pieces of XOML somewhere else using custom parameters that you pass to the template when you instantiate it. Lets take a quick look at a super simple example:

<Template Name="ActorTemplate">
        <InertActor Name="Explosion$name$" Image="$image" Position="$pos$" Scale="$scale$" Depth="$depth$" Layer="1" AngularVelocity="0" />
</Template>

Here we define a template called ActorTemplate that contains a basic InertActor definition. You may notice some strange markers in there surrounded by double dollars signs ($name$, $image$,$pos$, $scale$ and $depth$).

Now when we instantiate this template somewhere we would use:

<FromTemplate Template=”ActorTemplate” name=”actor1″ scale=”1.0″ pos=”300, 150″ depth=”1.0″ image=”sprites1″ />

The above XOML command will instantiate whatever is in the ActorTemplate template passing all of its parameters, replacing the double dollar definitions inside the template (Hmm, sounds very much like calling a function? Which I guess in some ways it is)

Templates can be as massive and as complicated as you like, allowing you to design and instantiate some very complex objects with very few lines of XOML.

Rendering Engine Upgrade

Up until version 0.29 of the IwGame Engine we used Marmalade’s Iw2D engine as the rendering core. As of v0.30 we have switched to Marmalade’s IwGx rendering system as it offers much more versatility as well as brings the engine into the realms of 3D rendering, which is where we will eventually be steering the engine.

To facilitate this change over and to keep the game engine code nice and readable, all rendering has been abstracted away into a nice simple class called CIwGameRender2d. CiwGameRender2d is and will in future be the centre point for all rendering that takes place within IwGame.

At the moment CiwGameRender2d offers:

  • Batch and none batch sprite rendering of quad based polygons
  • Rendering of prepared text from the Marmalade IwGxFont system

In the near future we will be adding support for various other types of primitives, 3d models and hopefully our own custom shaders etc..

Lastly, all rendering now uses sub-pixel accuracy which looks much much smoother.

Text and Fonts

IwGame now supports definition of Marmalade fonts and custom rendering of those fonts using a new text based sprite and actor. Text based sprites and actors are treat just like any other sprite or actor objects, so they can be spun, scaled, linked, colour changed etc.. Unlike generic actors text based actors can be instantiated without deriving your own class from CIwGameActorText

3D Sprites / Actors

Another one of my favourite additions to 0.3 is 3D sprites. All sprites and actors can now have a depth value (think iof this as a z value) that allows you to project sprites into 3D.  This system is great for create parallaxing effects etc..

Oh and sprites / actors also get an adjustable origin and none uniform scaling

Linked Actors

Actors can be created within other actors to form a parent / child relationship. Inner actors will be linked back to their containing actor forcing them to be transformed by their parent actors. This system allows you to create a very powerful intuitive multi-part actor system complete with animations per actor part. Note that all positions, depths etc will be relative to the container actor, so for example, if the parent actor has a Depth value of 1.0f and the child actor has a Depth value of 1.0f then the child’s effective Depth will be 2.0f. Here’s an example showing parent / child actors:

<InertActor Name="Level1" Style="LevelButtonStyle" Position="0, 0" OnBeginTouch="BeginTouch11" OnTapped="StartLevel1">
    <ActorText Name="Record1" Style="LevelButtonTextStyle" Colour="255, 80, 80, 255" Position="0, 0" Text="0" Depth="0" />
    <ActorText Style="LevelButtonTextStyle" Position="0, 60" Text="Round 1" Depth="0" />
    <InertActor Name="LevelComplete1" Size="74, 67" Image="sprites2" SrcRect="582, 423, 148,134" Position="60, -20" HitTest="false" Depth="0" Timeline="tick_scale_anim" />
</InertActor>

In the above XOML the parent actor level1 contains three children actors that will all follow theLevel1 actors visual transform.

Particle System Actors

This actor is special in that it is optimised for creating, displaying and updating a complete system of sprites (kind of like its own sprite manager). The advantage of this actor is that it does not have to deal with each particle as a separate actor object. The CIwGameActorParticles actor supports both manual and auto generation of particles. Auto generation can be controlled using a number of a control parameters.

Particles have a number of properties that can be adjusted:

  • Visual
  • Position
  • Velocity
  • Velocity Damping
  • Gravity
  • Scale
  • Scale Velocity
  • Scale Velocity Damping
  • Angle
  • Angle Velocity
  • Angle Velocity Damping
  • Colour
  • Colour Velocity
  • Colour Velocity Damping
  • Depth
  • Depth Velocity
  • Depth Velocity Damping
  • Active state
  • Visible state
  • Lifespan – Duration of particle in seconds
  • SpawnDelay – The amount of time to wait before spawning for the first time
  • Lives – Number of times the particle will re-spawn (-1 for infinite)

The particle actor system allows auto generation of particles within certain limits as well as manual generation. Patricles can be defined and placed both in code and in XOML.

Animation Frame Easing

Animations now support in and out easing on a per frame basis using the “Ease” attribute of the frame tag or in code. Valid values of easing include:

  • linear – No easing
  • quadin / quadout – Quardatic in / out easing
  • cubicin / cubicout – Cubic in / out easing
  • quarticin / quarticout – Quartic in / out easing

Time lines now in the Events System

Its now possible to attach actions to timeline events such as OnStatr, OnEnd and OnRepeat. So for example, each time an animation repeats you could play a sound effect or maybe when an animation finishes yu kill destroy the actor or start a particle system off going etc..

Animations now support delta / absolute coordinates

Every animation can now be specified as absolute or delta. An absolute animation will write its interpolated frame values directly into the target objects properties (such as position), whilst a delta animation will update the current target properties. So for example, a delta animation for position would adjust the position by dx, dy, where dx and dy is the current interpolated frame value.

Automatic Touch Panning for Cameras

Cameras now have X and Y axis touch panning. When a camera is touch pan enabled it will track the users finger drag on screen to determine a velocity to move the camera by. Touch panning can be enabled on the X an Y axis independently.

Other cool changes

Multi-focus scenes – More than one scene can now receive input events
Local images can now be loaded from XOML

There are many other changes but I don’t really have the time to go through them all. There’s also a mound of bug fixes that weer found during development of cOnnecticOns.

We will be releasing the full source to cOnnecticOns later this week along with an additional 10-20 levels.

Quick IwGame Update

We’ve been a little quiet of late so I thought that I would put a quick blog post together to let you all know that the Pocketeers wheels are still turning. We were aiming to have the IwGame Engine update and a complete game using the engine ready for last week, but unfortunately a few Pocketeers related tasks as well as losing time to being ill with the flu has knocked the schedule out a little.

I’m working on a quick cute game that uses 100% IwGame code and XOML. I’m also doing this as a one man band exercise to show how quickly, easily a game can be put together using the engine (as well as the fact that we have no additional spare resources at the moment); I’ve even done much of the art work myself lol.

The next release of the IwGame engine will be next week sometime, even if the sample game is not 100% complete (I will continue to finish off the game in my spare time so that it can be used as a complete reference). The next release has a mass of additional features along with a number of bug fixes.

We believe that v0.3 will be the stable version of IwGame that we have been waiting for (I would even go as far as calling it a release candidate)

Just want to say a quick thanks to Da Voodoochief over at Sorcery Games for his recent blog on IwGameAds integration and wish him much luck with CTR and fill rates.

Marmalade SDK v6.0

I was pleased as punch this afternoon after I visited Marmalade’s web site. Why you may ask? Well, the simple answer is that they have updated their road map giving us a sneak preview of what’s to come this year. The main thing that I am happy about is the fact that the first release due in Q1 is entitled “Web Marmalade”. I’m going to go out on a limb here and assume that this is targeting the web as deployment platform, which is even more awesome than the $25 credit card sized Raspberry Pi! (Think that we are going to have to name this one Awesomade!).

Anyways, hers a short extract from Marmalade’s release page:

“Hybrid Applications, Enhanced Native UI and support for new platforms.”

Yummy, eh? Well what could these features mean?

  • Hybrid Applications – Could we be talking hybrid web / native applications? Does this mean some kind of integration with Google’s Native Client (NaCl) – Like the way Google used the chemical name for salt, makes it nice and memorable. or maybe Marmalade can target HTML 5 some how?
  • Enhanced native UI – I think that we can safely assume this will include support for many more native controls?
  • New Platforms – Ok, it’s obvious what this means, but which platforms? Would be fantastic to see support for Raspberry Pi and Windows Phone 7, although I think WP7 is a closed system so maybe not. What other platforms could we see Marmalade support?

Feel free to leave your own speculations as a comment.

Raspberry Pi – The $25 Computer

Want to begin raising awareness of a new computer that’s coming out very soon called the Raspberry Pi (http://www.raspberrypi.org/). It’s basically a $25 credit sized computer that plugs into a display / keyboard etc.. I like to call it mini-awesome!

The computer is reported to have better performance than the iPhone 4S. Heres the basic specs:

  • The SoC is a Broadcom BCM2835. This contains an ARM1176JZFS, with floating point, running at 700Mhz, and a Videocore 4 GPU. The GPU is capable of BluRay quality playback, using H.264 at 40MBits/s. It has a fast 3D core accessed using the supplied OpenGL ES2.0 and OpenVG libraries.
  • RAM 128MB (Model A), 256MB (Model B)
  • USB Ports: 1 (2 on Model B)
  • Video Outputs: Composite RCA, HDMI
  • Audio Outputs: 3.5 mm jack, HDMI
  • On-board Storage: SD / MMC / SDIO card slot
  • On-board Network: None (Model A) , 10/100 Ethernet (RJ45) (Model B)

And its small enough to fit in your wallet! Like I said mini-awesome

We are so impressed with this little marvel that we are considering porting the IwGame Engine over to enable hobbyist and indie developers to get games up and running quickly on the platform.

Would like to hear your thoughts on the Raspberry Pi

IwGame Engine v0.29 Released – XOML is evolving

New here? What’s IwGame? IwGame is an open source free to use cross platform game engine for iPhone, iPad, Android, Bada, Playbook, Symbian, Windows Mobile, LG-TV, Windows and Mac, built on top of the Marmalade SDK. You can find out more and download the SDK from our IwGame Engine page.

The Universe conspired against me this week, first of all landing me with a nice flu, followed directly by some horrible sickness bug that featured projectile vomiting of the likes only seen in movies such as the Exorcist! Thankfully the Universe decided to give me a break this week so an IwGame Engine update got finished.

Most of the changes this week are XOML related as this is the general direction we want to take the game engine. A good mix of XOML mark-up and solid coding should make games and media apps very quick and easy to develop.

Oh and we got a new logo for the IwGame Engine woohoo! Feel free to use the logo in any of your IwGame powered products, or if you want to link to us.

Ok, onto the list of iwGame Engine changes for v0.29:

  • New style system added to XOML. Actors and scenes can now use a style to reduce repetition
  • Actors and scenes now handle events such as OnSuspend, OnTapped, OnBeginTouch etc.. When an event fires it executes a collection of actions
  • Actions added to XOML to allow definition of collections of actions that can be executed. Many default actions are suppported such as ChangeScene, KillScene, PlayTimeline, PlaySound etc.. Custom actions can also be added toextend the system
  • CIwGame now handles touch begin touch, end touch and tapped events
  • CIwGame now has new Postdraw() method for adding in custom post draw rendering
  • Actors can now be made tappable and now handle OnTapped(), OnBeginTouch() and OnEndTouchEvents()
  • Actors have new HitTest() method that can be used to check if a point is inside the actors visual
  • XOML now supports creation of cameras
  • XOML now supports creation of variables and update of variables using actions, supports string, bool, int, float, vec2, vec3 and vec4
  • XOML files can now load other XOML files with new LoadXOML tag as well as LoadXOML action
  • Scenes now support a type field
  • CIwGameBitmapSprite now supports image transforms (flips. mirrors etc) which can be also applied to actors visuals using FlipX and FlipY attributes
  • You now change the current time of a CIwGameAnimInstance and CIwGameAnimTimeline
  • Bug Fix – Actor visibile state now works properly
  • Bug Fix – CIwGameShape::setShape() now works
  • Bug Fix – Transform is now reset after CIwGameAdsView finishes rendering
  • Bug Fix – JPEG file detection fixed, was not detecting certain types of JPEG files
  • Bug Fix – CIwGameString::FindNext() crash fixed

Quite a few changes and bug fixes. Note that someo f the bug fixes directly affected IwGameAds so an update to that API will be released shortly.

Lets take a look at the changes in more detail.

XOML Variables

XOML got variables, but why? Well, there are a number of reasons:

  • We want to be able to define values that can be read by the main code
  • We want to change these values via actions
  • When we implement the UI system we are looking to add data binding capabilities that will rely on values

You can declare a variable in XOML like this:

    <Variable Name="PlayerName" Type="string" Value="Player One" />
    <Variable Name="PlayerScore" Type="int" Value="0" />
    <Variable Name="PlayColour" Type="vec4" Value="255, 128, 64, 8" />

You can later modify the value of that variable using a SetVar action, more on this later.

Each scene contains its own variables collection and the global resource system also contains a global variables collection.

XOML Styles

XOML now supports the styling of actors and scenes using the new Style tag. XOML styles enable you to create a set of properties and values that are common across a range of objects then apply tat style the to them all. Hers a quick

example:

<Style Name="BasicActorStyle">
    <Set Property="Size" Value="60, 60" />
    <Set Property="Angle" Value="0" />
    <Set Property="SrcRect" Value="0, 0, 36, 40" />
    <Set Property="Image" Value="Sprites" />
    <Set Property="Timeline" Value="Player1Intro1" />
    <Set Property="Shape" Value="PlayerShape" />
    <Set Property="Box2dMaterial" Value="BounceyBall" />
    <Set Property="CollisionFlags" Value="1, 1, 1" />
</Style>

<TestActor Name=”Player2″ Style=”BasicActorStyle” Position=”0, -150″ />

The TestActor Player2 will be assigned all of the values in the properties defined in the style saving you a whole bunch of typing as well as making your mark-up much more readable and easier to maintain.

XOML Events And Actions

Actors and scenes now support various events that can fire off user defined actions. The following events are currently defined:

Scenes:

  • OnSuspend – Called when a scene is suspended
  • OnResume – Called when a scene is resumed

Actors:

  • OnTapped – Called when the user taps an actor
  • OnBeginTouch – Called when the user begins to touch an actor
  • OnEndTouch – Called when the user stops touching an actor

More will be added as we think of them or when requested. You can also add your own custom events youself. Check out the CIwGameActor class for a reference on how to do this.

Events wouldn’t really be much use unless we could carry out some kind of action when the event occurred. Actions are defined in XOML using the Actions tag, heres an example:

<Scene Name="GameScene3" Style="GenericSceneStyle" OnSuspend="SuspendActions">
    <Actions Name="SuspendActions">
        <Action Method="SetTimeline" Param1="SceneTransition1" />
        <Action Method="PlaySound" Param1="explosion" />
    </Actions>
</Scene>

You actually create a group of actions that are all executed when the action is called by an event.

The following actions are currently supported:

  • ChangeScene – Changes the currently focused scene to the specified scene
  • SuspendScene – Suspends the specified sceme
  • ResumeScene– Resumes the specified sceme
  • HideScene– Hides the specified sceme
  • ShowScene– Shows the specified sceme
  • ActivateScene – Activates the specified sceme
  • DeactivateScene – Deactivates the specified sceme
  • KillScene – Destroys and removes the specified sceme from the game, all contained resources amd actors will be also be destroyed
  • HideActor – Hides the specified actor
  • ShowActor – Shows the specified actor
  • ActivateActor – Activates the specified actor
  • DeactivateActor – Deactivates the specified actor
  • KillActor – Kills and removes the specified actor
  • PlayTimeline – Plays the specified timeline. If no timeline is supplied then the current actor / scenes timeline will be restarted (depends on where the action was defined)
  • StopTimeline – Stops the specified timeline. If no timeline is supplied then the current timeline will be stopped. (depends on where the action was defined)
  • SetTimeline – Changes to the specified timeline. If no timeline is supplied then the current timeline will changed and restarted. (depends on where the action was defined)
  • PlaySound – Starts playing a sound effect
  • PlayMusic – Starts the playing specified music file
  • StopMusic – Stops the music player playing
  • LoadXOML – Loads a XOML file into scene or globally. If a scene is provided then the XOML will be loaded into that scene
  • SetVar – Sets the value of a variable

Again, more will be added as we think of them or when requested. You can also add your own custom actions youself. Check out the CIwGameXomlAction_Actors class for a reference on how to do this.

Coupled together the events and actions system provide a very powerful way of creating fully interactive content without having to write a single line of code.

Loading Other XOML Files

It is now possible to load other XOML files from a XOML file using the new LoadXOML tag. Heres an example:

<LoadXOML File="Common.xml" />
<LoadXOML File="Sceme2.xml" />
<LoadXOML File="Scene3.xml" />

You can also (as shown in the actions section) load a XOML file from an action.

Using this system you can create fully interactive navigation based content. Think adventure games, books, magazines and informational apps etc..

Scene Cameras

Cameras can now be defined in XOML and attached to scenes. You can also switch a scenes camera using the animation system.

Image Transforms for Sprites and Actors

Sprites and actors can now use an image transform allowing you to flip the source image used to render the object. The ne FlipX and FlipY attributes are now available in XOML.

Well thats it for this update. IwGame now has some very cool features that should hopefully make game / app development much easier and quicker for everyone.

We are going to assess the possibility of wrapping up Marmalades cool UI system with XOML very soon, will keep you all posted on how that goes. I am also looking at producing a new article on in-app purchasing with the Marmalade SDK, which will form the basis of in-app purchasing for the IwGame engine.

POLL: Using IwGameAds or Planning To?

Hi Everyone,

We currently don’t have a clue as to how many developers are using or planning to use IwGameAds. Please let us know by selecting one of the following options

[poll id=”3″]

Thanks for voting!