<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Gamedev Coder Diary</title>
	<atom:link href="http://gamedevcoder.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gamedevcoder.wordpress.com</link>
	<description>All kinds of game development related stuff</description>
	<lastBuildDate>Thu, 09 May 2013 12:15:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gamedevcoder.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Gamedev Coder Diary</title>
		<link>http://gamedevcoder.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gamedevcoder.wordpress.com/osd.xml" title="Gamedev Coder Diary" />
	<atom:link rel='hub' href='http://gamedevcoder.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Binding C++ with Lua, Squirrel, Game Monkey and Ocaml</title>
		<link>http://gamedevcoder.wordpress.com/2013/05/09/binding-c-with-lua-squirrel-game-monkey-and-ocaml/</link>
		<comments>http://gamedevcoder.wordpress.com/2013/05/09/binding-c-with-lua-squirrel-game-monkey-and-ocaml/#comments</comments>
		<pubDate>Thu, 09 May 2013 12:15:21 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=947</guid>
		<description><![CDATA[This isn&#8217;t anything new I did recently but I thought it&#8217;s worth putting up on my blog anyway. I was once interested how easy it is to implement robust binding between C++ and several popular, mostly scripting, languages. If you &#8230; <a href="http://gamedevcoder.wordpress.com/2013/05/09/binding-c-with-lua-squirrel-game-monkey-and-ocaml/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=947&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This isn&#8217;t anything new I did recently but I thought it&#8217;s worth putting up on my blog anyway. I was once interested how easy it is to implement robust binding between C++ and several popular, mostly scripting, languages.</p>
<p>If you search on the internet there&#8217;s heaps of libraries that make the process of binding of various scripting languages with C++ easier &#8211; check out <a href="http://lua-users.org/wiki/BindingCodeToLua">this</a> for lua or <a href="http://wiki.squirrel-lang.org/default.aspx/SquirrelWiki/-1'.html">this</a> for Squirrel binding options.</p>
<p>So, why I did I make another one? The first reason was I wanted to learn more about scripting languages and the second one was I wanted the same interface for use with all languages to be able to easily switch between them.</p>
<p><strong>C++ library</strong></p>
<p>The result of all that is my <a href="https://code.google.com/p/multi-script/">MultiScript library</a> that:</p>
<ul>
<li><span style="line-height:1.5;">allows script code to access C++ classes and functions and</span></li>
<li><span style="line-height:1.5;">allows C++ code to access script functions</span></li>
</ul>
<p>The library has a very simple C++ interface with 4 different implementations for the following languages:</p>
<ul>
<li><a href="http://www.lua.org/"><span style="line-height:1.5;">Lua</span></a></li>
<li><a href="http://squirrel-lang.org/"><span style="line-height:1.5;">Squirrel</span></a></li>
<li><a href="http://www.somedude.net/gamemonkey/"><span style="line-height:1.5;">Game Monkey</span></a></li>
<li><span style="line-height:1.5;"><a href="http://caml.inria.fr/">Ocaml</a> (no binding of classes as this isn&#8217;t easily doable with Ocaml vm)</span></li>
</ul>
<p>The interface itself consists of:</p>
<ul>
<li><span style="line-height:1.5;"><em>ScriptContext</em> &#8211; responsible for maintaining script execution context; registers classes and functions</span></li>
<li><span style="line-height:1.5;"><em>ScriptStack</em> &#8211; used to handle function calls including pushing and popping values on stack</span></li>
<li><span style="line-height:1.5;"><em>ScriptObject</em> &#8211; base C++ class for objects to be visible from script</span></li>
<li><span style="line-height:1.5;"><em>ClassDesc</em>, <em>FunctionDesc</em> etc. &#8211; helper structs used to describe classes and functions to be registered</span></li>
</ul>
<p>The library comes with a simple test project that runs test programs for all languages and prints out their output along with some statistics. The source code of all these languages is included.</p>
<p><strong>Ocaml</strong></p>
<p>Ocaml binding implementation deserves separate paragraph or two as it wasn&#8217;t as straightforward as I had hoped originally and I ended up modifying source code of the Ocaml VM (virtual machine) so I could easily load-from-string and run multiple times a chunk of Ocaml code as well as dynamically register C++ functions with Ocaml runtime. Apparently Ocaml VM wasn&#8217;t meant to be used as an embedded scripting language the way Lua is.</p>
<p>Binding C++ classes would most likely require a lot more work to get done, so I gave up on that. All of the modifications are clearly marked with &#8220;<em>msawitus</em>&#8221; in the comments.</p>
<p>In order to be able to run Ocaml tests you have to install Ocaml binary distribution from <a href="http://caml.inria.fr/download.en.html">Inria download site</a>. It is necessary to compile (not execute) Ocaml code.</p>
<p><strong>Summary</strong></p>
<p><span style="line-height:1.5;">Implementation for both Lua and Squirrel are very similar &#8211; after all Squirrel is heavily based on Lua. Getting my head around Lua concepts required a little bit of effort at first but it was straightforward after all. Game Monkey binding was straightforward to do from the very beginning, even without docs and Ocaml was a bit of trial and error experimentation.</span></p>
<p>I should also point out that this was just an experimental project and it&#8217;s nowhere near production quality code. But it&#8217;s probably worth looking at if you&#8217;re wondering which scripting language to choose for your next project.</p>
<p>Project source code is hosted <a href="https://code.google.com/p/multi-script/">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/947/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/947/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=947&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2013/05/09/binding-c-with-lua-squirrel-game-monkey-and-ocaml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>
	</item>
		<item>
		<title>Naive #include Optimizer for C++</title>
		<link>http://gamedevcoder.wordpress.com/2013/04/29/naive-include-optimizer-for-c/</link>
		<comments>http://gamedevcoder.wordpress.com/2013/04/29/naive-include-optimizer-for-c/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 12:00:28 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[general programming]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=927</guid>
		<description><![CDATA[Here&#8217;s my simple and really basic utility written in C# that optimizes Visual Studio project by removing redundant #include lines where possible. Why having redundant #includes is so bad? The answer is simple &#8211; it can severely slow down the &#8230; <a href="http://gamedevcoder.wordpress.com/2013/04/29/naive-include-optimizer-for-c/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=927&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s my simple and really basic utility written in C# that optimizes Visual Studio project by removing redundant #include lines where possible. Why having redundant #includes is so bad? The answer is simple &#8211; it can severely slow down the compilation process.</p>
<p>Download: <a href="https://code.google.com/p/naive-include-optimizer/downloads/list">Source and Binary</a></p>
<p>Example usage:</p>
<p>NaiveIncludeOptimizer.exe &#8220;C:/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE/devenv.exe&#8221; &#8220;C:/my_project/my_project.sln&#8221; &#8220;Debug&#8221; &#8220;C:/my_project/src&#8221;</p>
<p>Example output:</p>
<pre>Optimizing Main.cpp...
    Redundant #include External.h
    Redundant #include Misc.h
Optimizing Misc.cpp...
    Redundant #include Common.h
    Redundant #include API.h
    Redundant #include Defines.h
DONE!</pre>
<p>The way it works is very brute force (hence the &#8220;Naive&#8221; in the name) meaning it tests every #include individually to see if the solution would still build if it was removed. So, yes, that means larger projects may even take days to process! But in the end it does work (mostly &#8211; see below when it doesn&#8217;t).</p>
<p>Be careful because it does modify the source code. But while doing so, it always creates a backup copy. Bonus feature is that it is capable of resuming from where it stopped last time.</p>
<p>Also, please note that it only optimizes .cpp files. Optimizing .h files would obviously take a lot longer!</p>
<p>I should also point out that the proper way of doing this would be implementing full blown C++ preprocessor that would include:</p>
<p>* removing redundant #includes</p>
<p>* adding forward declares where possible</p>
<p>* making sure that the actual code generated does not change (my solution may result in some undesired program &#8220;optimizations&#8221; &#8211; e.g. by removing #include &#8220;my_new_operators.h&#8221; the definition of your new/delete operators might change but the project would still build successfully)</p>
<p>It&#8217;s obviously a lot more work but fortunately that&#8217;s exactly how Google&#8217;s <a href="https://code.google.com/p/include-what-you-use/">Include-What-You-Use</a> is meant to work. I haven&#8217;t tried it but it looks neat.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/927/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/927/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=927&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2013/04/29/naive-include-optimizer-for-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>
	</item>
		<item>
		<title>The end of my indie game devevelopment adventure</title>
		<link>http://gamedevcoder.wordpress.com/2013/03/27/end-of-my-indie-game-devevelopment-adventure/</link>
		<comments>http://gamedevcoder.wordpress.com/2013/03/27/end-of-my-indie-game-devevelopment-adventure/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 22:51:07 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=912</guid>
		<description><![CDATA[As of today some of my games on some of the platforms are no longer available and the reason I pulled them is simply because they don&#8217;t make enough profit. But fortunately they&#8217;re not totally gone as I decided to &#8230; <a href="http://gamedevcoder.wordpress.com/2013/03/27/end-of-my-indie-game-devevelopment-adventure/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=912&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>As of today some of my games on some of the platforms are no longer available and the reason I pulled them is simply because they don&#8217;t make enough profit.</p>
<p>But fortunately they&#8217;re not totally gone as I decided to put a link to Monstaaa! for Android on my site. All you have to do is download and install it on your android device. And if you don&#8217;t know how you can do it, read this article: <a href="http://maketecheasier.com/install-applications-without-the-market/2011/01/28">3 ways to install applications on android without market</a>. The game has in-app purchase to unlock second part of the game but that is obviously not working now that the game is not on Google Play anymore. Anyway, have fun <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Download: <a href="http://www.pixelelephant.com/down/Monstaaa.apk">Monstaaa! Android</a></p>
<p><a style="line-height:1.5;" href="https://gamedevcoder.files.wordpress.com/2012/05/cross_promo2x.png"><img class="alignnone  wp-image-588" alt="cross_promo@2x" src="https://gamedevcoder.files.wordpress.com/2012/05/cross_promo2x.png?w=307&#038;h=171" width="307" height="171" /></a></p>
<p>Meanwhile, Puzzled Rabbit for <a href="https://market.android.com/details?id=com.pixelelephant.puzzledrabbitq">Android</a>, <a href="http://appworld.blackberry.com/webstore/content/58170">Blackberry PlayBook</a>, <a href="http://marketplace.xbox.com/en-US/Product/Puzzled-Rabbit/66acd000-77fe-1000-9115-d80258550973">XBLIG</a> and <a href="http://www.desura.com/games/puzzled-rabbit">PC</a> is still available.</p>
<p><a href="http://gamedevcoder.files.wordpress.com/2012/02/iphone0.png"><img class="alignnone  wp-image-536" alt="iphone0" src="http://gamedevcoder.files.wordpress.com/2012/02/iphone0.png?w=288&#038;h=192" width="288" height="192" /></a></p>
<p>iOS versions of both games are gone for good now that I removed my developer account on iOS. And unlike with Android version, self-distributing iOS executable does not even make sense (assuming one would like to install and play it legally).</p>
<p><span style="line-height:1.5;">Apparently indie game development, in particular on mobile platforms, is really tough these days. The way I see things is that iOS / Android gold rush is gone and it&#8217;s now incredibly difficult to compete when you&#8217;re a small developer because in order to succeed you not only need an exceptionally good, original and polished game but you also need to be visible on the market. And that takes a lot of hard work, talent and some luck too.</span></p>
<p><span style="line-height:1.5;">Finally I have to say that I am really glad I tried indie game development as I would otherwise not fully understand why it is so difficult and would probably regret not having tried it. I have also learned a lot and had a really good time while it lasted. </span>If you want to learn more about my 10 month long indie adventure have a look at my past blog posts and try to learn something from it.</p>
<p><a style="line-height:1.5;" href="http://gamedevcoder.wordpress.com/2012/02/01/ios-and-android-game-development-on-windows/">iOS and Android game development on Windows</a></p>
<p><a href="http://gamedevcoder.wordpress.com/2012/05/14/monstaaa-for-ios-the-first-announcement/">Monstaaa! for iOS &#8211; the first announcement</a></p>
<p><a href="http://gamedevcoder.wordpress.com/2012/05/29/monstaaa-development-summary-part-1/">Monstaaa! development summary &#8211; part 1</a></p>
<p><a href="http://gamedevcoder.wordpress.com/2012/06/09/monstaaa-development-summary-part-2/">Monstaaa! development summary &#8211; part 2</a></p>
<p><a href="http://gamedevcoder.wordpress.com/2012/07/22/monstaaa-development-summary-part-3/">How I sold 22 copies of my game in 3 weeks on Android</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/912/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=912&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2013/03/27/end-of-my-indie-game-devevelopment-adventure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/cross_promo2x.png" medium="image">
			<media:title type="html">cross_promo@2x</media:title>
		</media:content>

		<media:content url="http://gamedevcoder.files.wordpress.com/2012/02/iphone0.png" medium="image">
			<media:title type="html">iphone0</media:title>
		</media:content>
	</item>
		<item>
		<title>Practical C++ RTTI for games</title>
		<link>http://gamedevcoder.wordpress.com/2013/02/16/c-plus-plus-rtti-for-games/</link>
		<comments>http://gamedevcoder.wordpress.com/2013/02/16/c-plus-plus-rtti-for-games/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 23:18:41 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[game engine]]></category>
		<category><![CDATA[general programming]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=867</guid>
		<description><![CDATA[There&#8217;s at least few popular approaches to C++ based RTTI (aka Run-Time Type Information) implementation in games.&#160;The goal of this post is to discuss strengths and weaknesses of major ones. But before that let&#8217;s have a look at some of &#8230; <a href="http://gamedevcoder.wordpress.com/2013/02/16/c-plus-plus-rtti-for-games/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=867&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s at least few popular approaches to C++ based <a href="http://en.wikipedia.org/wiki/Run-time_type_information">RTTI</a> (aka Run-Time Type Information) implementation in games.&nbsp;The goal of this post is to discuss strengths and weaknesses of major ones.</p>
<p>But before that let&#8217;s have a look at some of the most common uses of RTTI in games. In fact they are not much, if at all, different from any other, non-game related, project.</p>
<p><strong>(a) Run-time type checking and instancing.</strong></p>
<p>Being able to check what&#8217;s the actual class of an object is often useful functionality for gameplay programmers:</p>
<pre>bool Object::InstanceOf(Class* _class) const;</pre>
<p>Another useful feature is ability to instantiate an object knowing its class name:</p>
<pre>Class* ClassManager::FindClassByName(const char* className);

Object* Class::CreateInstance();</pre>
<p>To implement above basic RTTI functionality, we&#8217;re usually required to derive all of our game classes from some base <em>Object</em> class.&nbsp;Supporting multi-inheritance is possible but typically avoided because in most cases it&#8217;s just not needed but would make things a lot more complex otherwise.</p>
<p><a href="http://www.realityprime.com/blog/2007/03/the-audience/">Reality Prime&#8217;s dev blog</a> shows basic implementation of such RTTI system.</p>
<p><strong>(b) Automatic serialization of objects and their attributes.</strong></p>
<p>Instead of implementing custom <em>Read() / Write()</em> methods for each class where every property is manually processed, we can now (with RTTI system in place) implement generic <em>Read()</em> and <em>Write()</em> methods that will work for all classes. Alternatively we can write single <em>Serialize(Serializer&amp;)</em> method that would either read or write (or do other things) depending on implementation of <em>Serializer</em>.</p>
<p>But while this feature sounds great it has one serious downside &#8211; very limited support for data versioning.&nbsp;Imagine one day you decide to change some &#8216;<em style="color:#444444;">int m_Name</em>&#8216; attribute into &#8216;<em style="color:#444444;">String m_Name</em>&#8216; attribute. How would you want your game to load the old data and convert into new format? Would you want to perform some kind of &#8216;offline&#8217; conversion by running hacked version of the game over all of the data? If so, you&#8217;d have to do so for all of the relevant game data files at once. In a big team working on a game that is obviously a challenge because the person performing conversion must assure no one else has got any important local changes on their PC.</p>
<p>Or even worse, suppose your game has already been released and there&#8217;s tons of content (e.g. levels, quests, puzzles) created by the community. Simply changing the format of the data expected by an updated game executable would break all of that content unless you provide way to convert from the old format into new one.</p>
<p>To some extent this upgrade process can be automated as demonstrated by&nbsp;<a href="http://www.insomniacgames.com/new-generation-of-insomniacgames-tools-as-webapp/">Insomniacs</a>&nbsp;(unfortunately, to my knowledge, the actual explanation of that can only be found in GDC slides or articles in paid magazines). Their system of lazy upgrade script evaluation assures that every asset you get from asset database is always in latest format.</p>
<p>Having said all that I should point out that some projects don&#8217;t need robust data versioning at all and therefore may well benefit from automatic serialization. This is especially true for small projects without support for community created content.</p>
<p><strong>(c) Game editor integration</strong></p>
<p>Another great benefit of RTTI is that it allows class attributes to be automatically exposed for editing within some kind of visual editor. This feature may require additional editor specific attributes to control how each particular type shall be edited. For example you may want to have nice color selection control instead of having to manually type in individual RGB values; or you may want to limit min and max values of fog intensity by 0..1 range, etc.</p>
<p>This best works with <a href="http://en.wikipedia.org/wiki/Wysiwyg">WYSIWYG</a> game editors which for the purpose of editing use the same C++ classes as the ones used in the game. There&#8217;s no need for intermediate communication layer and every editing action changes the game object directly. As with anything, this has some advantages (mainly easier and cleaner implementation) as well as disadvantages (less efficient and editor-polluted run-time code).</p>
<p><strong>Manual serialization</strong></p>
<p>A well known example of an engine that supports features listed in all above points is Unreal Engine 3. As for the automatic serialization, it only does so for Unreal Script classes. For their C++ classes they use more &#8220;manual&#8221; method which does make a lot of sense because&nbsp;it allows for a flexible data format versioning. Here&#8217;s sample code that demonstrates mentioned &#8220;manual&#8221; method:</p>
<pre><span style="color:#339966;">// Deserializes instance of Dog class</span>
void Dog::Read(Reader&amp; reader)
{
    <span style="color:#339966;">// Deserializes all base class attributes</span>
    Super::Read(reader);

    <span style="color:#339966;">// Read name value</span>
    reader &gt;&gt; m_Name;

    <span style="color:#339966;">// Read color value; only if data has it (old version didn't)</span>
    if (reader.GetDataVersion() &gt;= ENGINE_VER_DOG_ADDED_COLOR)
        reader &gt;&gt; m_Color;

    <span style="color:#339966;">// Read height value; only if data has it (old version didn't)</span>
    if (reader.GetDataVersion() &gt;= ENGINE_VER_DOG_ADDED_HEIGHT)
        reader &gt;&gt; m_Height;
}</pre>
<p>Implementing automatic serialization that would handle all kinds of data versioning correctly is not possible simply because it&#8217;s only programmers who know how data changes between versions. The major limitations&nbsp;of the automatic serialization are as follows:</p>
<ul>
<li>only simple type conversion handled correctly (e.g. int into float)</li>
<li>name changes cause new property to be added and the old one to be removed (thus losing the data)</li>
</ul>
<p>On the other hand, by manually handling data upgrades, one has full control over data conversion.</p>
<p><strong>Type information generation methods.</strong></p>
<p>We now know why RTTI might be useful. But how do we create it? Again, there&#8217;s at least a couple of ways &#8211; from manual intrusive macro/template based ones to automatic offline ones.</p>
<p><strong>(a) Manual intrusive macro/template based method.</strong></p>
<p>One very popular way of creating RTTI in C++ is by adding a couple of special macros and functions to every class. This may look something like this:</p>
<p><em>Header file:</em></p>
<pre><span style="color:#339966;">// Sample Dog class</span>
class Dog : public Animal
{
<span style="color:#339966;">         // Tells RTTI that Dog inherits from Animal</span>
<span style="color:#339966;">         // Also defines some helper functions
</span>    RTTI_DECLARE_CLASS(Dog, Animal)
private:
    int m_Height;    <span style="color:#339966;">// Dog height</span>
    String m_Name;   <span style="color:#339966;">// Dog name</span>
};</pre>
<p><em>Source file:</em></p>
<pre><span style="color:#339966;">// Function declared in RTTI_DECLARE_CLASS macro
// Adds all attributes to class RTTI</span>
void Dog::RTTI_InitAttributes()
{
    <span style="color:#339966;">// Initializes m_Height attribute; figures out type using templates</span>
    RTTI_INIT_ATTRIBUTE(m_Height);

    <span style="color:#339966;">// Initializes m_Name attribute; figures out type using templates</span>
    RTTI_INIT_ATTRIBUTE(m_Name);
}</pre>
<p>The actual initialization of each class is best done manually &#8211; something like this:</p>
<pre>void InitMyClasses()
{
    Object::RTTI_Init();
        Animal::RTTI_Init();
            Dog::RTTI_Init();
            Cat::RTTI_Init();
    [...]
}</pre>
<p>To keep things short I&#8217;m going to skip implementation of&nbsp;<em>RTTI_DECLARE_CLASS</em>&nbsp;and&nbsp;<em>RTTI_INIT_ATTRIBUTE</em> macros. The nice thing about attribute registration is that using C++ template specialization&nbsp;it&#8217;s totally possible to automatically deduce type from a variable &#8211; this is useful because it means you can initialize all attributes with call to the same RTTI_INIT_ATTRIBUTE macro.</p>
<p>The major downside of this approach is that the programmer needs to maintain an up-to-date RTTI initialization code. With the help of automatic attribute type deduction and some C++ macro magic, this can be made safe and less inconvenient but it&#8217;s still not perfect.</p>
<p><strong>(b) Automatic &#8211; parser based.</strong></p>
<p>One totally different approach to building RTTI information is by generating it offline and storing it in a file which is then loaded by run-time. There&#8217;s plenty of C++ code parsers available (e.g.&nbsp;<a href="http://boost-spirit.com/repository/applications/wave.html">Wave</a>&nbsp;or&nbsp;<a href="http://www.gccxml.org/HTML/Index.html">GCCXML</a>) available which you could use but there&#8217;s still some coding required in order to extract selected types for RTTI purposes. You&#8217;d also need to integrate C++ parsing step with your project building, so it wouldn&#8217;t need to be done manually.</p>
<p>One issue with this approach is that the RTTI data generated during preprocessing step might potentially differ between project configurations / platforms. But since gameplay code is typically platform and configuration independent this is probably a very minor issue.</p>
<p>The nice thing about this approach is that, provided parser can extract comments attached to particular class or attribute, it&#8217;s possible to use comment based custom annotation language on a per class or attribute basis. This can be useful in a couple of different scenarios including when you want to mark some attributes as serializable or when you&#8217;d like RTTI for a specific C++ class not to be generated at all. Annotation technique is something that is widely used in other languages such as <a href="http://docs.oracle.com/javase/1.5.0/docs/guide/language/annotations.html">Java</a> or <a href="http://msdn.microsoft.com/en-au/library/dd901590(v=vs.95).aspx">C#</a>.</p>
<p><strong>(c) Automatic &#8211; debug info based.</strong></p>
<p>Yet another approach to building RTTI information is by extracting it straight from debugging information files such PDB on Windows as described on <a href="http://msinilo.pl/blog/?p=517">Maciej Sinilo&#8217;s dev blog</a>. It is a very similar method to the one presented before but one small advantage of it is one doesn&#8217;t need to implement an additional parsing step themself which, depending on how easy parses integration is, might save a lot of work.</p>
<p><strong>Summary</strong></p>
<p>As it often happens, there&#8217;s no best solution that would fit all projects. Every game is different and there&#8217;s games that don&#8217;t need RTTI at all.</p>
<p>For larger game projects with heaps of gameplay editing involved I&#8217;m leaning towards Unreal Engine 3 approach i.e. manual RTTI including manual serialization on the C++ side and automatic RTTI with automatic serialization on the scripting side (assuming there is one). Many popular scripting languages already have full <a href="http://en.wikipedia.org/wiki/Reflection_(computer_programming)">reflection</a> support in place which makes things easier there.</p>
<p>For projects where WYSIWYG editing isn&#8217;t priority, full blown RTTI system with attribute level information may not be necessary at all. Even more so with projects where in-place serialization (one block of memory used for multiple objects) is being done making it mostly redundant to maintain any kind of attribute information at run-time.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/867/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/867/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=867&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2013/02/16/c-plus-plus-rtti-for-games/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>
	</item>
		<item>
		<title>How I sold 22 copies of my game in 3 weeks on Android</title>
		<link>http://gamedevcoder.wordpress.com/2012/07/22/monstaaa-development-summary-part-3/</link>
		<comments>http://gamedevcoder.wordpress.com/2012/07/22/monstaaa-development-summary-part-3/#comments</comments>
		<pubDate>Sun, 22 Jul 2012 06:34:09 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[indie game development]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[mobile game development]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=816</guid>
		<description><![CDATA[To check previous article in the series click here. Free on Android, paid on iOS It&#8217;s been 3 weeks since Monstaaa! release on Android via Google Play, so I thought it&#8217;s high time I share some more statistics. In fact &#8230; <a href="http://gamedevcoder.wordpress.com/2012/07/22/monstaaa-development-summary-part-3/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=816&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>To check previous article in the series click <a href="http://gamedevcoder.wordpress.com/2012/06/09/monstaaa-development-summary-part-2/">here</a>.</p>
<p><strong>Free on Android, paid on iOS</strong></p>
<p>It&#8217;s been 3 weeks since <a href="http://monstaaa.pixelelephant.com/">Monstaaa!</a> release on <a href="http://gamedevcoder.wordpress.com/2013/03/27/end-of-my-indie-game-devevelopment-adventure/">Android</a> via Google Play, so I thought it&#8217;s high time I share some more statistics. In fact they&#8217;ve been rather shocking &#8211; in a negative way, unfortunately &#8211; when it comes to the actual revenues given great reviews (average around 4/5), very positive general feedback, high ratings from users (average around 4.5/5) and higher than with iOS number of downloads (over 10k). Apparently, Android turned out to be a very tough market for Monstaaa!</p>
<p><img class="alignnone size-full wp-image-651 aligncenter" title="Monstaaa_sad_when_bugs_die" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/monstaaa_sad_when_bugs_die2.png?w=640"   /></p>
<p>Keep in mind though that unlike <a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?mt=8">iOS version</a> which is paid at $0.99, Android version is Free with $0.99 in-app purchase that unlocks full game. According to my statistics, Android version has been played on more devices than iOS version and yet the sales have been roughly 50 times lower! Part of the reason for that surely was the fact that iOS version has been featured for one week by Apple themselves in New &amp; Noteworthy (only Australia and New Zealand though!) whereas Android version hasn&#8217;t been mentioned anywhere at Google Play. Besides iOS version had a lot more reviews on gaming portals &#8211; probably result of me pushing a bit more with marketing when iOS version came out.</p>
<p>The thinking behind making the game free on Android was that Android users are, supposedly, less likely to pay up front without trying an app first. That was my guess at least. With Android release I also wanted to experiment with a different than pure paid app model.</p>
<p><strong>Android statistics</strong></p>
<p>Okay, so, let&#8217;s have a look at some actual Android numbers now.</p>
<p>Total number of installations/devices: 11135 (1599 installations via Google Play)<br />
Total number of users who finished all 8 levels in free version: 2281 (20.5% of all users &#8211; not too bad!)</p>
<p>Total number of different device types: 1133 (seems a lot to me!)<br />
And here&#8217;s more detailed breakdown of the device types:<br />
<a href="http://gamedevcoder.files.wordpress.com/2012/07/device_types.png"><img class="wp-image-818 aligncenter" title="device_types" alt="" src="http://gamedevcoder.files.wordpress.com/2012/07/device_types.png?w=512&#038;h=506" width="512" height="506" /></a></p>
<p>Quite a fragmented market, isn&#8217;t it? As you can see, the most popular Android device so far has been <a href="http://en.wikipedia.org/wiki/Samsung_Galaxy_S_II">Samsung Galaxy II</a> (791 devices), then <a href="http://en.wikipedia.org/wiki/Xiaomi_MI-One">MI-One Plus</a> (410 devices; popular in China), then <a href="http://en.wikipedia.org/wiki/Samsung_Galaxy_Ace">Samsung Galaxy Ace</a> (347 devices).</p>
<p>Here I shall also point out that even though the game is officially only available via Google Play, over 80% of all downloads have been made through other portals &#8211; this is quite common in the world of Android. Since the game is free, this doesn&#8217;t hurt at all (as opposed to paid apps which are just being pirated this way). That&#8217;s all based on the stats I get to see from within Google Play admin panel itself compared with my own stats collected from the game directly.</p>
<p>Let&#8217;s now have a look at the number of users and new users per hour over last 3 weeks:</p>
<p><img class="size-full wp-image-821 aligncenter" title="users" alt="" src="http://gamedevcoder.files.wordpress.com/2012/07/users.png?w=640&#038;h=294" width="640" height="294" /></p>
<p>Clearly, the game had its popularity peak at the end of the first week. Since then there&#8217;s been gradual decrease in both, users and new users counts. The peak in downloads most likely corresponds with some, very positive, reviews from <a href="http://www.idroidplay.com/reviews/monstaaa/">iDroidPlay</a> and <a href="http://www.androidzoom.com/android_games/arcade_and_action/monstaaa_cmnne.html">AndroidZoom</a> as well as &#8220;App of the Day&#8221; featuring by the latter.</p>
<p><strong>Android and iOS sales</strong></p>
<p>If you read the title of this post you already know &#8211; the full game has been purchased exactly 22 times! That&#8217;s right! With over 10k downloads, there have only been 22 purchases made on Google Play.</p>
<p>And with iOS, even though things look much better there, sales are still far from satisfying. Over first 2 months the game still hasn&#8217;t even reached $1k in net revenues with no more than $5 a day being made nowadays. With 7 months worth of development, even for a single developer, this obviously won&#8217;t pay the bills. Well, it won&#8217;t even cover basic out of pocket development costs!</p>
<p><strong>Confusion</strong></p>
<p>What&#8217;s the reasons for such poor Android sales? Too many levels in free versions? Too high difficulty level? Lack of additional in-app purchases / items in game? Oversaturated market when it comes to physics based puzzle games? Should it be made paid like on iOS? Or is it just lack of luck? I really wish I knew and I&#8217;d be really glad to hear others&#8217; opinions!</p>
<p>Sometimes I feel like the more I try to understand things, the worse the actual results are. At least with Android that is the case. And probably the most confusing for me is the fact that the game had many really good reviews and has been mentioned but a number of prominent gaming portals or blogs. No review to this date (except for one) points out any significant flaws with Monstaaa! which I think suggests there isn&#8217;t any obvious issue there. In fact most of reviews highlight the good things about the game &#8211; things like good graphics and audio, fun game-play or well done tilt controls.</p>
<p>Here&#8217;s few game reviews if you want to check them yourself:<br />
<a href="http://www.148apps.com/reviews/monstaaa-review/">148 Apps</a><br />
<a href="http://ifanzine.com/monstaaa-review/">iFanzine</a><br />
<a href="http://gigaom.com/apple/games-for-the-weekend-monstaaa/">GigaOm</a><br />
<a href="http://www.appsontapp.com/top-5-maze-puzzle-games-for-ios/">AppsOnTapp</a><br />
<a href="http://www.padvance.com/story/impressive-looking-tilt-puzzler-monstaaa-hits-app-store">PadVance</a><br />
<a href="http://www.ausgamers.com/news/read/3219025/return-of-the-aussie-developed-app-of-the-week-montsaaa!">AusGamers</a></p>
<p>Ironically, if the reviews were bad it would have been much easier for me to understand the problem! <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>And it&#8217;s even more confusing when you realize that over 20% of all users complete the whole demo version &#8211; this I believe is quite a large percentage. And yet, only less than 1.0% of these users unlock the full game.</p>
<p><strong>Summary</strong></p>
<p>But let&#8217;s not be too pessimistic! How many game devs succeed with their first or second game? Of course it&#8217;s a dream of every developer that their first game is success big enough so they can comfortably work on another one but one has to be realistic and the reality is that only very few succeed straight away.</p>
<p>My experiment with indie game development hasn&#8217;t worked out financially so far but I didn&#8217;t even spend a year on it and, fortunately, I also didn&#8217;t spend too much money on it. By making and releasing <a href="https://gamedevcoder.wordpress.com/my-games/">two games</a> I learned a lot about mobile game development and I do plan to try again in some future! In the &#8220;meantime&#8221; I&#8217;m going back to more stable life joining one Electronic Arts studio in Melbourne which I&#8217;m sure will be another exciting chapter on my game development adventure!</p>
<p><img class="alignnone size-full wp-image-649 aligncenter" title="Untitled" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/untitled.png?w=640"   /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/816/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/816/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=816&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2012/07/22/monstaaa-development-summary-part-3/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/monstaaa_sad_when_bugs_die2.png" medium="image">
			<media:title type="html">Monstaaa_sad_when_bugs_die</media:title>
		</media:content>

		<media:content url="http://gamedevcoder.files.wordpress.com/2012/07/device_types.png" medium="image">
			<media:title type="html">device_types</media:title>
		</media:content>

		<media:content url="http://gamedevcoder.files.wordpress.com/2012/07/users.png" medium="image">
			<media:title type="html">users</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/untitled.png" medium="image">
			<media:title type="html">Untitled</media:title>
		</media:content>
	</item>
		<item>
		<title>Robust iCloud implementation for games</title>
		<link>http://gamedevcoder.wordpress.com/2012/07/09/robust-icloud-implementation-for-games/</link>
		<comments>http://gamedevcoder.wordpress.com/2012/07/09/robust-icloud-implementation-for-games/#comments</comments>
		<pubDate>Mon, 09 Jul 2012 12:16:38 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[game engine]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[mobile game development]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=562</guid>
		<description><![CDATA[For my second iOS game Monstaaa! I wanted to take advantage of the new iOS 5 feature iCloud and use it to store savegames &#8211; play on one device, then later continue on another one. Pretty basic iCloud usage scenario &#8230; <a href="http://gamedevcoder.wordpress.com/2012/07/09/robust-icloud-implementation-for-games/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=562&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>For my second iOS game <a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?mt=8">Monstaaa!</a> I wanted to take advantage of the new iOS 5 feature iCloud and use it to store savegames &#8211; play on one device, then later continue on another one. Pretty basic iCloud usage scenario and so, you might think I should easily find some relevant tutorials or sample code on the internet.&nbsp;Well, not quite so easily&#8230;</p>
<p><img class="alignnone size-full wp-image-803 aligncenter" title="images" src="http://gamedevcoder.files.wordpress.com/2012/07/images.jpg?w=640" alt=""   /></p>
<p>The best resource I found was the following series of tutorials: <a href="http://www.raywenderlich.com/6015/beginning-icloud-in-ios-5-tutorial-part-1">Beginning iCloud in iOS 5</a>. It is does explain&nbsp;well&nbsp;the basics of iCloud usage but unfortunately it doesn&#8217;t go as far as implementing iCloud conflict resolution &#8211; something that is strictly required if you&#8217;re seriously considering using iCloud for your game. Besides, Apple doesn&#8217;t make it easy for you either to understand how one is supposed to implement it.</p>
<p>The small library that I implemented handles all that is needed for a simple game savegame i.e. creation &amp; writing to iCloud file, reading from iCloud file&nbsp;and, very importantly, iCloud file conflict resolution. The library has been implemented as an extension for <a href="http://madewithmarmalade.com">Marmalade SDK</a> (cross platform mobile development SDK) but if you don&#8217;t use it, don&#8217;t worry, it is fairly trivial to make it stand-alone library.</p>
<p>The library has C++ interface but the majority of the code is in Objective-C. You can get it from github:&nbsp;<a href="https://github.com/macieks/s3eIOSiCloud">https://github.com/macieks/s3eIOSiCloud</a>&nbsp;If you just want to see the _code_ or don&#8217;t use Marmalade SDK check these <a href="https://github.com/macieks/s3eIOSiCloud/blob/master/source/iphone/s3eIOSiCloud_platform.mm">source</a>&nbsp;and <a href="https://github.com/macieks/s3eIOSiCloud/blob/master/h/s3eIOSiCloud.h">header</a> files.</p>
<p>The basic idea behind the library is you store your savegame both locally (on the device) and remotely (in iCloud). The reason we always store local savegame version is quite obvious &#8211; if an app fails to connect to iCloud for any reason, you won&#8217;t just lose the progress. Once iCloud becomes available again, we then connect back to it and, optionally, resolve conflicts that occurred in the meantime due to savegames done on other devices.</p>
<p>The library notifies the app whenever it has successfully read the file or whenever conflict has been detected. It&#8217;s then up to the app to resolve the conflicts and merge remote with local savegame. The callback in both cases is exactly the same &#8211; the app is given the data (i.e. <em>void* data</em> and <em>int size</em>) to merge with and that&#8217;s it. The actual merging operation is application specific &#8211; every game will merge differently. And just to make sure everything is well explained here, what I mean by merging is making one out of two different savegames. Let&#8217;s say the player has completed levels 1,2,3 on their iPhone and levels 2,4,5 on their iPad &#8211; the resulting merged savegame should contain information about levels 1,2,3,4,5 being completed.</p>
<p>Here&#8217;s quick intro on how to use the code. <em>MySaveGame</em> struct represents sample savegame with boolean values indicating which levels have been completed and <em>MyMergeFunc</em> is the merge callback registered with the library.</p>
<pre>#include "s3eIOSiCloud.h"

#define NUM_LEVELS 100

struct MySaveGame
{
	bool m_completedLevels[NUM_LEVELS];
};

MySaveGame localSaveGame;

int MyMergeFunc(void* systemData, void*)
{
	s3eIOSiCloudDataToMergeWith* data =
            (s3eIOSiCloudDataToMergeWith*) systemData;
        MySaveGame* remoteSaveGame = (MySaveGame*) data-&gt;m_data;

	// Merge remote and local savegames

        for (int i = 0; i &lt; NUM_LEVELS; i++)
             if (remoteSaveGame-&gt;m_completedLevels[i])
                localSaveGame.m_completedLevels[i] = true;

	// Store savegame locally (fopen / fwrite / fclose)

	bool savedLocally = [...]

	// Return success or failure to iCloud library

	return savedLocally ? 0 : 1;
}</pre>
<p>The callback gets the data to merge with, performs app specific merging operation and then stores the savegame locally.</p>
<p>Let&#8217;s now initialize iCloud for &#8220;<em>my_save_game.txt</em>&#8221; file:</p>
<pre>s3eIOSiCloudRegister(S3E_IOSICLOUD_CALLBACK_MERGE, MyMergeFunc,0);
s3eIOSiCloudStart("my_save_game.txt", S3E_TRUE);</pre>
<p>The code above registers merge callback, then starts iCloud service for a specific file.</p>
<p>To make sure read and write operations are being retried internally, simply do this every frame:</p>
<pre>s3eIOSiCloudTick();</pre>
<p>And finally, to store savegame in iCloud do this:</p>
<pre>s3eIOSiCloudWrite(&amp;localSaveGame, sizeof(MySaveGame));</pre>
<p>Now, as I said, if you want to use the code but you don&#8217;t use Marmalade you should easily be able to get rid of Marmalade specific code &#8211; mostly message logging and callback handling. There&#8217;s no heavy Marmalade dependencies anywhere.</p>
<p>Finally, to make you feel better about the library I&#8217;m just going to say that it&#8217;s been already successfully used by two of my iOS games &#8211; <a href="http://monstaaa.pixelelephant.com">Monstaaa!</a> and <a href="http://puzzledrabbit.pixelelephant.com">Puzzled Rabbit</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/562/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/562/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=562&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2012/07/09/robust-icloud-implementation-for-games/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>

		<media:content url="http://gamedevcoder.files.wordpress.com/2012/07/images.jpg" medium="image">
			<media:title type="html">images</media:title>
		</media:content>
	</item>
		<item>
		<title>Monstaaa! development summary &#8211; part 2</title>
		<link>http://gamedevcoder.wordpress.com/2012/06/09/monstaaa-development-summary-part-2/</link>
		<comments>http://gamedevcoder.wordpress.com/2012/06/09/monstaaa-development-summary-part-2/#comments</comments>
		<pubDate>Sat, 09 Jun 2012 01:18:34 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[indie game development]]></category>
		<category><![CDATA[mobile game development]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=659</guid>
		<description><![CDATA[Note: click here to read part 1 of the Monstaaa! development summary. It&#8217;s been over a week since my iOS game Monstaaa! was released on the AppStore. The game was featured in Apple&#8217;s New &#38; Noteworthy on the iPhone (Australia and &#8230; <a href="http://gamedevcoder.wordpress.com/2012/06/09/monstaaa-development-summary-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=659&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Note: click <a href="http://gamedevcoder.wordpress.com/2012/05/29/monstaaa-development-summary-part-1/">here</a> to read part 1 of the Monstaaa! development summary.</p>
<p>It&#8217;s been over a week since my iOS game <a href="http://gamedevcoder.wordpress.com/2013/03/27/end-of-my-indie-game-devevelopment-adventure/">Monstaaa!</a> was released on the AppStore. The game was featured in Apple&#8217;s New &amp; Noteworthy on the iPhone (Australia and New Zealand only) and got a lot of great reviews including <a href="http://www.148apps.com/reviews/monstaaa-review/">8/10 by 148Apps</a>, <a href="http://ifanzine.com/monstaaa-review/">4.5/5 by iFanzine</a> or <a href="http://ireviewt.com/index.php/2012/06/04/monstaaa-review/">4/5 by iReviewT</a> as well as heaps of mentions on various gaming sites. But even though it&#8217;s getting mostly very positive feedback, the sales, except for Australia, have been rather low so far. That is no surprise however. Without stronger featuring by Apple only few iOS games succeed these days. But I&#8217;m far from saying this is the only reason why Monstaaa! didn&#8217;t sell in millions <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align:center;"><a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?mt=8"><img class="alignnone size-medium wp-image-721 aligncenter" title="17" alt="" src="https://gamedevcoder.files.wordpress.com/2012/06/17.png?w=300&#038;h=200" width="300" height="200" /></a></p>
<p>Anyway, the game&#8217;s been already played by a couple of thousands people, so I thought I&#8217;d share analysis of some of the most interesting game statistics here. What surprised me initially was that majority of the Monstaaa! players pirated the game. But this doesn&#8217;t matter too much&#8230; they still provide good source of information for me <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><strong>Statistics gathering</strong></p>
<p>The game has built-in statistics gathering system that reports pretty much anything that&#8217;s happening in the game &#8211; from button presses to achievements being unlocked to level progression details. The data is simply sent via HTTP by the game; when received on the server side it gets inserted into one big SQL table using simple PHP code.</p>
<p>Having all this information I was able to quickly extract some of the most interesting data. I was considering using Flurry or other systems for data collection but decided to go with a custom implementation in the end. What I didn&#8217;t like about Flurry were its huge delays between data being collected and data being available; with my system everything is real-time. So far everything works well and until the game gets played by an order of magnitude more players bandwidth and SQL efficiency shouldn&#8217;t be my worries.</p>
<p><strong>Gameplay statistics</strong></p>
<p>One of the most interesting information for me is how many people get to successfully complete each level (the game currently has got 64 levels). That&#8217;s exactly what the chart below shows:</p>
<p><a href="https://gamedevcoder.files.wordpress.com/2012/06/completed1.png"><img class="alignnone size-full wp-image-716" title="completed" alt="" src="https://gamedevcoder.files.wordpress.com/2012/06/completed1.png?w=640&#038;h=344" width="640" height="344" /></a></p>
<p>Only 70% of all players completed the first level, 62% completed second level and only 10% completed the 9th level. And just so you know if haven&#8217;t played the game &#8211; the first and second levels are really easy &#8211; you have to really try hard not to complete them and there&#8217;s no way you can fail!</p>
<p>So, what are the conclusions here? On one hand this doesn&#8217;t look very good because it means most people only play the game for a very short time. But on the other hand we should probably take into account the characteristics of average iOS/Android players &#8211; it is very common for them to buy the game, run it once or twice and then stop playing it forever. With massive number of games on the market this is unavoidable. And probably even more so with games being pirated &#8211; if you didn&#8217;t pay for it, you typically have slightly less interest in playing it.</p>
<p>Also, part of the reason why there&#8217;s so many people who only played first few levels is &#8211; so I believe &#8211; that the game&#8217;s been out on the AppStore only for a couple of days. But it still doesn&#8217;t mean your game can&#8217;t do better. Mine certainly could and part of the reason why it didn&#8217;t do well enough is explained in the next chart that shows an average number of attempts while trying to complete each of the levels:</p>
<p><a href="https://gamedevcoder.files.wordpress.com/2012/06/average_retry_count.png"><img class="size-full wp-image-717 aligncenter" title="average_retry_count" alt="" src="https://gamedevcoder.files.wordpress.com/2012/06/average_retry_count.png?w=640&#038;h=340" width="640" height="340" /></a></p>
<p>While it looks okay&#8217;ish up to level 6th, levels number 7 and 12 clearly seem to be too difficult. With both of these levels you can see spikes which indicate sudden difficulty change with respect to previous level. But there&#8217;s more levels that are too difficult or not in the right spot in Monstaaa! &#8211; and this certainly is one of the things I&#8217;m going to improve on with the next update. Ideally, there should be no spikes at all and the chart should show you bars of the same height throughout all of the levels.</p>
<p>Figuring out which levels are too difficult is in fact really tricky before you actually release the game and collect some statistics from a larger group of users. In any case, having tested the game on a couple of friends it wasn&#8217;t obvious that levels 7 and 12 are indeed too difficult. Now I know this for sure!</p>
<p>Monstaaa! is a tilt based game and, while I knew tilt controls can be difficult to master for many, I spent a lot of time trying to make the game easy enough, especially at the start. As it now turns out more work is needed on the difficulty balancing side of game.</p>
<p><strong>Users statistics</strong></p>
<p>I&#8217;m not going to give you exact number of copies sold just yet as I&#8217;m too shy for that but I&#8217;m going to show you how many users played the game every hour and also how many new users started playing every hour (which kind of gives you clue as to what the sales might be):</p>
<p><a href="https://gamedevcoder.files.wordpress.com/2012/06/users_and_new_users.png"><img class="size-full wp-image-718 aligncenter" title="users_and_new_users" alt="" src="https://gamedevcoder.files.wordpress.com/2012/06/users_and_new_users.png?w=640&#038;h=317" width="640" height="317" /></a></p>
<p>The reason you can easily see &#8220;daily&#8221; spikes in there is because the game was featured in New &amp; Noteworthy in Australia &#8211; spikes simply correspond with days and nights there. The highest number of players during one hour (blue line) was 93 and the highest number of new players (orange line; most likely ones who just purchased, or pirated, the game) over single hour was 64.</p>
<p>Ideally you&#8217;d want both number of the users (blue line) and number of new users (orange line) to rise indefinitely with the first one rising faster than the latter &#8211; this would mean you get more and more new users while the &#8220;old users&#8221; would still keep playing your game.</p>
<p><strong>Device statistics</strong></p>
<p>Finally here is some insight into what were the most popular devices that had Monstaaa! installed on them:</p>
<p><a href="https://gamedevcoder.files.wordpress.com/2012/06/device_types4.png"><img class="alignnone size-full wp-image-772" title="device_types4" alt="" src="https://gamedevcoder.files.wordpress.com/2012/06/device_types4.png?w=640"   /></a></p>
<p>The iPad&#8217;s and iPhone&#8217;s shares were almost identical at 45% with remaining 10% going to iPod touches. iPad2 was the most popular among iPads and iPhone4 was the most popular among iPhones with iPhone4S being next most popular. Looking at these stats one should take into account the fact that most of the Monstaaa! users are probably from Australia being &#8211; that is my impression &#8211; a very &#8220;iOS friendly&#8221; country.</p>
<p>My final word here is, if you&#8217;re releasing any game for any platform make sure you implement at least some basic statistics gathering in there. It takes little time but it will give you a lot of priceless information about how your game is played and how you can improve it.</p>
<p>That&#8217;s it for now. Check back soon for more development info about Monstaaa!</p>
<p>UPDATE: Check my <a href="http://gamedevcoder.wordpress.com/2012/07/22/monstaaa-development-summary-part-3/">next blog post</a> in the series covering Android sales and more.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/659/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/659/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=659&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2012/06/09/monstaaa-development-summary-part-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/06/17.png?w=300" medium="image">
			<media:title type="html">17</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/06/completed1.png" medium="image">
			<media:title type="html">completed</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/06/average_retry_count.png" medium="image">
			<media:title type="html">average_retry_count</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/06/users_and_new_users.png" medium="image">
			<media:title type="html">users_and_new_users</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/06/device_types4.png" medium="image">
			<media:title type="html">device_types4</media:title>
		</media:content>
	</item>
		<item>
		<title>Monstaaa! development summary &#8211; part 1</title>
		<link>http://gamedevcoder.wordpress.com/2012/05/29/monstaaa-development-summary-part-1/</link>
		<comments>http://gamedevcoder.wordpress.com/2012/05/29/monstaaa-development-summary-part-1/#comments</comments>
		<pubDate>Tue, 29 May 2012 01:03:49 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[general programming]]></category>
		<category><![CDATA[indie game development]]></category>
		<category><![CDATA[mobile game development]]></category>
		<category><![CDATA[physics]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=635</guid>
		<description><![CDATA[Today is the day. The game I&#8217;ve been working on for the last 6 months gets released on iOS as a universal app. Monstaaa! is finally available on the Apple App Store! Yeah!!! Now, here is the summary of my indie game &#8230; <a href="http://gamedevcoder.wordpress.com/2012/05/29/monstaaa-development-summary-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=635&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today is <em><strong>the day</strong></em>. The game I&#8217;ve been working on for the last 6 months gets released on iOS as a universal app. <a href="http://gamedevcoder.wordpress.com/2013/03/27/end-of-my-indie-game-devevelopment-adventure/">Monstaaa!</a> is finally available on the Apple App Store! Yeah!!!</p>
<p><a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?ls=1&amp;mt=8"><img class="size-full wp-image-657 aligncenter" title="icon_128x128_no_border" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/icon_128x128_no_border.png?w=640"   /></a></p>
<p>Now, here is the summary of my indie game development adventures over the past months that led to this moment. If you&#8217;re thinking of going indie, especially with mobile game development in mind, you might find here some useful tips.</p>
<p><a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?ls=1&amp;mt=8"><img class="alignnone size-medium wp-image-583" title="0_src_iphone" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/0_src_iphone.png?w=300&#038;h=200" width="300" height="200" /></a>   <a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?ls=1&amp;mt=8"><img class="alignnone size-medium wp-image-653" title="Untitled2" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/untitled21.png?w=300&#038;h=200" width="300" height="200" /></a></p>
<p>But first off let me introduce yourself a little bit to the game.</p>
<p>If you haven&#8217;t heard of Monstaaa! &#8211; it is a unique take on physics based puzzle games in that it uses tilt controls to modify the gravity. The goal is really simple &#8211; just feed the Monstaaa with all delicious bugs that you can see on screen. As you tilt your device the bugs fall into, always hungry, Monstaaa&#8217;s mouth. Getting any of the bugs killed in any way (and there&#8217;s many ways!) makes Monstaaa sad, so you better take good care of them!</p>
<p>I believe the game has got some really original base concept, is fun to play and looks good but the way it usually works is it&#8217;s up to everyone else to really prove it <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If you&#8217;re still wondering what it is, here&#8217;s Monstaaa! in action including footage with the actual device:</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='http://www.youtube.com/embed/4w_IBwhBxms?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p><strong>Going indie and budget</strong></p>
<p>Before going indie, I had spent 4 years at Blue Tongue working as an engine/technology programmer. It was a great time to be working on big games, I really enjoyed it, but when last year THQ shut down my studio I wasn&#8217;t upset at all. In fact I already knew what my next job was going to be. For me, this was perfect opportunity to try indie game development, something I&#8217;ve been dreaming of for the last few years. However, being just an engine programmer on console and PC projects for the last 7+ years it was a big challenge for me to switch to managing the whole game production myself &#8211; from game design and artwork, through programming, to publishing, marketing and website design.</p>
<p>Developers from big companies becoming indie developers is something we got used to hear about frequently lately. But how many actually succeed? And for me, the most important question was simple &#8211; am I going to make living off of that? I guess we&#8217;ll see in just few days <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>I gave myself up to one year to develop and publish one mobile game (though I ended up making two!). From the very beginning I set aside a very limited budget for any, strictly game development related, expenses I might have. Now, Monstaaa! has just been published and to this date I spent just above AU $10k on everything, including company set up, accountant, insurance, developer accounts, software, hardware, art and audio &#8211; everything. Does this sound like very little money to make this kind of game? Well, I think it really does!</p>
<p>Having hard limits for time and money I could spend on the project made both myself and my wife feel more secure because if it wouldn&#8217;t work it wouldn&#8217;t be that big drama &#8211; I&#8217;d simply start looking for another job. But even in the case of financial failure it would still be, and it was I tell you, a great experience.</p>
<p><a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?ls=1&amp;mt=8"><img title="5_level" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/5_level.png?w=300&#038;h=200" width="300" height="200" /></a>   <a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?ls=1&amp;mt=8"><img title="3_src_iphone" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/3_src_iphone.png?w=300&#038;h=200" width="300" height="200" /></a></p>
<p><strong>Small project first</strong></p>
<p>When you&#8217;re working solo on a game no one tells you what or how to do anything. It&#8217;s just you who makes all of the decisions on the project &#8211; whether it&#8217;s an important high level design thing or just a not-so-important button color in some menu screen. Decision making is a critical skill one learns they need to use all the time when working for themselves.</p>
<p>With anything I did on this project I tried to make sure that my precious time wasn&#8217;t being wasted. I was totally new to mobile game development at the time and I knew there was a lot to learn for me and a lot of mistakes to be made. Realizing things never work out perfectly the first time I tried to minimize them as much as possible. My way of doing so was by making and publishing some very small game first. For me this was one of the best decisions!</p>
<p>By making simple game one learns a lot. I spent just 1 month developing small puzzle game called <a href="puzzledrabbit.pixelelephant.com">Puzzled Rabbit</a> which was then published on a number of platforms including iOS and Android. The game wasn&#8217;t financial success at all but I still consider it a big success overall &#8211; I learned a lot about mobile development while making it and as a result I was in a much more comfortable situation when starting works on a larger game being <a href="http://gamedevcoder.wordpress.com/2013/03/27/end-of-my-indie-game-devevelopment-adventure/">Monstaaa!</a></p>
<p><a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?ls=1&amp;mt=8"><img title="Untitled" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/untitled1.png?w=300&#038;h=200" width="300" height="200" /></a>   <a href="http://itunes.apple.com/us/app/monstaaa!/id482844637?ls=1&amp;mt=8"><img title="Untitled3" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/untitled31.png?w=300&#038;h=200" width="300" height="200" /></a></p>
<p><strong>Technology</strong></p>
<p>Figuring out what technology to use took me some time &#8211; <a href="http://gamedevcoder.wordpress.com/2012/05/14/monstaaa-for-ios-the-first-announcement/">see my previous post</a> &#8211; and I eventually happily decided to use <a href="http://madewithmarmalade.com">Marmalade SDK</a>. Again, without making a small game first, it would have been much more painful process.</p>
<p>Using Marmalade I was able to develop 95% of Monstaaa!. The remaining 5% went into implementing iOS specific features not present in the SDK like iCloud support. The cool thing about using Marmalade was I could test the game on PC in a simulator and I could make iOS builds right on my PC without even requiring Mac. Also, being able to use Visual Studio was a big thing for me &#8211; someone who&#8217;s been using it for 10+ years.</p>
<p>Turns out, unless you want to take advantage of some fancy iOS features, iOS game development is perfectly possible on Windows. Good news for many! But the feature that made me love Marmalade is its support for multiple platforms &#8211; in fact Android version of Monstaaa! is already mostly working without any extra effort.</p>
<p>I could have gone a different route of developing the game using native iOS or Android SDKs but getting familiar with them would take a lot of my precious development time. With Marmalade I could focus more on the actual game so, overall, I think using it was my second good decision.</p>
<p><strong>To be continued&#8230;</strong></p>
<p>My future blog posts on Monstaaa! will include promotion and launch summary, sales analysis, post-mortem of working with artists, iOS &amp; Android technology tips and more cool stuff. Make sure to check back soon or simply subscribe to my blog!</p>
<p>EDIT: Part 2 of the Monstaaa! development summary is <a href="http://gamedevcoder.wordpress.com/2012/06/09/monstaaa-development-summary-part-2/">here</a>.</p>
<p>Cheers!</p>
<p><img class="aligncenter" title="Untitled" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/untitled.png?w=120&#038;h=124" width="120" height="124" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/635/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/635/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=635&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2012/05/29/monstaaa-development-summary-part-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:thumbnail url="https://gamedevcoder.files.wordpress.com/2012/05/icon_128x128_no_border.png?w=128" />
		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/icon_128x128_no_border.png?w=128" medium="image">
			<media:title type="html">icon_128x128_no_border</media:title>
		</media:content>

		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/icon_128x128_no_border.png" medium="image">
			<media:title type="html">icon_128x128_no_border</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/0_src_iphone.png?w=300" medium="image">
			<media:title type="html">0_src_iphone</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/untitled21.png?w=300" medium="image">
			<media:title type="html">Untitled2</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/5_level.png?w=300" medium="image">
			<media:title type="html">5_level</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/3_src_iphone.png?w=300" medium="image">
			<media:title type="html">3_src_iphone</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/untitled1.png?w=300" medium="image">
			<media:title type="html">Untitled</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/untitled31.png?w=300" medium="image">
			<media:title type="html">Untitled3</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/untitled.png" medium="image">
			<media:title type="html">Untitled</media:title>
		</media:content>
	</item>
		<item>
		<title>Monstaaa! for iOS &#8211; the first announcement</title>
		<link>http://gamedevcoder.wordpress.com/2012/05/14/monstaaa-for-ios-the-first-announcement/</link>
		<comments>http://gamedevcoder.wordpress.com/2012/05/14/monstaaa-for-ios-the-first-announcement/#comments</comments>
		<pubDate>Mon, 14 May 2012 00:28:28 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[general programming]]></category>
		<category><![CDATA[mobile game development]]></category>
		<category><![CDATA[box2d]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[marmalade]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[puzzle]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=582</guid>
		<description><![CDATA[Just a quick (and big) announcement today! The game I&#8217;ve been working on for the last 6 months is finally going to be released on iOS. It is called Monstaaa! and should be available on the 29th of May 2012 as a &#8230; <a href="http://gamedevcoder.wordpress.com/2012/05/14/monstaaa-for-ios-the-first-announcement/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=582&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Just a quick (and big) announcement today!</p>
<p><a style="color:#ff4b33;line-height:24px;" href="https://gamedevcoder.files.wordpress.com/2012/05/cross_promo2x.png"><img class="alignnone size-full wp-image-588" title="cross_promo@2x" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/cross_promo2x.png?w=640&#038;h=356" width="640" height="356" /></a></p>
<p>The game I&#8217;ve been working on for the last 6 months is finally going to be released on iOS. It is called <a href="http://monstaaa.pixelelephant.com">Monstaaa!</a> and should be available on the 29th of May 2012 as a universal app on the Apple Store.</p>
<p><em style="color:#444444;line-height:1.5;">Monstaaa!</em><span style="line-height:1.5;"> is a truly unique physics based puzzle game with tilt controls and some great painterly graphics done by a friend of mine, </span><a style="line-height:1.5;" href="http://members.iinet.net.au/~drew1/">Drew Morrow</a><span style="line-height:1.5;"> (ex artist at Blue Tongue / THQ) and audio done by guys at </span><a style="line-height:1.5;" href="http://www.kpow.com.au/">Kpow Audio</a><span style="line-height:1.5;"> (ex audio guys at Team Bondi / Rockstar Games). If you enjoy puzzle and/or physics based games there&#8217;s high chance you simply fall in love with it! But more seriously, we put a lot of heart into making </span><em style="color:#444444;line-height:1.5;">Monstaaa!</em><span style="line-height:1.5;"> and we hope people will notice. Let&#8217;s see!</span></p>
<p>Here&#8217;s some screenshots from the game running on the iPhone:</p>
<p><a href="https://gamedevcoder.files.wordpress.com/2012/05/0_src_iphone.png"><img class="alignnone size-medium wp-image-583" title="0_src_iphone" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/0_src_iphone.png?w=300&#038;h=200" width="300" height="200" /></a>      <a href="https://gamedevcoder.files.wordpress.com/2012/05/1_src_iphone.png"><img class="alignnone size-medium wp-image-584" title="1_src_iphone" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/1_src_iphone.png?w=300&#038;h=200" width="300" height="200" /></a></p>
<p><a href="https://gamedevcoder.files.wordpress.com/2012/05/2_src_iphone.png"><img class="alignnone size-medium wp-image-585" title="2_src_iphone" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/2_src_iphone.png?w=300&#038;h=200" width="300" height="200" /></a>      <a href="https://gamedevcoder.files.wordpress.com/2012/05/4_src_iphone.png"><img class="alignnone size-medium wp-image-587" title="4_src_iphone" alt="" src="https://gamedevcoder.files.wordpress.com/2012/05/4_src_iphone.png?w=300&#038;h=200" width="300" height="200" /></a></p>
<p>And here&#8217;s preview trailer:</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='640' height='390' src='http://www.youtube.com/embed/1KBidAhVS2A?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>Now, make sure to follow <a href="https://www.facebook.com/MonstaaaGame">Monstaaa! Facebook page</a> and check out the <a href="http://monstaaa.pixelelephant.com">game&#8217;s website</a>. More news about the game coming really soon!</p>
<p>Cheers!</p>
<p>Ps. On the more technical side of things, the game was developed using <a href="http://www.madewithmarmalade.com">Marmalade SDK</a> and <a href="http://box2d.org/">Box 2D</a> physics engine but I&#8217;ll talk about that in more detail in my next blog posts.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/582/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=582&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2012/05/14/monstaaa-for-ios-the-first-announcement/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/cross_promo2x.png" medium="image">
			<media:title type="html">cross_promo@2x</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/0_src_iphone.png?w=300" medium="image">
			<media:title type="html">0_src_iphone</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/1_src_iphone.png?w=300" medium="image">
			<media:title type="html">1_src_iphone</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/2_src_iphone.png?w=300" medium="image">
			<media:title type="html">2_src_iphone</media:title>
		</media:content>

		<media:content url="https://gamedevcoder.files.wordpress.com/2012/05/4_src_iphone.png?w=300" medium="image">
			<media:title type="html">4_src_iphone</media:title>
		</media:content>
	</item>
		<item>
		<title>iOS &amp; Android game development on Windows</title>
		<link>http://gamedevcoder.wordpress.com/2012/02/01/ios-and-android-game-development-on-windows/</link>
		<comments>http://gamedevcoder.wordpress.com/2012/02/01/ios-and-android-game-development-on-windows/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 00:52:05 +0000</pubDate>
		<dc:creator>Maciej</dc:creator>
				<category><![CDATA[general programming]]></category>
		<category><![CDATA[mobile game development]]></category>

		<guid isPermaLink="false">http://gamedevcoder.wordpress.com/?p=468</guid>
		<description><![CDATA[UPDATE: Read here about my second game Monstaaa! made on Windows using Marmalade SDK. When I started indie game development 6 months ago (see my previous post Good bye Blue Tongue (and time for indie game development)) I knew I wanted to experiment &#8230; <a href="http://gamedevcoder.wordpress.com/2012/02/01/ios-and-android-game-development-on-windows/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=468&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>UPDATE: <a href="http://gamedevcoder.wordpress.com/2012/05/14/monstaaa-for-ios-the-first-announcement/">Read here</a> about my second game Monstaaa! made on Windows using Marmalade SDK.</p>
<p>When I started indie game development 6 months ago (see my previous post <a href="http://gamedevcoder.wordpress.com/2011/08/13/good-bye-blue-tongue-and-time-for-indie-game-development">Good bye Blue Tongue (and time for indie game development)</a>) I knew I wanted to experiment with games for iOS and Android. I knew nothing about mobile development at that time but I was kind of hoping there would be ways to develop my apps cross-platform (iOS, Android and possibly other platforms as well). And I wasn&#8217;t very keen to invest into a Mac just so I could develop for iOS. That&#8217;s when I started my investigation of available solutions.</p>
<p>In this post I&#8217;m going to give you a quick run down of my findings when it comes to available software / SDKs for cross-platform mobile development (mostly iOS and Android) under Windows. As part of that I&#8217;m also going to compare 3 different SDKs: <a href="http://www.dragonfiresdk.com/">DragonFire SDK</a>, <a href="http://www.madewithmarmalade.com">Marmalade SDK</a> and <a href="http://www.unity3d.com">Unity3D</a>.</p>
<p><strong>DragonFire SDK</strong></p>
<p>The first thing I came across while searching for ways to develop for iOS from Windows was <a title="DragonFire SDK" href="http://www.dragonfiresdk.com/">DragonFire SDK</a>. It&#8217;s iOS only but it&#8217;s cheap. You develop on windows under Visual Studio and test in their simulator. And if you want to test it on the iPhone or iPad you send them (via their website) your full source code and game assets (images, sound and all other data files) and they send you back compiled binary. What I initially liked about DragonFire SDK was that it had extremely simple C-style API &#8211; just one header file with a hundred or so functions for graphics, input, files, audio etc. Everything looked pretty <a href="http://www.dragonfiresdk.net/help/DragonFireSDKHelp.html">straightforward</a>.</p>
<p>I purchased the cheapest, $50 iPhone only, license and started experimenting. I set myself a goal of making simple <a href="http://en.wikipedia.org/wiki/Sokoban">sokoban</a> game as quickly as possible, just so I could test that the SDK really does the job. The game was ready in about 5 days and run very well in the simulator. There were few problems and some bugs with rendering that I had to make workarounds for but finally all worked. Now I wanted to test it on my iPad and that&#8217;s where the problems started piling up (or become more obvious).</p>
<p>Firstly, it turned out that the whole source code has to fit in a single CPP file. Wow. Being curious what other people do I searched their forums and found <a href="http://www.whitetreegames.com/tools/manifest-builder">community project</a> that merges all CPP and H files into single CPP. Worked for me. Checked.</p>
<p>I paid another $50 for &#8220;ultimate iPhone&#8221; license meaning I could now test the game on the device. I packaged my build and sent to DragonFire, so they would compile the project for me. A day later I got my .app (iOS application) file and tried to install it on my device. No luck. The build wouldn&#8217;t install complaining about some incompatible configuration. I could investigate more, send question to DragonFire support or ask on the forums but there were also few other problems and all that together already made me quite uncomfortable about using DragonFire SDK. That&#8217;s when I slowly started looking around in search for other solutions out there&#8230;</p>
<p>In the end I haven&#8217;t even gotten to the point of getting my game to run on the iPad via DragonFire SDK. I quickly realized DragonFire SDK was not the right choice for me, and it wasn&#8217;t so for just one reason. Below my quick summary of mentioned SDK:</p>
<p>Cons (cons first because more important):</p>
<ul>
<li>extremely limited API (e.g. can only draw rectangles, no polygons; no support for &#8220;fancy&#8221; stuff like iOS GameCenter)</li>
<li>buggy rendering code (at least in the simulator)</li>
<li>all apps are fixed to 30 frames per second</li>
<li>the whole source code has to be in a single CPP file</li>
<li>assets once loaded stay in memory forever (sure, why would you ever want to free up some memory?)</li>
<li>can&#8217;t make iOS build on Windows + terrible turnaround times (need to send them your source code + assets, then wait for reply; took 1 day in my case)</li>
<li>terribly slow PC simulator (couldn&#8217;t even get 30 fps for my sokoban game; and I do have reasonably fast laptop)</li>
<li>iOS only</li>
<li>no debugging on the device (this one is pretty obvious but just wanted to make things clear)</li>
</ul>
<p>Pros:</p>
<ul>
<li>cheap ($100 for iPhone or iPad license; $150 for both)</li>
<li>compiles to native <a href="http://en.wikipedia.org/wiki/ARM_architecture">ARM</a> code (meaning no emulation -&gt; fast)</li>
<li>extremely simple API</li>
<li>can develop on PC under Visual Studio</li>
<li>can submit to Apple Store without Mac</li>
</ul>
<p>My final word is: even if you&#8217;re not serious about iOS development, you better stay away from it.</p>
<p><strong>Marmalade SDK</strong></p>
<p>The next thing I started looking at was <a href="http://www.madewithmarmalade.com">Marmalade SDK</a>. They had completely free 90 day trial, their API seemed way more complete than the one from DragonFire SDK yet simple and very clean. And they seemed to have pretty large and lively community. Also, knowing that games such as <a href="http://toucharcade.com/2011/05/24/to-fu-the-trials-of-chi/">To-Fu</a> (one of my favorites on the Apple Store) have been made using Marmalade SDK was very encouraging.</p>
<p>The next day my game was already running in the Marmalade simulator on Windows. And after one more day it was running on my iPad too. One great thing about Marmalade building process is that you don&#8217;t need Mac to make iOS build, you can do it right on your PC (Windows), locally. They do however also support building from Mac.</p>
<p>Few more days and I also had my game running on Android and Blackberry PlayBook. Since Marmalade is based on C++, it does support wide range of devices including ones supporting <a href="http://en.wikipedia.org/wiki/ARM_architecture">ARM</a> (e.g. iOS, Android), <a href="http://en.wikipedia.org/wiki/MIPS_architecture">MIPS</a> (e.g. LG Smart TV) and <a href="http://en.wikipedia.org/wiki/X86">X86</a> (e.g. Windows) architectures. Depending on the target architecture they just use different C++ compilers. The good thing about this is that the code you write runs natively on the device which means it&#8217;s as fast as possible.</p>
<p>I still plan to make a short post-mortem of the development of my game in a separate post, so I won&#8217;t go into too much detail here but I wanted to say that Marmalade was really a great choice for me. And the proof for that was that my sokoban game has been successfully released on iOS, Android and Blackberry PlayBook (check out <a href="http://puzzledrabbit.pixelelephant.com">Puzzled Rabbit</a>).</p>
<p style="text-align:center;"><a href="http://gamedevcoder.files.wordpress.com/2012/02/iphone0.png"><img class="alignnone size-medium wp-image-536" title="iphone0" alt="" src="http://gamedevcoder.files.wordpress.com/2012/02/iphone0.png?w=300&#038;h=200" width="300" height="200" /></a>     <a href="http://gamedevcoder.files.wordpress.com/2012/02/iphone3.png"><img class="alignnone size-medium wp-image-534" title="iphone3" alt="" src="http://gamedevcoder.files.wordpress.com/2012/02/iphone3.png?w=300&#038;h=200" width="300" height="200" /></a></p>
<p style="text-align:left;">Now, here&#8217;s my full summary of Marmalade SDK:</p>
<p>Pros:</p>
<ul>
<li>still pretty cheap: standard license (without Marmalade logo at startup) is $500 which gives you access to all SDK features</li>
<li>great (mostly) C style API: simple, clean &amp; flexible (e.g. if you want, you can use OpenGL ES directly; or, if you prefer, you can use their higher level IwGx rendering API)</li>
<li>powerful: built-in support for so many different things (e.g. Game Center, camera, photo gallery, HTTP)</li>
<li>compiles to native ARM / MIPS / X86 code (meaning no emulation -&gt; fast)</li>
<li>supports mixing with native code (e.g. Objective-C on iOS or Java on Android) to create custom extensions that do whatever you want</li>
<li>great open-source community projects: lots of goodness there including ports of very many popular C/C++ libraries (see full list <a href="https://github.com/marmalade">here</a>)</li>
<li>can develop on PC under Visual Studio or on Mac under XCode</li>
<li>can build iOS apps on Windows</li>
<li>very good PC/Mac simulator</li>
<li>support for native iOS builds on Mac (so, it&#8217;s possible to debug the code!)</li>
<li>support for many platforms (including iOS, Android and less popular ones such as Blackberry PlayBook, Bada, WebOS or Symbian)</li>
<li>support for asset pipelines: fonts, compressed textures, materials, models, animations</li>
</ul>
<p>Cons:</p>
<ul>
<li>occasional bugs in the SDK (fortunately they do try to help you via support or forums &#8211; though sometimes it does takes a while)</li>
<li>some issues haven&#8217;t been fixed for surprisingly long periods of time, e.g. correct splashscreen handling on various devices has been broken for months!</li>
<li>not all new features get added quickly (for example iCloud support isn&#8217;t good at the time of writing this, e.g. has no support for conflict resolution)</li>
<li>can&#8217;t submit to Apple Store without Mac (not a big deal though; took 5 mins on my friend&#8217;s Mac)</li>
</ul>
<p>My final word is: Marmalade SDK is truly great piece of software. It is very well designed and it does the job even though it has some (minor) issues.</p>
<p>I should also mention that for the last 5 months I&#8217;ve been developing my next, much larger and more sophisticated Marmalade based, game for iOS and Android and it&#8217;s been going really great. I was able to integrate lots of (3rd party) libraries and technologies including Game Center, Open Feint, Facebook, <a href="http://box2d.org">Box2D</a>, camera, photo gallery or <a href="http://code.google.com/p/jpeglib">jpeglib</a>. I wasn&#8217;t able to add support for iCloud yet because of limited support for that in Marmalade but thanks to support for native extensions I still plan to implement it (though, yes, I&#8217;ll need a Mac/XCode for that).</p>
<p><strong>Unity 3D</strong></p>
<p>I have no experience with <a href="http://unity3d.com">Unity3D</a>, so I can&#8217;t say too much here. It definitely seems to be a solid piece of software and there&#8217;s been tons of projects released on iOS and Android that were using it which is a good thing. In fact 90% of my indie dev friends are using it, so I do very often get a chance to learn about it from what they tell me.</p>
<p>But there&#8217;s few things which, when compared to Marmalade, I didn&#8217;t really like. These also were my reasons for choosing Marmalade rather than Unity3D:</p>
<ul>
<li>emulation from (managed) C# via <a href="http://www.mono-project.com">mono</a> (meaning higher memory usage and worse performance; also garbage collection seems to be causing performance issues / frame rate spikes for some developers)</li>
<li>more expensive: license for iOS and Android without Unity3D logo at startup costs $2300 ($1500 for Unity Pro + $400 for iOS + $400 for Android); more advanced features cost you additional $1500-$400 for iOS and $1500-$400 for Android</li>
<li>additional functionality (via plugins) might cost you another couple $$$ (e.g. audio recording, Game Center, GPS &#8211; see <a href="http://prime31.com/unity/">here</a>)</li>
<li>high level &amp; complex object oriented code you have to deal with</li>
<li>iOS and Android only (well, this isn&#8217;t that big limitation but still)</li>
<li>need to have Mac to deploy to iOS device</li>
</ul>
<p>The only advantage of Unity3D over Marmalade that I know of is that it has nice 3D scene editors and other tools. Depending on what kind of game you&#8217;re making this might be a bonus.</p>
<p>If I missed something important while comparing Marmalade with Unity3D then simply let me know and I&#8217;ll try to fix that.</p>
<p>Now going back to finishing up my upcoming, still unannounced, game. Expect some news about it really soon!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gamedevcoder.wordpress.com/468/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gamedevcoder.wordpress.com/468/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gamedevcoder.wordpress.com&#038;blog=19021745&#038;post=468&#038;subd=gamedevcoder&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gamedevcoder.wordpress.com/2012/02/01/ios-and-android-game-development-on-windows/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/a1c996f5d46b6fe4cb0f0627729b2502?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">msawitus</media:title>
		</media:content>

		<media:content url="http://gamedevcoder.files.wordpress.com/2012/02/iphone0.png?w=300" medium="image">
			<media:title type="html">iphone0</media:title>
		</media:content>

		<media:content url="http://gamedevcoder.files.wordpress.com/2012/02/iphone3.png?w=300" medium="image">
			<media:title type="html">iphone3</media:title>
		</media:content>
	</item>
	</channel>
</rss>
