<?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/"
	>

<channel>
	<title>Bit Battalion</title>
	<atom:link href="http://bitbattalion.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bitbattalion.com</link>
	<description>Game Dev, Programming, Flash, Oh My!</description>
	<lastBuildDate>Thu, 10 Nov 2011 16:30:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Tiny Turrets: Dev Diary #1, Humble Beginnings</title>
		<link>http://bitbattalion.com/2011/10/dev-diary-1/</link>
		<comments>http://bitbattalion.com/2011/10/dev-diary-1/#comments</comments>
		<pubDate>Sun, 02 Oct 2011 07:46:41 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Tiny Defense]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=1074</guid>
		<description><![CDATA[BEHOLD! My very first Dev Diary. As you can tell, things have been moving a little slower than I had hoped. I&#8217;m not too worried though, I&#8217;ve learned a lot and seeing the game at such an early stage will be great to look back on in a few months. I have two more little [...]]]></description>
			<content:encoded><![CDATA[<object width="640" height="400"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=29872381"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="never"></param><param name="allownetworking" value="internal"></param><param name="flashvars" value="" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=29872381" type="application/x-shockwave-flash" allowscriptaccess="never" allownetworking="internal" allowfullscreen="true" width="640" height="400" flashvars=""></embed></object>
<p>BEHOLD! My very first Dev Diary. As you can tell, things have been moving a little slower than I had hoped. I&#8217;m not too worried though, I&#8217;ve learned a lot and seeing the game at such an early stage will be great to look back on in a few months. I have two more little bits of news too.</p>
<h3>A New Name: Tiny Turrets</h3>
<p>As it turns out, a game called &#8220;Tiny Defense&#8221; just launched on the App Store. They sent me a kind email asking me to rename so I turned to trusty twitter to find &#8220;Tiny Turrets&#8221;. Terrific! (Seriously, try saying that fast &#8211; I now have a speech impediment)</p>
<h3>A Coding Time Lapse</h3>
<object width="640" height="400"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=29872309"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="never"></param><param name="allownetworking" value="internal"></param><param name="flashvars" value="" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=29872309" type="application/x-shockwave-flash" allowscriptaccess="never" allownetworking="internal" allowfullscreen="true" width="640" height="400" flashvars=""></embed></object>
<p>This Time Lapse documents me putting together the Gui System. It&#8217;s pretty short and not all that interesting, but it does give you a bit of an insight into my work flow. I should note &#8211; I actually hid my browser in this time lapse, I spent almost 50% of my time checking the cocos2D forums and stack overflow&#8230; not all that fun to watch.</p>
<p>You&#8217;ll also notice I&#8217;m working full screen in XCode and using &#8220;ALT TAB&#8221;. It makes a ton of difference to my productivity.</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/10/dev-diary-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tiny Defense: Using UIScrollView in Cocos2d</title>
		<link>http://bitbattalion.com/2011/09/uikit-uiscrollview-and-cocos2d/</link>
		<comments>http://bitbattalion.com/2011/09/uikit-uiscrollview-and-cocos2d/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 04:42:29 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[Tiny Defense]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=1031</guid>
		<description><![CDATA[So as you know that I spent the weekend trying to get xcode, objective c and cocos2d to be my bitch. Most of my time I was working on a solution to implementing scrollviews in cocos2d. Turns out this isn&#8217;t as straight forward as I thought, but I found a tutorial over at getsetgames.com which gave [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://bitbattalion.com/2011/09/tiny-defense-using-uiscrollview-in-cocos2d/"><img class="size-full wp-image-1032 aligncenter" title="BlogTitle" src="http://bitbattalion.com/wp-content/uploads/2011/09/BlogTitle1.png" alt="" width="640" height="200" /></a></p>
<p>So as you know that I spent the weekend trying to get xcode, objective c and cocos2d to be my bitch.</p>
<p>Most of my time I was working on a solution to implementing scrollviews in cocos2d. Turns out this isn&#8217;t as straight forward as I thought, but I found a <a href="http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/">tutorial over at getsetgames.com</a> which gave me a good place to start. I have to warn you, the code in that <a href="http://getsetgames.com/2009/08/21/cocos2d-and-uiscrollview/">tutorial</a> is pretty messy. I&#8217;ve cleaned it up a lot below.</p>
<p><span id="more-1031"></span></p>
<h3>The Problem</h3>
<p>Cocos 2d has no equivalent to UIScrollView. You can&#8217;t even use the regular UIScrollview, since it doesn&#8217;t fit into the framework. This leaves you with two possible solutions:</p>
<ol>
<li><strong><em>Reverse engineer the UIScroll View<br />
</em></strong>This would take a long time to get right. Apple has put a lot of polish into making the touch interactions perfect. There are a ton of edge cases and the code is not available to copy. Ouch.</li>
<li><span style="color: #000000;"><em><strong>Implement an invisible UIScrollView</strong></em></span><br />
And use its contentOffset property to position your CCNode. Much better!</li>
</ol>
<p>The later solution is much cleaner and has a straight forward implementation. Basically it works like this. We subclass UIScrollView, make sure it is invisible, put it on top of Cocos2d so that the user is interacting with it, then take the scroll position and apply it to the stuff in cocos2D each frame. There are a few challenges that we will have a look at, but check out the code I wrote first:</p>
<h3>Code: CCScrollView.h</h3>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;cocos2d.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@interface</span> CCScrollView <span style="color: #002200;">:</span> UIScrollView
&nbsp;
<span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span>CCScrollView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> makeScrollViewWithWidth<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>width Height<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>height;
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>setWidth<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>width Height<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>height;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span> getOffset;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGPoint<span style="color: #002200;">&#41;</span> getOffsetAsPoint;
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>

<h3>Code: CCScrollView.m</h3>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #6e371a;">#import &quot;CCScrollView.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@implementation</span> CCScrollView
&nbsp;
<span style="color: #11740a; font-style: italic;">/*
* Returns a CCScrollView Object.
* You can treat this like a regular UIScrollView, but don't add subviews. Instead
* use the methods getOffset and getOffsetAsPoint to set the Y Position of the
* CCNode you want to scroll each frame
*/</span>
<span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span>CCScrollView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> makeScrollViewWithWidth<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>width Height<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>height
<span style="color: #002200;">&#123;</span>
   CCScrollView <span style="color: #002200;">*</span> scrollView <span style="color: #002200;">=</span>
     <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCScrollView alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIScreen mainScreen<span style="color: #002200;">&#93;</span>.applicationFrame<span style="color: #002200;">&#93;</span>;
   scrollView.contentSize <span style="color: #002200;">=</span> CGSizeMake<span style="color: #002200;">&#40;</span>width, height<span style="color: #002200;">&#41;</span>;
   scrollView.showsHorizontalScrollIndicator <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;
   scrollView.showsVerticalScrollIndicator <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;
   <span style="color: #002200;">&#91;</span>scrollView setUserInteractionEnabled<span style="color: #002200;">:</span>TRUE<span style="color: #002200;">&#93;</span>;
   <span style="color: #002200;">&#91;</span>scrollView setScrollEnabled<span style="color: #002200;">:</span>TRUE<span style="color: #002200;">&#93;</span>;
&nbsp;
   <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span> addSubview<span style="color: #002200;">:</span>scrollView<span style="color: #002200;">&#93;</span>;
&nbsp;
   <span style="color: #a61390;">return</span> scrollView;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/*
* Change the size of the scrollable area
*/</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>setWidth<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>width Height<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>height
<span style="color: #002200;">&#123;</span>
   self.contentSize <span style="color: #002200;">=</span> CGSizeMake<span style="color: #002200;">&#40;</span>width, height<span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/*
* Returns the offset of the scrollview as a point
*/</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGPoint<span style="color: #002200;">&#41;</span> getOffsetAsPoint
<span style="color: #002200;">&#123;</span>
   CGPoint offset <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self contentOffset<span style="color: #002200;">&#93;</span>;
   offset <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> convertToGL<span style="color: #002200;">:</span> offset<span style="color: #002200;">&#93;</span>;
   offset.y <span style="color: #002200;">*=</span> <span style="color: #002200;">-</span><span style="color: #2400d9;">1</span>;
   offset.x <span style="color: #002200;">*=</span> <span style="color: #002200;">-</span><span style="color: #2400d9;">1</span>;
&nbsp;
   <span style="color: #a61390;">return</span> offset;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/*
* Returns the Y co-ordinate of the offset of the ScrollView
*/</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span> getOffset
<span style="color: #002200;">&#123;</span>
   CGPoint offset <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self getOffsetAsPoint<span style="color: #002200;">&#93;</span>;
   <span style="color: #a61390;">return</span> offset.y;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> dealloc
<span style="color: #002200;">&#123;</span>
   <span style="color: #002200;">&#91;</span>self removeFromSuperview<span style="color: #002200;">&#93;</span>;
   <span style="color: #002200;">&#91;</span>super dealloc<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #11740a; font-style: italic;">/*
* Override touch functions
* This allows Cocos2d to process touches
*/</span>
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> touchesBegan<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSSet</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> touches withEvent<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span>UIEvent <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> event
<span style="color: #002200;">&#123;</span>
   <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span>self.dragging<span style="color: #002200;">&#41;</span>
      <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span> touchesBegan<span style="color: #002200;">:</span>touches withEvent<span style="color: #002200;">:</span>event<span style="color: #002200;">&#93;</span>;
&nbsp;
   <span style="color: #002200;">&#91;</span>super touchesBegan<span style="color: #002200;">:</span> touches withEvent<span style="color: #002200;">:</span> event<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> touchesEnded<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSSet</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> touches withEvent<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span>UIEvent <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> event
<span style="color: #002200;">&#123;</span>
   <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span>self.dragging<span style="color: #002200;">&#41;</span>
      <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span> touchesEnded<span style="color: #002200;">:</span>touches withEvent<span style="color: #002200;">:</span>event<span style="color: #002200;">&#93;</span>;
&nbsp;
   <span style="color: #002200;">&#91;</span>super touchesEnded<span style="color: #002200;">:</span> touches withEvent<span style="color: #002200;">:</span> event<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@end</span></pre></div></div>

<h3>Code: Implementation.m</h3>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #11740a; font-style: italic;">//</span>
<span style="color: #11740a; font-style: italic;">//  Implementation.m</span>
<span style="color: #11740a; font-style: italic;">//  TinyDefense</span>
<span style="color: #11740a; font-style: italic;">//</span>
<span style="color: #11740a; font-style: italic;">//  Created by Sasha MacKinnon on 21/09/11.</span>
<span style="color: #11740a; font-style: italic;">//  Copyright 2011 Bit Battalion. All rights reserved.</span>
<span style="color: #11740a; font-style: italic;">//</span>
&nbsp;
<span style="color: #6e371a;">#import &quot;Implementation.h&quot;</span>
&nbsp;
<span style="color: #a61390;">@implementation</span> Implementation
&nbsp;
<span style="color: #002200;">+</span> <span style="color: #002200;">&#40;</span>CCScene <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> scene
<span style="color: #002200;">&#123;</span>
    CCScene <span style="color: #002200;">*</span> s <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CCScene node<span style="color: #002200;">&#93;</span>;
    Implementation <span style="color: #002200;">*</span> l <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>Implementation node<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span>s addChild<span style="color: #002200;">:</span>l<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #a61390;">return</span> s;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span><span style="color: #002200;">&#41;</span>init
<span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>self <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>super init<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
        gameNode <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCNode alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;
&nbsp;
        <span style="color: #11740a; font-style: italic;">//add the background to the game</span>
        background <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CCSprite spriteWithFile<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;background.png&quot;</span><span style="color: #002200;">&#93;</span>;
        background.position <span style="color: #002200;">=</span> ccp<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">160</span>, <span style="color: #2400d9;">480</span><span style="color: #002200;">&#41;</span>;
        <span style="color: #002200;">&#91;</span>gameNode addChild<span style="color: #002200;">:</span>background<span style="color: #002200;">&#93;</span>;
        <span style="color: #002200;">&#91;</span>self addChild<span style="color: #002200;">:</span> gameNode<span style="color: #002200;">&#93;</span>;
&nbsp;
        <span style="color: #11740a; font-style: italic;">//set up scrolling</span>
        scrollView <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>CCScrollView makeScrollViewWithWidth<span style="color: #002200;">:</span><span style="color: #2400d9;">320</span> Height<span style="color: #002200;">:</span><span style="color: #2400d9;">960</span><span style="color: #002200;">&#93;</span>;
&nbsp;
        <span style="color: #002200;">&#91;</span>self schedule<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>enterFrame<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
    <span style="color: #a61390;">return</span> self;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> enterFrame<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span>ccTime<span style="color: #002200;">&#41;</span> dt
<span style="color: #002200;">&#123;</span>
    gameNode.position <span style="color: #002200;">=</span> ccp<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">0</span>, <span style="color: #002200;">&#91;</span>scrollView getOffset<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@end</span></pre></div></div>

<h3>Setting up the UIScrollView</h3>
<p>We want an easy way to create scroll views without having to go through the hassle of manually allocing and setting properties every time w need a new one. The makeScrollViewWithWidth method does just this. It:</p>
<ul>
<li>creates the scroll view,</li>
<li>sets its content size to the arguments</li>
<li>adds itself to the OpenGLView, so it appears on the screen</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">+</span><span style="color: #002200;">&#40;</span>CCScrollView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> makeScrollViewWithWidth<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>width Height<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>height
<span style="color: #002200;">&#123;</span>
    CCScrollView <span style="color: #002200;">*</span> scrollView <span style="color: #002200;">=</span>
       <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCScrollView alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>UIScreen mainScreen<span style="color: #002200;">&#93;</span>.applicationFrame<span style="color: #002200;">&#93;</span>;
    scrollView.contentSize <span style="color: #002200;">=</span> CGSizeMake<span style="color: #002200;">&#40;</span>width, height<span style="color: #002200;">&#41;</span>;
    scrollView.showsHorizontalScrollIndicator <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;
    scrollView.showsVerticalScrollIndicator <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>;
    <span style="color: #002200;">&#91;</span>scrollView setUserInteractionEnabled<span style="color: #002200;">:</span>TRUE<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span>scrollView setScrollEnabled<span style="color: #002200;">:</span>TRUE<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span> addSubview<span style="color: #002200;">:</span>scrollView<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #a61390;">return</span> scrollView;
<span style="color: #002200;">&#125;</span></pre></div></div>

<h3>The contentOffset Property</h3>
<p>Next we need is to be able to access the position of our ScrollView after the user has scrolled. Since CCScrollView is a subclass of UIScrollView, we could access the &#8220;contentOffset&#8221; property directly, but we need to do a few transformations on that before hand to make it work the way we want. I made getter methods to make life easier:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGPoint<span style="color: #002200;">&#41;</span> getOffsetAsPoint
<span style="color: #002200;">&#123;</span>
    CGPoint offset <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self contentOffset<span style="color: #002200;">&#93;</span>;
    offset <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> convertToGL<span style="color: #002200;">:</span> offset<span style="color: #002200;">&#93;</span>;
    offset.y <span style="color: #002200;">*=</span> <span style="color: #002200;">-</span><span style="color: #2400d9;">1</span>;
    offset.x <span style="color: #002200;">*=</span> <span style="color: #002200;">-</span><span style="color: #2400d9;">1</span>;
&nbsp;
    <span style="color: #a61390;">return</span> offset;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span> getOffset
<span style="color: #002200;">&#123;</span>
    CGPoint offset <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>self getOffsetAsPoint<span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">return</span> offset.y;
<span style="color: #002200;">&#125;</span></pre></div></div>

<h3>Making sure touches are registered by cocos2D</h3>
<p>Right now we can have elements scrolling on the screen, but we can&#8217;t touch any of them. This is because CCScrollView is sitting on top of cocos2d, so the touches stop being processed before they hit cocos2D. To solve this we override touchBegan and touchEnd, and pass the touches down to cocos2D</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> touchesBegan<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSSet</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> touches withEvent<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span>UIEvent <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> event
<span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span>self.dragging<span style="color: #002200;">&#41;</span>
        <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span> touchesBegan<span style="color: #002200;">:</span>touches withEvent<span style="color: #002200;">:</span>event<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span>super touchesBegan<span style="color: #002200;">:</span> touches withEvent<span style="color: #002200;">:</span> event<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span> touchesEnded<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span><span style="color: #400080;">NSSet</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> touches withEvent<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span>UIEvent <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> event
<span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">!</span>self.dragging<span style="color: #002200;">&#41;</span>
        <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span> touchesEnded<span style="color: #002200;">:</span>touches withEvent<span style="color: #002200;">:</span>event<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#91;</span>super touchesEnded<span style="color: #002200;">:</span> touches withEvent<span style="color: #002200;">:</span> event<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<h3>Fixing the content offset bug</h3>
<p>But it STILL won&#8217;t work. Cocos2D, for some weird reason, isn&#8217;t prepared to deal with the touches we get from UIScrollView. It offsets the touches by a small margin when you scroll down far enough. I found a great solution online, which requires a quick change to CCNode.m</p>
<p style="text-align: center;"><a href="http://stackoverflow.com/questions/2457380/uiscrollview-and-cocos2d ">http://stackoverflow.com/questions/2457380/uiscrollview-and-cocos2d</a></p>
<p>Basically replace these functions in CCNode.m:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGPoint<span style="color: #002200;">&#41;</span>convertTouchToNodeSpace<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITouch <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>touch <span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// cocos2d 1.0 rc bug when using with additional overlayed views (such as UIScrollView).</span>
    <span style="color: #11740a; font-style: italic;">// CGPoint point = [touch locationInView: [touch view]];</span>
    CGPoint point <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>touch locationInView<span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
    point <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> convertToGL<span style="color: #002200;">:</span> point<span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>self convertToNodeSpace<span style="color: #002200;">:</span>point<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>CGPoint<span style="color: #002200;">&#41;</span>convertTouchToNodeSpaceAR<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITouch <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>touch <span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// cocos2d 1.0 rc bug when using with additional overlayed views (such as UIScrollView).</span>
    <span style="color: #11740a; font-style: italic;">// CGPoint point = [touch locationInView: [touch view]];</span>
    CGPoint point <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>touch locationInView<span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
    point <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> convertToGL<span style="color: #002200;">:</span> point<span style="color: #002200;">&#93;</span>;
    <span style="color: #a61390;">return</span> <span style="color: #002200;">&#91;</span>self convertToNodeSpaceAR<span style="color: #002200;">:</span>point<span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>and CCMenu.m</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span>CCMenuItem <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> itemForTouch<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span>UITouch <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span> touch <span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// cocos2d 1.0 rc bug when using with additional overlayed views (such as UIScrollView).</span>
    <span style="color: #11740a; font-style: italic;">// CGPoint touchLocation = [touch locationInView: [touch view]];</span>
    CGPoint touchLocation <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>touch locationInView<span style="color: #002200;">:</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> openGLView<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;
    touchLocation <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>CCDirector sharedDirector<span style="color: #002200;">&#93;</span> convertToGL<span style="color: #002200;">:</span> touchLocation<span style="color: #002200;">&#93;</span>;
    ...</pre></div></div>

<p>And now it&#8217;s ready to go!! The code is here in full, so feel free to copy paste these classes.</p>
<h3>Fixing it for iOS 5</h3>
<p>After all this, it might still not work with iOS 5. Instead of explaining why, I&#8217;ll point you to a stack overflow answer that has the solution:</p>
<blockquote>
<p style="text-align: center;"><a href="http://stackoverflow.com/questions/4876488/animation-in-opengl-es-view-freezes-when-uiscrollview-is-dragged-on-iphone">Animation in OpenGL ES view freezes when UIScrollView is dragged on the iPhone</a></p>
</blockquote>
<h3>Whats Next</h3>
<p>I&#8217;ve done a ton of work since I made this video which I&#8217;ll post in a few days. Tonight, I&#8217;m travelling back to Australia! I&#8217;m hoping to get a bit of code written on the plane before my battery dies. Wish me luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/09/uikit-uiscrollview-and-cocos2d/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Tiny Defense: Concept Art Time Lapse</title>
		<link>http://bitbattalion.com/2011/09/tiny-defense-concept-art-time-lapse/</link>
		<comments>http://bitbattalion.com/2011/09/tiny-defense-concept-art-time-lapse/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 10:41:43 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Tiny Defense]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=1010</guid>
		<description><![CDATA[Lee Lee is still going full pace on the concept art for Tiny Defence. Most recently, did some more refined, more stylised tower sketches. I bullied her into capturing the entire process in a time lapse and man it looks cool! As someone who has very little artistic talent and quite frankly has no idea [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://bitbattalion.com/2011/09/tiny-defense-concept-art-time-lapse/"><img class="aligncenter size-full wp-image-1022" title="BlogTitle" src="http://bitbattalion.com/wp-content/uploads/2011/09/BlogTitle.png" alt="" width="640" height="200" /></a></p>
<p>Lee Lee is still going full pace on the concept art for Tiny Defence. Most recently, did some more refined, more stylised tower sketches. I bullied her into capturing the entire process in a time lapse and man it looks cool!</p>
<p>As someone who has very little artistic talent and quite frankly has no idea how them artsy types do it, it&#8217;s exciting seeing the process. Here you can see her work at hyper speed from concept to&#8230; well, concept art:</p>
<object width="640" height="340"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=29307757"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="never"></param><param name="allownetworking" value="internal"></param><param name="flashvars" value="" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=29307757" type="application/x-shockwave-flash" allowscriptaccess="never" allownetworking="internal" allowfullscreen="true" width="640" height="340" flashvars=""></embed></object>
<p><span id="more-1010"></span></p>
<h3>The Science-y New Style</h3>
<p>We&#8217;ve really hit a sweet spot with style. I&#8217;m really pushing to make the towers futuristic, but cartoony. Lots of bright colours, lights, shininess and in general, lost of <strong>Science</strong>. These are much more like edge world in style, but more <strong>Scientific</strong>. I&#8217;m pretty sure I wrote in capitol letters for half an hour after seeing these. <strong>Science</strong>.</p>
<p style="text-align: center;"><a href="http://bitbattalion.com/wp-content/uploads/2011/09/TowersConcepts_03.jpg"><img class="aligncenter size-full wp-image-1011" title="TowersConcepts_03" src="http://bitbattalion.com/wp-content/uploads/2011/09/TowersConcepts_03.jpg" alt="" width="540" height="800" /></a></p>
<h3>What Next?</h3>
<p>I feel like the style has really been nailed with these drawings. The next step is to see how well we can translate it into the game. Lee Lee&#8217;s mission is to get a few monsters and towers boiled down to really, really sexy in-game sprites. Feel free to throw flowers, money, and your underpants at her.</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/09/tiny-defense-concept-art-time-lapse/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tiny Defense: Early Concept Art</title>
		<link>http://bitbattalion.com/2011/09/tiny-defense-concept-art/</link>
		<comments>http://bitbattalion.com/2011/09/tiny-defense-concept-art/#comments</comments>
		<pubDate>Sun, 18 Sep 2011 21:53:37 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Other Stuff]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=992</guid>
		<description><![CDATA[My first Tiny Defense update is ready. Excited? Lee Lee has been hard at work. Right now her job is not to create sprites, but instead explore different styles, colours and concepts so we can nail down what the final game will look like. This is an important process and might take a little while! [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://bitbattalion.com/2011/09/tiny-defense-concept-art/"><img class="aligncenter size-full wp-image-1003" title="Concept Art Title" src="http://bitbattalion.com/wp-content/uploads/2011/09/September18Title.png" alt="" width="640" height="200" /></a></p>
<p>My first Tiny Defense update is ready. Excited?</p>
<p>Lee Lee has been hard at work. Right now her job is not to create sprites, but instead explore different styles, colours and concepts so we can nail down what the final game will look like.</p>
<p>This is an important process and might take a little while! Once we&#8217;re done, the next step will be to begin to turn these sprites into game ready sprites &#8211; smaller, more stylised and more polished. Before that happens though, feast your eyes upon these:</p>
<p><span id="more-992"></span><span class="Apple-style-span" style="font-size: 15px; font-weight: bold;">Monster Concept 1:</span></p>
<p>This was the first batch of monsters Lee Lee made. As you can tell there is a wide variety of styles and concepts. This is especially important, not just so that we have an idea of what we like, but also we will know what to avoid.</p>
<p>My personal favourites? 1, 8, 10 and 30. Lee Lee loves 31!</p>
<p style="text-align: center;"><a href="http://bitbattalion.com/wp-content/uploads/2011/09/MonstersConcept11.jpg"><img class="aligncenter size-full wp-image-995" title="Monsters Concept 1" src="http://bitbattalion.com/wp-content/uploads/2011/09/MonstersConcept11.jpg" alt="" width="611" height="818" /></a></p>
<h3>Monster Concept 2:</h3>
<p>I really drilled Lee Lee with feedback. You should see my emails to this girl, each one is a freaking essay, I feel sorry for her. She really took the feedback to heart, and came back with a second iteration.</p>
<p>My personal favourites here? All of them. But especially 6, 9 and 11.</p>
<p style="text-align: center;"><a href="http://bitbattalion.com/wp-content/uploads/2011/09/MonsterConcepts2.jpg"><img class="aligncenter size-full wp-image-994" title="Monsters Concept 2" src="http://bitbattalion.com/wp-content/uploads/2011/09/MonsterConcepts2.jpg" alt="" width="606" height="686" /></a></p>
<h3>Towers Concept 1:</h3>
<p>This was our first dabble with towers. There is still a way to go before we settle on a style, but we sure are making progress.</p>
<p>My personal favourites are 31 and 32!</p>
<p style="text-align: center;"><a href="http://bitbattalion.com/wp-content/uploads/2011/09/Towers11.jpg"><img class="aligncenter size-full wp-image-998" title="Towers Concept 1" src="http://bitbattalion.com/wp-content/uploads/2011/09/Towers11.jpg" alt="" width="600" height="1648" /></a></p>
<h3>Reference Images.</h3>
<p>The other important process at this stage is finding references. Games which are similar stylistically, and just down right sexy.</p>
<p>I&#8217;ve been digging around the internet a lot to try find great styles that we can emulate. So far I&#8217;ve found one game which nails the color and style pretty well &#8211; it&#8217;s just a bit TOO cartoony. Monster Mayhem for the iOS is definitely worth checking out:</p>
<p style="text-align: center;"><img class="aligncenter" title="Monster Mayhem" src="http://farm5.static.flickr.com/4050/4587222573_11f81330c7.jpg" alt="" width="480" height="320" /></p>
<p style="text-align: center;"><img class="aligncenter" title="Monster Mayhem 1" src="http://farm4.static.flickr.com/3315/4587844842_4710cc26b3.jpg" alt="" width="480" height="320" /></p>
<p>I also love the monsters and style in maple story:</p>
<p><img class="alignnone" src="http://static.basilmarket.com/monster/BasilMarket-com-Blue-Wyvern.gif" alt="" width="161" height="157" /> <img class="alignnone" title="Maple Story 2" src="http://static.basilmarket.com/monster/BasilMarket-com-Prison-Guard-Boar.gif" alt="" width="161" height="115" /> <img class="alignnone" src="http://static.basilmarket.com/monster/BasilMarket-com-Green-Cornian.gif" alt="" width="156" height="133" /></p>
<p>I also loved the stylistic treatment of the towers in Edge World:</p>
<p style="text-align: center;"><a href="http://bitbattalion.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-18-at-12.54.18-PM.png"><img class="aligncenter size-full wp-image-999" title="Screen Shot 2011-09-18 at 12.54.18 PM" src="http://bitbattalion.com/wp-content/uploads/2011/09/Screen-Shot-2011-09-18-at-12.54.18-PM.png" alt="" width="607" height="426" /></a></p>
<h3>Onwards!</h3>
<p>So this weekend I&#8217;ve started getting lost in Xcode and Cocos2D. I was planning on banging out the core engine, but right now it looks unlikely. I&#8217;ve been running into some frightening challenges &#8211; I&#8217;ll go into detail about my pain points in another blog post soon!</p>
<p>In the mean time, let me know what your favorite monsters are! I&#8217;m also always happy to look at new reference games.</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/09/tiny-defense-concept-art/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tiny Defense</title>
		<link>http://bitbattalion.com/2011/09/tiny-defense/</link>
		<comments>http://bitbattalion.com/2011/09/tiny-defense/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 08:09:20 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Other Stuff]]></category>
		<category><![CDATA[Tiny Defense]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=973</guid>
		<description><![CDATA[So a lot has been happening in my life recently: I launched Mr Runner 2, I moved from Australia to San Francisco, I scored a job working for Zynga and now I&#8217;m being kicked out of the country while my visa is being sorted out. Things have been pretty exciting. But somehow, amidst all this [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://bitbattalion.com/2011/09/tiny-defense/"><img class="aligncenter size-full wp-image-974" title="Tiny Defense" src="http://bitbattalion.com/wp-content/uploads/2011/09/TinyDefenseTitle.png" alt="" width="640" height="300" /></a></p>
<p>So a lot has been happening in my life recently: I launched Mr Runner 2, I moved from Australia to San Francisco, I scored a job working for Zynga and now I&#8217;m being kicked out of the country while my visa is being sorted out. Things have been pretty exciting.</p>
<p>But somehow, amidst all this chaos, I  have two months of complete freedom. I&#8217;m going to use this two months to start work on a new game. But this time, I&#8217;m going to do things a little differently.<br />
Here is what will be new:</p>
<p><span id="more-973"></span></p>
<h2>A New Game: Tiny Defense</h2>
<p>Announcing Tiny Defense! Tiny Defense is a tower defense game for the iPhone that happens in real time. You&#8217;ll be fighting off monsters for days at a time, wherever you go. As you check back each day you&#8217;ll level up and unlock new towers to fight more and more bad ass monsters. You&#8217;ll even face off against epic boss monsters!</p>
<h2>A New Artist</h2>
<p>I&#8217;m bring Lee Lee on the team to help me churn this baby out. She&#8217;s a cool girl &#8211; she&#8217;s been working on a web comic for the escapist, <a href="http://www.escapistmagazine.com/articles/view/comics/namegame">Name Game</a>. Now she&#8217;s making bad ass games with me.</p>
<p style="text-align: center;"><a href="http://lascaldaferri.tumblr.com/"><img class="aligncenter" src="http://s3.amazonaws.com/data.tumblr.com/tumblr_lr4rj2fUZ71qf35wfo1_1280.jpg?AWSAccessKeyId=AKIAJ6IHWSU3BX3X7X3Q&amp;Expires=1316328629&amp;Signature=qNhKFnGJv9abEIAn44axz4pyEOM%3D" alt="" width="583" height="541" /></a></p>
<h2>A New Platform</h2>
<p>For the first time I&#8217;m developing on the iOS. I&#8217;m using the library <a href="http://www.cocos2d-iphone.org/">cocos2d</a>. It has a shitty logo, but its a great product! The API is actually very similar to flash&#8217;s display structure. I&#8217;ve also got a great friend Joey (he made <a href="http://itunes.apple.com/us/app/cave-dweller-dy-no-mite!/id418822375?mt=8">Cave Dweller</a>) helping me out learning XCode and Objective-C.</p>
<p style="text-align: center;"><a href="http://www.cocos2d-iphone.org/"><img class="aligncenter" title="Cocos2d" src="http://karnakgames.com/wp/wp-content/uploads/2010/07/Cocos2D-logo-angry.png" alt="" width="119" height="176" /></a></p>
<p style="text-align: center;">
<p style="text-align: center;">
<h2>A New Development Style</h2>
<p>I&#8217;m going to be doing <strong>Video Dev Logs</strong> every few days to show off what I&#8217;ve done. I&#8217;ll be using <strong>Screen Flow</strong>, which is a great (but expensive) piece of screen recording software.</p>
<p>I&#8217;m also going to be doing a Time Lapse of some of my coding sessions, so you can see the development of the game in action &#8211; from start to finish. I&#8217;ve found a great piece of software for time lapses &#8211; check out Screen Ninja.</p>
<p style="text-align: center;"><a href="http://itunes.apple.com/us/app/screenflow/id422025166?mt=12"><img src="http://a1.mzstatic.com/us/r1000/074/Purple/9d/33/a4/mzi.yrwiaevq.175x175-75.png" alt="" width="175" height="175" /></a> <a href="http://itunes.apple.com/us/app/screenninja/id408219793?mt=12"><img src="http://a2.mzstatic.com/us/r1000/067/Purple/9f/d1/c7/mzi.hajfgpve.175x175-75.png" alt="" width="175" height="175" /></a></p>
<p style="text-align: center;">
<h2>Lets do this!</h2>
<p>To kick things off, I&#8217;m doing a Game jam this weekend with Joey, Sam and Jeremy. Jeremy&#8217;s rocking HTML 5, Joey&#8217;s working on some IOS stuff, Sam&#8217;s drunk right now and playing mine craft. Scratch that, he&#8217;s now using an exercise  ball amusingly  incorrectly.</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/09/tiny-defense/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Will Make Games for Food</title>
		<link>http://bitbattalion.com/2011/09/will-make-games-for-food/</link>
		<comments>http://bitbattalion.com/2011/09/will-make-games-for-food/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 19:33:35 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Other Stuff]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=912</guid>
		<description><![CDATA[So earlier on in the year I did a presentation at iFest Sydney about how to turn a passion for making games into a profession. It covers my journey from a student to a developer who makes a living off flash games. I hope it has some useful perspectives you can take away if you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>So earlier on in the year I did a presentation at iFest Sydney about how to turn a passion for making games into a profession. It covers my journey from a student to a developer who makes a living off flash games.</p>
<p>I hope it has some useful perspectives you can take away if you&#8217;re looking to get started making money off flash games. If you have any questions just leave a comment!</p>
<p style="text-align: center;">
<p style="text-align: center;"><a href="http://bitbattalion.com/2011/09/will-make-games-for-food/"><img class="aligncenter" title="WillMakeGamesForFood" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.001.png" alt="" width="614" height="461" /></a></p>
<p><span id="more-912"></span></p>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.002.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;">
<blockquote>
<p style="text-align: left;">This is what I&#8217;ve done so far, it got me thinking about all the things I haven’t done yet</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.003.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.004.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.006.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.007.png" alt="" width="614" height="461" /></p>
<blockquote><p>What is a guy who hasn’t done any of these things doing presenting to people aspiring to do these things?<br />
I’ve got a long way to go.</p>
<p>But I am doing what I love. It’s my job to make games &#8211; I don’t have a job on the side, I don’t work for someone else.<br />
And so far, its payed for my university education on the same subject.</p></blockquote>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.008.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;">
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.009.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.010.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.011.png" alt="" width="614" height="461" /></p>
<blockquote>
<p style="text-align: left;">Everyone and their mom’s has the greatest game idea<br />
Hard Lesson: Having the best ideas doesn’t make you a talented game designer<br />
Skill: Turning that idea into an experience &#8211; it has to be learned.<br />
You won’t get it right the first time. Or the second.<br />
Best way to learn is to practice, the same way an artist or musician has to.</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" title="presentation" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.012.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;">
<blockquote>
<p style="text-align: left;">Minimalism if perfect for indies, especially when your starting out &#8211; cuts down time, makes up for lack of artistic talent.<br />
Make a kick assed half, not a half assed whole</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" title="presentaiton" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.013.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;">
<blockquote>
<p style="text-align: left;">As an indie it is almost impossible to predict what will make money.</p>
<p style="text-align: left;">Your best bet is to make something that you’re passionate about. Something that you want to play. That passion will seep into every aspect of your game and chances are it will excite people as much as it has excited you.</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.016.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;">
<blockquote>
<p style="text-align: left;">As an indie, you’re the only one who will ever see your code. Programatic Perfection is masturbation as long as it works it doesn’t need to look good. Don’t ever rewrite. Ever.</p>
<p style="text-align: left;">You’re a game designer, not a programmer, concentrate on where your skills are needed the most. The places that people will actually experience.</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.017.png" alt="" width="614" height="461" /></p>
<blockquote><p>Never program anything that has been done before. And almost everything has been done before and done better.</p></blockquote>
<p style="text-align: center;">
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.018.png" alt="" width="614" height="461" /></p>
<blockquote>
<p style="text-align: left;">There is no reason that your next spare hour shouldn’t be spent making an game. After those 5 slides, you have everything it takes to be churning out your own games. Go!</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.019.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;">
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.020.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.021.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.022.png" alt="" width="614" height="461" /></p>
<blockquote>
<p style="text-align: left;">Use <a href="http://flashgamelicense.com">FlashGameLicense.com</a> to sell your flash games with ease!</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.023.png" alt="" width="614" height="461" /></p>
<blockquote>
<p style="text-align: left;">Since this time I&#8217;ve also made:<br />
Mr Runner 2: $19000<br />
Mr Runner 1: $2500</p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.024.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.025.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.026.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.027.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.029.png" alt="" width="614" height="461" /></p>
<blockquote>
<p style="text-align: left;">Great set of resources: <a href="http://www.pixelprospector.com/indie-resources/">http://www.pixelprospector.com/indie-resources/</a></p>
</blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.030.png" alt="" width="614" height="461" /></p>
<blockquote><p>Recognition and respect: the successes of your previous works are presumed in your latest games. People come to respect your brand and the games that you make. It’s almost guaranteed that Mojang’s new game, Scrolls, will take off purely because of the respect generated for the studio by minecraft.</p>
<p>Often you’ll find that your games cross promote themselves. When Chaos Invaders was featured on Rock Paper Shotgun they mentioned Mr Runner 2, and I had a surge of beta testers. Often sites will refer to BitBattalion as “creators of Chaos Invaders and Gnop”. This type of validation works wonders for generating interest and also getting published at all. My latest game “Pathos” wasn’t well received by indiegames.com, but published simply because of BitBattalion’s previous relationship with them.</p>
<p>Your online presence will do work for you. If a sponsor comes across one of your games through your site or an article, they’ll often inquire about secondary sponsorships. All you have to do is negotiate the right price. Almost a quarter of my total income has happened through this alone.</p>
<p>Last but not least, I’ve received multiple of contract offers through my online presence, 2 of which I’m currently working on &#8211; there are a great deal of enthusiastic startups and companies that are actively looking for great game developers to work with. Your online presence is your key to their hearts and their wallets.</p></blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.031.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.032.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.033.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.034.png" alt="" width="614" height="461" /></p>
<blockquote><p>Contract work pays really well. And once you have built up a successful brand, you’ll have more contract offers than you have time for.</p>
<p>But just because you’re doing contract work doesn’t mean you have to do the worst contract work imaginable. There is a wide variety of contract work available, and if you’ve built up an awesome brand you’ll have the liberty of choosing.</p></blockquote>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.035.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.036.png" alt="" width="614" height="461" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://bitbattalion.com/wp-content/uploads/2011/09/presentation/WIllMakeGamesForFood.037.png" alt="" width="614" height="461" /></p>
<p style="text-align: left;">Thanks Guys! Hope you could take something useful away from that!</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/09/will-make-games-for-food/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Mr Runner 2</title>
		<link>http://bitbattalion.com/2011/07/900/</link>
		<comments>http://bitbattalion.com/2011/07/900/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 21:52:34 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Mr Runner 2]]></category>
		<category><![CDATA[Our Games]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=900</guid>
		<description><![CDATA[What are you waiting for? Go play it here! And then, if you would be so kind, rate it five stars on Kongregate To everyone that has been waiting with baited breath for the last few months &#8211; I&#8217;m sorry! Hopefully the extra few months that I put into the polish of the game will be [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://bitbattalion.com/games/mr-runner-2/"></a><a href="http://bitbattalion.com/games/mr-runner-2/"><img class="aligncenter size-full wp-image-906" title="MrRunner2" src="http://bitbattalion.com/wp-content/uploads/2011/07/finallyHere1.png" alt="" width="637" height="240" /></a></p>
<p style="text-align: center;">
<p>What are you waiting for? Go play it <a href="http://bitbattalion.com/games/mr-runner-2/">here</a>! And then, if you would be so kind, rate it five stars on <a href="http://www.kongregate.com/games/BitBattalion/mr-runner-2">Kongregate</a></p>
<p>To everyone that has been waiting with baited breath for the last few months &#8211; I&#8217;m sorry! Hopefully the extra few months that I put into the polish of the game will be worth while. Make sure when you play it you submit to leader boards, and race against all the people on the leaderboards, including me. If you can&#8217;t keep up to them, you can also watch their replays to see how they beat the level.</p>
<p>When you finish the game, send me an email! I&#8217;d love to hear what you thought. If anyone can get all platinum medals and all the treasure, I will knight them &#8211; this game is not easy.</p>
<p>So my adventure developing mr runner 2 has finally come to an end! Thanks to everyone that supported me and beta tested. It&#8217;s made a huge difference to me, I really appreciate your help. And thanks so much Zack James who did all the art, and Paul Kopetko, who did the amazing music. I love you guys!</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/07/900/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Mr Runner 2 Trailer</title>
		<link>http://bitbattalion.com/2011/04/mr-runner-2-trailer/</link>
		<comments>http://bitbattalion.com/2011/04/mr-runner-2-trailer/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 10:14:50 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Mr Runner 2]]></category>
		<category><![CDATA[Our Games]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=883</guid>
		<description><![CDATA[If you&#8217;ve been following the beta tests you&#8217;ll know that it&#8217;s almost upon us. I&#8217;ve just finished uploading the game to Flash Game License to find a sponsor, so he&#8217;ll be ready to run within a few weeks. In the mean time &#8211; enjoy the trailer above with a juicy remix of the music by [...]]]></description>
			<content:encoded><![CDATA[<object width="640" height="340"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=22877005"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="never"></param><param name="allownetworking" value="internal"></param><param name="flashvars" value="" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=22877005" type="application/x-shockwave-flash" allowscriptaccess="never" allownetworking="internal" allowfullscreen="true" width="640" height="340" flashvars=""></embed></object>
<p>If you&#8217;ve been following the beta tests you&#8217;ll know that it&#8217;s almost upon us. I&#8217;ve just finished uploading the game to Flash Game License to find a sponsor, so he&#8217;ll be ready to run within a few weeks.</p>
<p>In the mean time &#8211; enjoy the trailer above with a juicy remix of the music by Paul Kopetko.</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/04/mr-runner-2-trailer/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The Art of Level Design</title>
		<link>http://bitbattalion.com/2011/04/the-art-of-level-design/</link>
		<comments>http://bitbattalion.com/2011/04/the-art-of-level-design/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 06:03:04 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Game Design]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=872</guid>
		<description><![CDATA[Of all of my time spent on Mr Runner there is one thing which takes up most of my time &#8211; designing the levels.  I&#8217;d like to share a few lessons I&#8217;ve learned about level design that I think are really valuable. 1. Work out the feel of your game Sounds simple, but its not. [...]]]></description>
			<content:encoded><![CDATA[<p>Of all of my time spent on Mr Runner there is one thing which takes up most of my time &#8211; designing the levels.  I&#8217;d like to share a few lessons I&#8217;ve learned about level design that I think are really valuable.</p>
<h4>1. Work out the <em>feel</em> of your game</h4>
<p>Sounds simple, but its not. Mr Runner isn&#8217;t just a platfomer, it&#8217;s about conserving speed and momentum. Super Meat Boy is about very precise death-evasion. Knytt stories is about exploring. These are all platformers that have very different feels.<br />
It&#8217;s important that you get a feel for your own game. When you work it out, this feel will be the root of all your levels. You&#8217;ll keep asking your self, does this level feel the way I want it to? For example, every level in mr runner you can do quickly by conserving momentum.</p>
<h4>2. Only design levels that fit that <em>feel</em></h4>
<p>When I opened up Mr Runner 1 to the public, I let them design their own levels. Of these, only a handful were fun. This is because Mr Runner requires a very specific style of controls.</p>
<p>In Mr Runner, the controls are designed to be fun when you jump large distances, conserve momentum, time jumps perfectly, make big wall jumps. They aren&#8217;t designed to deal with very precise movements in small areas, stopping and starting, or waiting. The level design had to reflect this. It was never cramped, never required anything to finicky, and instead included large flowing movements that let you keep up your speed.</p>
<p>Put more simply, the game was never difficult because the controls were difficult. At all times, the player should feel as though it&#8217;s their fault they died, and this is almost entirely up to level design.</p>
<p><span id="more-872"></span></p>
<h4>3. Every level has a unique theme</h4>
<p>Its no secret that I&#8217;m a huge fan of Super Meat Boy, I have A+ the entire game and died more that 22000 times. Part of the reason that I love it so much is that every level is different while maintaining the same feel. Every level has something specific that the player has to do or learn, and no two levels look the same. Each level has a &#8220;theme&#8221;.</p>
<p>Now take a game like League of Evil, which claims to be the &#8220;Super Meat Boy&#8221; of the iPhone. I thought it was fun, don&#8217;t get me wrong. That being said there are 60 levels and it&#8217;s almost impossible to tell them apart. They use the same mechanics in the same way, with slightly different level lay outs &#8211; now you have to go Left, not right!</p>
<h4>4. Keep it interesting</h4>
<p>The player should always feel like they are progressing through the game. One of the biggest mistakes you can make when trying to achieve this, is to throw in a whole lot of levels without introducing any new mechanics.</p>
<p>In Mr Runner 2, I introduce three new mechanics over the 15 levels of each world and in the first world I introduce even more. Players will never have to sit through more than a few levels before they are faced with something that challenges them in a new and interesting way. Typically once a player feels like they&#8217;ve experienced all a game has to offer, there is very little incentive to keep playing. If the first level has all they&#8217;ll ever see &#8211; their patience will wear thin.</p>
<h4>5. The WOW factor</h4>
<p>There should be at least one bit in every level which makes the player feel awesome. A bit where they literally say outloud &#8220;that was cool&#8221;, even if no one is around to hear. The bit they want to tell their friends about. The bit they feel like a bad ass for surviving.</p>
<p>Let me give you some examples from Mr Runner: it&#8217;s when you first do a slide, when you fall really far and the screen begins to shake with speed, when you&#8217;re tossed and miss some spikes by a hairs breadth, when you boost for the first time. If you can&#8217;t fit a &#8220;wow&#8221; moment into every level, at least reward the player every few levels &#8211; thats why they&#8217;re sticking in there.</p>
<h4>6. You are not your players</h4>
<p>Don&#8217;t assume just because you find / don&#8217;t find a level fun, everyone will feel the same way. By the time you finish designing levels, you&#8217;ll be so good at the game that you&#8217;ll be missing out on an entire section of the learning curve. People&#8217;s experience when they first start playing will be very different to your own, so make sure you test it on fresh meat &#8211; people who haven&#8217;t played it for hours on end. Chances are you&#8217;ll need to make your game a shit load easier.</p>
<h4>7. Start with a vertical slice</h4>
<p>When you sit down to design a level for the first time, you want that level to reflect how the entire game will feel.</p>
<p>Starting at the beginning will force you to design it to be easy, and you&#8217;ll have to drop bits which will make it fun later on. Instead, try starting half way through. This will let you design a level which is in total harmony with the feel of your game, and you&#8217;ll quickly pick up on what is involved in making this harmony happen. Basically, aim to create a level which summarises why your game is fantastic.</p>
<h4>8. Build yourself a comprehensive level editor</h4>
<p>Building a level editor can be a chore, but not building one makes designing levels a chore. By making the best level editor you can, you&#8217;ll be saving yourself time and pain in the long run. Also, don&#8217;t feel afraid to come back and fix it up whenever you need to. After designing my level editor, I decided it needed an undo feature &#8211; so I put it in. I also wanted to have it auto save to clip board when i pressed s &#8211; so I put it in. These ended up saving me loads of time in the long run.</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/04/the-art-of-level-design/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mr Runner Makeover</title>
		<link>http://bitbattalion.com/2011/02/mr-runner-makeover/</link>
		<comments>http://bitbattalion.com/2011/02/mr-runner-makeover/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 04:13:36 +0000</pubDate>
		<dc:creator>Sash</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Mr Runner 2]]></category>
		<category><![CDATA[Our Games]]></category>

		<guid isPermaLink="false">http://bitbattalion.com/?p=839</guid>
		<description><![CDATA[One of the most interesting things about writing a sequel is that you feel obligated to fix everything that was wrong with the first game. I&#8217;m being almost OCD about it, which might explain why the game is running very very very slightly late. The latest thing that I&#8217;ve been working hard on is Mr Runner [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most interesting things about writing a sequel is that you feel obligated to fix everything that was wrong with the first game. I&#8217;m being almost OCD about it, which might explain why the game is running very very very slightly late.</p>
<p>The latest thing that I&#8217;ve been working hard on is Mr Runner himself. I feel like he deserves extra treatment since the game is named after him. The first game didn&#8217;t really give him much context or character development. He was just a cute black square thing running through world. It was cute. He&#8217;s still a cute black thing running through a world but now, well,</p>
<h4>Now he&#8217;s even cuter</h4>
<div id="efe-swf-1" class="efe-flash"><!-- --></div>
<h4>And has a pet, Sir Scruffs</h4>
<div id="efe-swf-2" class="efe-flash"><!-- --></div>
<p><span id="more-839"></span><strong>Here is what he used to look like</strong></p>
<div id="efe-swf-3" class="efe-flash"><!-- --></div>
<p>Suffices to say Mr Runner won&#8217;t be so alone in the second game. You&#8217;ll find out why you&#8217;re running through a world that is coming to an end.</p>
<h3>Animation lessons I Learned</h3>
<p>Animating Mr Runner wasn&#8217;t just my own doing. I&#8217;ve got a great friend who is also conviently a super talented professional animator. There were a few really interesting things that I learned from him when we sat down to animate. Here are the things I learned:</p>
<h4>Exaggerate your animation</h4>
<p>Firstly, there is almost always room to exaggerate your animation, and it looks great. Here is the same image 5x slower &#8211; it looks strange, particularly when he is squashed right into the ground. When its animating fast though, you can hardly see it. In fact, you can see it even less in his in game sprite (which is much smaller). Despite that, the one frame adds ALOT to the quality his animation.</p>
<div id="efe-swf-4" class="efe-flash"><!-- --></div>
<h4>Draw up the key poses first</h4>
<p>Make sure he looks good in his key poses, before you worry about how he looks inbetween them. Draw out exactly what your character will look like during the key points in the animation. We drew out, for example, what he would look like with his left hand forward, his left hand back, and while he was squashed towards the ground. From there, putting in the motion is just a matter of fiddling with tweens.</p>
<h4>Don&#8217;t use eases</h4>
<p>Don&#8217;t use the flash eases, create &#8220;fake&#8221; eases by keyframing. This was something that I had trouble wrapping my head around. Once you have put in an ease ease between two keyframes, its almost impossible to add any more keyframe inbetween. Doing so will often make it look the the characters velocity jumps. ugly. Instead, try putting a keyframe in the middle of your two frames, and then move it around. This will create the illusion of easing and still leave you in total control.</p>
<h4>Flash is a bitch</h4>
<p>So you might have guessed, but working with flash is a bitch. I&#8217;m still using classic animation, which might be part of it. Whenever you&#8217;re animating something its easy for one change in one frame to end up causing a chain reaction and changing the look of your animation entirely without you knowing. My advice? Save incrementally. Whenever you want to change anything, make a new save.</p>
<p>Over and out</p>
]]></content:encoded>
			<wfw:commentRss>http://bitbattalion.com/2011/02/mr-runner-makeover/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

