<?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>Cult Creative :: A Digital Agency</title>
	<atom:link href="http://www.cultcreative.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cultcreative.com</link>
	<description></description>
	<lastBuildDate>Mon, 11 Mar 2013 21:54:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Raspberry Pi Tutorials</title>
		<link>http://www.cultcreative.com/blog/03/11/2013/raspberry-pi-tutorials/</link>
		<comments>http://www.cultcreative.com/blog/03/11/2013/raspberry-pi-tutorials/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 21:52:34 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[mindwave]]></category>
		<category><![CDATA[raspberry]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=808</guid>
		<description><![CDATA[<p>With <a title="Creative Technologists of Toronto - Pi Day" href="http://www.cultcreative.com/blog/11/16/2012/cult-creative-toronto-creative-technologists/" target="_blank">Pi Day</a> fast approaching, we thought it would be useful for our readers to take a look at some of the tutorials that we have written surrounding the Raspberry Pi, Arduino and Mindwave Mobile.  They can be found on &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>With <a title="Creative Technologists of Toronto - Pi Day" href="http://www.cultcreative.com/blog/11/16/2012/cult-creative-toronto-creative-technologists/" target="_blank">Pi Day</a> fast approaching, we thought it would be useful for our readers to take a look at some of the tutorials that we have written surrounding the Raspberry Pi, Arduino and Mindwave Mobile.  They can be found on the Creative Technologists of Toronto blog:</p>
<p><a target="_blank" title="Raspberry Pi Setup – Quick and Simple" href="http://cttoronto.com/03/04/2013/raspberry-pi-setup-quick-and-simple/" target="_blank">Raspberry Pi Setup &#8211; Quick and Simple</a></p>
<p><a target="_blank" title="Interfacing with the Mindwave Mobile" href="http://cttoronto.com/03/04/2013/interfacing-with-the-mindwave-mobile/" target="_blank">Interfacing with the Mindwave Mobile</a></p>
<p><a target="_blank" title="Connecting and Communicating - Raspberry Pi and Arduino" href="http://cttoronto.com/03/11/2013/connection-and-communicating-arduino-and-raspberry-pi/" target="_blank">Connecting and Communicating &#8211; Raspberry Pi and Arduino</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/blog/03/11/2013/raspberry-pi-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pi Day Extravaganza</title>
		<link>http://www.cultcreative.com/blog/03/04/2013/pi-day-extravaganza/</link>
		<comments>http://www.cultcreative.com/blog/03/04/2013/pi-day-extravaganza/#comments</comments>
		<pubDate>Mon, 04 Mar 2013 18:01:30 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=800</guid>
		<description><![CDATA[<p>As mentioned in a previous <a target="_blank" title="Cult Creative / Toronto / Creative Technologists" href="http://www.cultcreative.com/blog/11/16/2012/cult-creative-toronto-creative-technologists/">blog post,</a> we are part of a group called the <a title="Creative Technologists of Toronto" href="http://cttoronto.com" target="_blank">Creative Technologists of Toronto (cttoronto.com)</a>.  Our goal is to learn and create, every two months we aim to build a new project utilizing different &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>As mentioned in a previous <a target="_blank" title="Cult Creative / Toronto / Creative Technologists" href="http://www.cultcreative.com/blog/11/16/2012/cult-creative-toronto-creative-technologists/">blog post,</a> we are part of a group called the <a title="Creative Technologists of Toronto" href="http://cttoronto.com" target="_blank">Creative Technologists of Toronto (cttoronto.com)</a>.  Our goal is to learn and create, every two months we aim to build a new project utilizing different technologies that we haven&#8217;t necessarily worked with in the past.  This session we targeted Pi Day (March 14, 2013) as our target date and we have been working on a game called Pi Fighter 2 that should be quite a bit of fun!</p>
<p>We are going to be demoing the game at the Handlebar in Kensington Market on Pi Day, and all are welcome.  For some more information about what we are building, check out our page @ <a target="_blank" title="Creative Technologists of Toronto - Pi Day" href="http://cttoronto.com/piday/" target="_blank">http://cttoronto.com/piday/</a></p>
<p>Come and check it out, support our group and have a couple drinks. <a target="_blank" title="Creative Technologists of Toronto Pi Day Event" href="https://www.facebook.com/events/448058041931538/" target="_blank">https://www.facebook.com/events/448058041931538/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/blog/03/04/2013/pi-day-extravaganza/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cult Creative / Toronto / Creative Technologists</title>
		<link>http://www.cultcreative.com/blog/11/16/2012/cult-creative-toronto-creative-technologists/</link>
		<comments>http://www.cultcreative.com/blog/11/16/2012/cult-creative-toronto-creative-technologists/#comments</comments>
		<pubDate>Fri, 16 Nov 2012 20:10:37 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=794</guid>
		<description><![CDATA[<p>A year ago, we wrote and told you about our move to Kelowna, well, things have changed again.  After enjoying the mountains and the beaches in western Canada for a year, we have moved everything back to Toronto.  It was &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>A year ago, we wrote and told you about our move to Kelowna, well, things have changed again.  After enjoying the mountains and the beaches in western Canada for a year, we have moved everything back to Toronto.  It was beautiful out west, but we missed the city a little bit too much; so we came back in October.</p>
<p>More news, now that we are back in Toronto.  We have joined forces with a bunch of different people in town and formed a group of creative technology enthusiasts called the Creative Technologists of Toronto.  You can check out our blog at <a target="_blank" href="http://creativetoronto.wordpress.com" title="Creative Toronto on WordPress">http://cttoronto.com</a>, we have also began updating our Facebook page @ <a target="_blank" href="http://www.facebook.com/CreativeTechTO" title="Creative Technologists of Toronto">http://www.facebook.com/CreativeTechTO</a> and on twitter @ <a target="_blank" href="https://twitter.com/CreativeTechTO" title="Creative Tech TO">https://twitter.com/CreativeTechTO</a>.</p>
<p>We meet weekly on Wednesday nights where we learn, work, and drink.  It has been quite fun for the past month and we are very excited to start building a couple of projects.  If you are interested, feel free to post on our Facebook page or shoot us a message at <a target="_blank" href="mailto:contact@cultcreative.com" title="Contact us">contact@cultcreative.com</a> asking for more details.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/blog/11/16/2012/cult-creative-toronto-creative-technologists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disappearing Facebook Like Buttons</title>
		<link>http://www.cultcreative.com/blog/10/22/2012/disappearing-facebook-like-buttons/</link>
		<comments>http://www.cultcreative.com/blog/10/22/2012/disappearing-facebook-like-buttons/#comments</comments>
		<pubDate>Mon, 22 Oct 2012 22:50:12 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[like]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=720</guid>
		<description><![CDATA[<p>We are writing this today to continue sharing our learnings about the idiosyncrasies in the Facebook API. We have talked before about some of the &#8216;missing&#8217; documentation that we have come across, but this one almost drove us bonkers.</p>
<p>We &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>We are writing this today to continue sharing our learnings about the idiosyncrasies in the Facebook API. We have talked before about some of the &#8216;missing&#8217; documentation that we have come across, but this one almost drove us bonkers.</p>
<p>We were making a page that had a requirement for a ton of like buttons on it. We tried to use the Graph API, but the process was rejected because the functionality already exists in the plug-in. The issue with the plugin is that you don&#8217;t get any visual control over the buttons and you end up with dozens of iframes within your page.</p>
<p>We were forced to use the standard Like buttons and just wrap them in div&#8217;s to hide the overflow. This is something that we have done before, but find it to be more of a hack than being able to actually control the look / feel.</p>
<p>What happened to us was that all of a sudden, we could only see half the like buttons. For hours we tried to figure out what the issue was. There was nothing online that we could find that would justify this. We tried numerous browsers, a ton of different things, but had very little luck.</p>
<p>In the end, we discovered what the issue was, it feels like such a stupid thing BUT could have saved a ton of time with testing; so we figured we would share our findings.</p>
<p>It appears that when an item is liked (possibly just with Graph API), it becomes part of the app&#8217;s property. If the app just happens to be in sandbox mode and the tester is logged out, they will not see any of the Like buttons for those previously liked objects&#8230; but they will see the Like buttons for other objects on the same domain that weren&#8217;t previously liked.</p>
<p>Hopefully, this helps someone save the time that we spent searching for a possible solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/blog/10/22/2012/disappearing-facebook-like-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Battle the Drain</title>
		<link>http://www.cultcreative.com/portfolio/10/16/2012/battle-the-drain/</link>
		<comments>http://www.cultcreative.com/portfolio/10/16/2012/battle-the-drain/#comments</comments>
		<pubDate>Tue, 16 Oct 2012 18:02:57 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[citrus]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[game]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=638</guid>
		<description><![CDATA[<div class="blog-imagelist" style="width: 340px;"><a target="_blank" href="http://www.cultcreative.com/assets/Screen-Shot-2012-10-16-at-1.49.11-PM.png"><img class="alignleft size-medium wp-image-550" title="Liquid Plumr Facebook Page" src="/assets/Screen-Shot-2012-10-16-at-1.49.11-PM.png" alt="Screen Shot 2012 10 16 at 1.49.11 PM Battle the Drain" width="150" height="150" /></a><a href="/assets/Screen-Shot-2012-10-16-at-1.48.45-PM.png"><img class="alignleft size-medium wp-image-550" title="Battle the Drain" src="/assets/Screen-Shot-2012-10-16-at-1.48.45-PM.png" alt="Screen Shot 2012 10 16 at 1.48.45 PM Battle the Drain" width="150" height="150" /></a><a target="_blank" href="/assets/Screen-Shot-2012-10-16-at-1.48.21-PM.png"><img class="alignleft size-medium wp-image-551" title="Battle the Drain" src="/assets/Screen-Shot-2012-10-16-at-1.48.21-PM.png" alt="Screen Shot 2012 10 16 at 1.48.21 PM Battle the Drain" width="150" height="150" /></a><a target="_blank" href="/assets/Screen-Shot-2012-10-16-at-1.48.59-PM.png"><img class="alignnone size-thumbnail wp-image-555" title="Liquid Plumr - Battle the Drain" src="/assets/Screen-Shot-2012-10-16-at-1.48.59-PM.png" alt="Screen Shot 2012 10 16 at 1.48.59 PM Battle the Drain" width="150" height="150" /></a></div>
<div class="clearfix"> </div>
<p>Working with the amazing folks over at Evolution Bureau, we were tasked with building a game for Facebook where the character is running through pipes, destroying clogs with her Liquid Plumr products.</p>
<p>This was one of the more fun projects &#8230;</p>]]></description>
				<content:encoded><![CDATA[<div class="blog-imagelist" style="width: 340px;"><a target="_blank" href="http://www.cultcreative.com/assets/Screen-Shot-2012-10-16-at-1.49.11-PM.png"><img class="alignleft size-medium wp-image-550" title="Liquid Plumr Facebook Page" src="/assets/Screen-Shot-2012-10-16-at-1.49.11-PM.png" alt="Screen Shot 2012 10 16 at 1.49.11 PM Battle the Drain" width="150" height="150" /></a><a href="/assets/Screen-Shot-2012-10-16-at-1.48.45-PM.png"><img class="alignleft size-medium wp-image-550" title="Battle the Drain" src="/assets/Screen-Shot-2012-10-16-at-1.48.45-PM.png" alt="Screen Shot 2012 10 16 at 1.48.45 PM Battle the Drain" width="150" height="150" /></a><a target="_blank" href="/assets/Screen-Shot-2012-10-16-at-1.48.21-PM.png"><img class="alignleft size-medium wp-image-551" title="Battle the Drain" src="/assets/Screen-Shot-2012-10-16-at-1.48.21-PM.png" alt="Screen Shot 2012 10 16 at 1.48.21 PM Battle the Drain" width="150" height="150" /></a><a target="_blank" href="/assets/Screen-Shot-2012-10-16-at-1.48.59-PM.png"><img class="alignnone size-thumbnail wp-image-555" title="Liquid Plumr - Battle the Drain" src="/assets/Screen-Shot-2012-10-16-at-1.48.59-PM.png" alt="Screen Shot 2012 10 16 at 1.48.59 PM Battle the Drain" width="150" height="150" /></a></div>
<div class="clearfix"> </div>
<p>Working with the amazing folks over at Evolution Bureau, we were tasked with building a game for Facebook where the character is running through pipes, destroying clogs with her Liquid Plumr products.</p>
<p>This was one of the more fun projects of the year for us. Websites and apps are fun, but games require that extra bit of creativity and problem solving that we enjoy so much.</p>
<p>After going through a couple of different technology options, we ended up using the <a target="_blank" title="Citrus Engine" href="http://www.cultcreative.com/blog/08/12/2012/citrus-engine/">Citrus Engine</a> (<a title="Citrus Engine" href="http://citrusengine.com" target="_blank">http://citrusengine.com</a>). For more on the Citrus Engine and its capabilities, check out our <a title="Citrus Engine" href="http://www.cultcreative.com/blog/08/12/2012/citrus-engine/" target="_blank">blog post</a> about our experiences with the system.</p>
<p>The engine came with a level builder that compiles a lot of the XML for you and ties into the API for rapid development and editing. We then built out the character animations and built out the weapons in the game, which proved to be quite a challenge since it was a little difficult finding much documenation on the weapon systems.</p>
<p>In the end, the game turned out quite well, it was tied in with a contest which ran smoothly. You can still play the game over at the Liquid Plumbr Facebook page (https://www.facebook.com/LiquidPlumr)</p>
<p><strong>Client:</strong> <a target="_blank" title="Liquid Plumr" href="http://www.liquidplumr.com/" target="_blank">Liquid Plumr</a><br />
<strong>Agency:</strong> <a target="_blank" title="Evolution Bureau" href="http://www.evb.com/" target="_blank">Evolution Bureau</a><br />
<strong>Technologies Implemented:</strong> PHP, Flash, ActionScript, Citrus Engine<br />
<strong>Our Role:</strong> Develop the Facebook game in Citrus Engine, build Flash/ActionScript application, setup high score board.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/portfolio/10/16/2012/battle-the-drain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copy Starling DisplayObject to BitmapData</title>
		<link>http://www.cultcreative.com/tutorials/10/10/2012/copy-starling-displayobject-to-bitmapdata/</link>
		<comments>http://www.cultcreative.com/tutorials/10/10/2012/copy-starling-displayobject-to-bitmapdata/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 15:54:55 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[bitmapdata]]></category>
		<category><![CDATA[displayobject]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[starling]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=660</guid>
		<description><![CDATA[<p>One thing that has been slightly documented in the <a target="_blank" title="Starling Framework - Cult Creative" href="http://www.cultcreative.com/blog/06/16/2012/starling-framework/">Starling</a> forums is the copyAsBitmapData function. There were a couple issues that we had with the examples that were posted, mainly that things are always changing in the system and there &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>One thing that has been slightly documented in the <a target="_blank" title="Starling Framework - Cult Creative" href="http://www.cultcreative.com/blog/06/16/2012/starling-framework/">Starling</a> forums is the copyAsBitmapData function. There were a couple issues that we had with the examples that were posted, mainly that things are always changing in the system and there are non that reference the <a title="Starling Framework GitHub" href="https://github.com/PrimaryFeather/Starling-Framework" target="_blank">current build in GitHub (Oct 17, 2012).</a></p>
<p>The reason that we need to take the snapshot of objects is primarily to be able to replace complex objects with bitmaps, for saving state in the apps that we have built.</p>
<p>It isn&#8217;t the most straight forward function, if you aren&#8217;t familiar with how the framework works, so we thought that we would show how to do it.</p>
<pre class="brush: as3">public static function copyAsBitmapData(ARG_sprite:DisplayObject):BitmapData {

			if ( ARG_sprite == null) {
				return null;
			}

			var resultRect:Rectangle = new Rectangle();
			sprite.getBounds(sprite, resultRect);

			var context:Context3D = Starling.context;
			var scale:Number = Starling.contentScaleFactor;

			var nativeWidth:Number = Starling.current.stage.stageWidth;
			var nativeHeight:Number = Starling.current.stage.stageHeight;

			var support:RenderSupport = new RenderSupport();
			RenderSupport.clear();
			support.setOrthographicProjection(0,0,nativeWidth, nativeHeight);
			support.applyBlendMode(true);

			if (sprite.parent){
				support.transformMatrix(sprite.parent);
			}

			support.translateMatrix( -sprite.x + sprite.width / 2, -sprite.y + sprite.height / 2 );

			var result:BitmapData = new BitmapData(nativeWidth, nativeHeight, true, 0x00000000);

			support.pushMatrix();

			support.blendMode = sprite.blendMode;
			support.transformMatrix(sprite);
			sprite.render(support, 1.0);
			support.popMatrix();

			support.finishQuadBatch();

			context.drawToBitmapData(result);	

			var w:Number = sprite.width;
			var h:Number = sprite.height;

			if (w == 0 || h == 0) {
				return null;
			}

			var returnBMPD:BitmapData = new BitmapData(w, h, true, 0);
			var cropArea:Rectangle = new Rectangle(0, 0, sprite.width, sprite.height);

			returnBMPD.draw( result, null, null, null, cropArea, true );
			return returnBMPD;
		}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/tutorials/10/10/2012/copy-starling-displayobject-to-bitmapdata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Citrus Engine</title>
		<link>http://www.cultcreative.com/blog/08/12/2012/citrus-engine/</link>
		<comments>http://www.cultcreative.com/blog/08/12/2012/citrus-engine/#comments</comments>
		<pubDate>Sun, 12 Aug 2012 17:27:08 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[citrus]]></category>
		<category><![CDATA[engine]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[starling]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=631</guid>
		<description><![CDATA[<p><strong><a target="_blank" href="/assets/Screen-Shot-2012-10-16-at-1.29.48-PM.png"><img class="alignleft size-full wp-image-632" title="Citrus Engine logo" src="/assets/Screen-Shot-2012-10-16-at-1.29.48-PM.png" alt="Screen Shot 2012 10 16 at 1.29.48 PM Citrus Engine" width="160" height="91" /></a>What is it?</strong></p>
<p>Citrus engine is a Flash game engine. It incorporates physics and level editing for building side-scrolling 2D games in Flash. The latest version of Citrus Engine is built to work on top of the <a target="_blank" title="Starling Framework - Cult Creative" href="http://www.cultcreative.com/blog/06/16/2012/starling-framework/">Starling Framework</a> (&#8230;</p>]]></description>
				<content:encoded><![CDATA[<p><strong><a target="_blank" href="/assets/Screen-Shot-2012-10-16-at-1.29.48-PM.png"><img class="alignleft size-full wp-image-632" title="Citrus Engine logo" src="/assets/Screen-Shot-2012-10-16-at-1.29.48-PM.png" alt="Screen Shot 2012 10 16 at 1.29.48 PM Citrus Engine" width="160" height="91" /></a>What is it?</strong></p>
<p>Citrus engine is a Flash game engine. It incorporates physics and level editing for building side-scrolling 2D games in Flash. The latest version of Citrus Engine is built to work on top of the <a target="_blank" title="Starling Framework - Cult Creative" href="http://www.cultcreative.com/blog/06/16/2012/starling-framework/">Starling Framework</a> (<a title="Starling Framework" href="http://gamua.com/starling" target="_blank"><cite>gamua.com/starling</cite></a>) allowing the engine to publish itself as 2D to Stage3D, thus enabling hardware acceleration.</p>
<p><strong>Why Citrus?</strong></p>
<p>Citrus Engine is now a free framework that has a decent support community that is very helpful for starting up. They also provide a same game and there are tons of tutorials. We have tried several different game engines for things like isometrics, side-scrolling, etc and found Citrus to have one of the shortest learning curves.</p>
<p><strong>Our Experiences</strong></p>
<p>In the past, we have toyed with the idea of using Citrus Engine but have never seen a true need for a full game engine in most of the projects that we work on. Recently we needed to build something out relatively quickly, and that meant finding a solid engine to take care of things like side-scrolling and physics.</p>
<p>We found it very easy to get going in the engine, but quickly hit a brick wall. We were trying to build character animations, weapons, fairly complex levels with coins, and a bunch more. There wasn&#8217;t much time to go through the entire code library, so we were hoping that there would be a lot of documentation in the forums. The unfortunate thing is that there wasn&#8217;t much help. We were forced to dig through the engine from the ground up and learn how all the pieces tied together and what the engine was looking for in terms of frame labels for animation sequences.</p>
<p>In the end, that was still MUCH faster than building our own game engine from scratch and we are very thankful to the folks that built the engine. Apart from the advanced documentation not being there when we needed it, we got things going and it all worked out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/blog/08/12/2012/citrus-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starling Memory Management</title>
		<link>http://www.cultcreative.com/tutorials/07/22/2012/starling-memory-management/</link>
		<comments>http://www.cultcreative.com/tutorials/07/22/2012/starling-memory-management/#comments</comments>
		<pubDate>Sun, 22 Jul 2012 15:33:51 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[bitmapdata]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[starling]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=656</guid>
		<description><![CDATA[<p>If you aren&#8217;t sure what Starling is, <a title="Starling Framework - Cult Creative" href="http://www.cultcreative.com/blog/06/16/2012/starling-framework/">check here</a> for our thoughts on the framework. One thing that we struggled with from the beginning with Starling was memory management, flash and ActionScript has always struggled with memory on mobile devices, &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p>If you aren&#8217;t sure what Starling is, <a title="Starling Framework - Cult Creative" href="http://www.cultcreative.com/blog/06/16/2012/starling-framework/">check here</a> for our thoughts on the framework. One thing that we struggled with from the beginning with Starling was memory management, flash and ActionScript has always struggled with memory on mobile devices, so we were quite concerned. Our first Starling app was for graphics-heavy and there was a lot of drawing to bitmaps and re-using textures.</p>
<p>What we quickly learned was that when you create a texture, Starling doesn&#8217;t automagically look to see if there is a texture that already exists that is identical. It also doesn&#8217;t destroy the Bitmap reference when the Texture is destroyed.</p>
<p>Our solution was to make a simple texture / asset manager.</p>
<p>The approach is quite basic, but it drastically improved performance in the app. We made a singleton class so that we could ensure it was accessible from the entire app and that there would only ever be one instance of it (http://blog.pixelbreaker.com/actionscript-3-0/as30-better-singletons).</p>
<p>From there, all that needed to be done was to create a Dictionary object to house all references to the Textures / Bitmap Objects. We called that “textures”. To simplify calls from the rest of the app, we created a quick get function and a delete function. It looks like the this:</p>
<pre class="brush: as3">package {
	import flash.utils.Dictionary;
	import flash.display.BitmapData;
	import starling.textures.Texture;

	public class TextureLoader {

		private static var instance:TextureLoader;
		private var _textureDictionary:Dictionary;

		public function get textureDictionary():Dictionary
		{
			return _textureDictionary;
		}

		public function set textureDictionary(value:Dictionary):void
		{
			_textureDictionary = value;
		}

		public static function getInstance():TextureLoader {
			if (instance == null) {
				instance = new TextureLoader(new SingletonBlocker());
			}
			return instance;
		}

		public function TextureLoader(p_key:SingletonBlocker):void {
			// this shouldn't be necessary unless they fake out the compiler:
			if (p_key == null) {
				throw new Error("Error: Instantiation failed: Use TextureLoader.getInstance() instead of new.");
			}
		}

		public function getBitmapTexture(ARG_name:String, ARG_bmp:Class):Texture {

			if (textureDictionary == null) textureDictionary = new Dictionary();

			if (textureDictionary[ARG_name] != null) {
				return textureDictionary[ARG_name];
			} else {
				var bmp:BitmapData = new ARG_bmp();
				var texture:Texture = Texture.fromBitmapData(new ARG_bmp());
				// dispose the bitmap data after it has been applied to a texture
				bmp.dispose();
				bmp = null;
				// assign the texture to the dictionary
				textureDictionary[ARG_name] = texture;
				return texture;
			}

			return null;
		}

		public function clearTexture(ARG_name:String):void {
			if (textureDictionary[ARG_name] != null) {
				textureDictionary[ARG_name].dispose();
				delete textureDictionary[ARG_name];
			}
		}
	}
}
// the following code is also in the SingletonDemo.as file
// this class is only available to SingletonDemo
// (despite the internal access designation)
internal class SingletonBlocker {}</pre>
<p>Something that you might notice in there is that we are disposing the BitmapData object and setting it to null. What happens in Starling / Stage 3D is that the BitmapData gets duplicated into a Texture, leaving the BitmapData to float around in memory.</p>
<p>We dispose of the BitmapData and then set it to null to allow it to be collected by the Garbage Collector.</p>
<p>The way this class works, is that you request a texture, passing in the BitmapData class reference and a name. It then checks to see if that has already been created. If it has been created, it returns that texture. If not, it will create it and add it to the dictionary for later use.</p>
<pre class="brush: as3">// create an image from the background image class, name it “backgroundImage
var img:Image = new Image (TextureLoader.getInstance().getBitmapTexture (“backgroundImage”, assets.backgroundImage));</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/tutorials/07/22/2012/starling-memory-management/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>NOS Racing Game</title>
		<link>http://www.cultcreative.com/portfolio/07/03/2012/nos-racing-game/</link>
		<comments>http://www.cultcreative.com/portfolio/07/03/2012/nos-racing-game/#comments</comments>
		<pubDate>Tue, 03 Jul 2012 15:06:30 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[nos]]></category>
		<category><![CDATA[racing]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=648</guid>
		<description><![CDATA[<div class="blog-imagelist" style="width: 340px;"><a target="_blank" href="/assets/NOS1.png"><img class="class=" title="NOS Racing Game" src="/assets/NOS1.png" alt="NOS1 NOS Racing Game" width="150" height="150" /></a><a target="_blank" href="/assets/NOS2.png"><img class="alignleft size-medium wp-image-550" title="NOS Racing Game" src="/assets/NOS2.png" alt="NOS2 NOS Racing Game" width="150" height="150" /></a><a target="_blank" href="/assets/NOS3.png"><img class="alignleft size-medium wp-image-551" title="NOS Racing Game" src="/assets/NOS3.png" alt="NOS3 NOS Racing Game" width="150" height="150" /></a><a target="_blank" href="/assets/NOS4.png"><img class="alignnone size-thumbnail wp-image-555" title="NOS Racing Game" src="/assets/NOS4.png" alt="NOS4 NOS Racing Game" width="150" height="150" /></a></div>
<p>We were asked by our friends at Split Element to assist in the creation of a little racing game for NOS Energy Drink that would live inside a banner and on their Facebook page. Using Flash, we built a fun &#8230;</p>]]></description>
				<content:encoded><![CDATA[<div class="blog-imagelist" style="width: 340px;"><a target="_blank" href="/assets/NOS1.png"><img class="class=" title="NOS Racing Game" src="/assets/NOS1.png" alt="NOS1 NOS Racing Game" width="150" height="150" /></a><a target="_blank" href="/assets/NOS2.png"><img class="alignleft size-medium wp-image-550" title="NOS Racing Game" src="/assets/NOS2.png" alt="NOS2 NOS Racing Game" width="150" height="150" /></a><a target="_blank" href="/assets/NOS3.png"><img class="alignleft size-medium wp-image-551" title="NOS Racing Game" src="/assets/NOS3.png" alt="NOS3 NOS Racing Game" width="150" height="150" /></a><a target="_blank" href="/assets/NOS4.png"><img class="alignnone size-thumbnail wp-image-555" title="NOS Racing Game" src="/assets/NOS4.png" alt="NOS4 NOS Racing Game" width="150" height="150" /></a></div>
<p>We were asked by our friends at Split Element to assist in the creation of a little racing game for NOS Energy Drink that would live inside a banner and on their Facebook page. Using Flash, we built a fun little game where you can rip around the track in either a sports car or on a long board (skateboard).</p>
<p><strong>Client:</strong> <a target="_blank" title="NOS Energy Drink" href="http://www.drinknos.com/" target="_blank">NO Energy Drink</a><br />
<strong>Agency:</strong> <a target="_blank" title="Split Element Inc" href="http://splitelement.com/" target="_blank">Split Element Inc</a><br />
<strong>Technologies Implemented:</strong> Flash, ActionScript<br />
<strong>Our Role:</strong> All scripting related to the game.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/portfolio/07/03/2012/nos-racing-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starling Framework</title>
		<link>http://www.cultcreative.com/blog/06/16/2012/starling-framework/</link>
		<comments>http://www.cultcreative.com/blog/06/16/2012/starling-framework/#comments</comments>
		<pubDate>Sat, 16 Jun 2012 17:25:14 +0000</pubDate>
		<dc:creator>cultcreative</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[starling]]></category>

		<guid isPermaLink="false">http://www.cultcreative.com/?p=623</guid>
		<description><![CDATA[<p><a target="_blank" href="/assets/starling_framework.jpg"><img class="alignleft  wp-image-624" title="starling framework" src="/assets/starling_framework.jpg" alt="starling framework Starling Framework" width="410" height="153" /></a>We were recently asked to make an iPad app, we were told that there would be a website along-side it that required almost all the same functionality. Obviously we wanted the quickest solution to get both done and have them &#8230;</p>]]></description>
				<content:encoded><![CDATA[<p><a target="_blank" href="/assets/starling_framework.jpg"><img class="alignleft  wp-image-624" title="starling framework" src="/assets/starling_framework.jpg" alt="starling framework Starling Framework" width="410" height="153" /></a>We were recently asked to make an iPad app, we were told that there would be a website along-side it that required almost all the same functionality. Obviously we wanted the quickest solution to get both done and have them function similar to one and other. The first thing that we thought of was Unity, but that would require the site to either have a plugin or be built in some other technology. We kept brainstorming until we came across the newly released Starling Framework.</p>
<p>When we came across Starling and ran a couple tests as to the capabilities, we decided that it was a definitely option. Plus, building the iPad app in Flash meant that we would have a code-base that was already very compatible with the web and would require substantially less re-coding in order to get it active.</p>
<p>Once we started in Starling, it was amazing how much things have changed in the world of Flash for mobile. Animations were running smoothly, interaction responses were actually happening when you expected them to, and things looked very promising.</p>
<p>One thing to know about the way frameworks like Starling work is that they write to Air&#8217;s Stage3D. This means a LOT of bitmaps and bitmap data floating around that you need to make sure you clean up. Memory usage was the hardest hurdle to jump when it came to build a very graphics-heavy app for the iPad with Flash.</p>
<p>Overall, we had a great first experience with Starling. Shortly we will be publishing a tutorial or two with some tips and tricks that we learned along the way. Stay tuned.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cultcreative.com/blog/06/16/2012/starling-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
