<?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>ForTheLoss.org &#187; Game Release</title>
	<atom:link href="http://fortheloss.org/category/game-release/feed/" rel="self" type="application/rss+xml" />
	<link>http://fortheloss.org</link>
	<description>Ralph&#039;s Flash Game Dev Blog</description>
	<lastBuildDate>Mon, 30 Apr 2012 16:21:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>&#8220;Defective&#8221; Now on NewGrounds and Kongregate!</title>
		<link>http://fortheloss.org/defective-now-on-newgrounds-and-kongregate/</link>
		<comments>http://fortheloss.org/defective-now-on-newgrounds-and-kongregate/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 14:39:04 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Defective]]></category>
		<category><![CDATA[Game Release]]></category>
		<category><![CDATA[Game Updates]]></category>

		<guid isPermaLink="false">http://fortheloss.org/?p=655</guid>
		<description><![CDATA[Hey guys, a quick update on Defective.  As you know, last week it was released on ShootingGamesFree.org &#8211; the sponsor&#8217;s website.  After a week of exclusivity, you can now play the game on NewGrounds and Kongregate.  Go check it out and don&#8217;t forget to vote, please &#8211; it helps me out a lot! In other [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys, a quick update on Defective.  As you know, last week it was released on <a href="http://shootinggamesfree.org/defective">ShootingGamesFree.org</a> &#8211; the sponsor&#8217;s website.  After a week of exclusivity, you can now play the game on <a href="http://www.newgrounds.com/portal/view/592993">NewGrounds</a> and <a href="http://www.kongregate.com/games/FTLRalph/defective">Kongregate</a>.  Go check it out and don&#8217;t forget to vote, please &#8211; it helps me out a lot!</p>
<h3>In other news&#8230;</h3>
<p>So what have I <a href="http://fortheloss.org/images/shooter-ss.png"><img class="alignleft" title="Android Shooter" src="http://fortheloss.org/images/shooter-ss.png" alt="Android Shooter" width="240" height="400" /></a>been doing these past two weeks?  Nothing terribly exciting.  I have a really good grasp on programming games for Android using Eclipse/Java and Open GL ES 1.1.</p>
<p>As a result, I&#8217;ve been laying down the basic foundation for my first mobile game, which as of right now I intend to be a multi-directional space shooter, somewhat like <strong>Defective</strong>.  The main differences being the art-style, which will heavily resemble older 8-bit games, as well as the actual gameplay, which will be much simpler and share many elements with arcade games like <a href="http://en.wikipedia.org/wiki/Galaga">Galaga</a> and <a href="http://en.wikipedia.org/wiki/Bosconian">Bosconian</a>.</p>
<p>Right now I&#8217;m doing a lot of stress-testing and tweaking to get things to perform perfectly.  The art you see in the screenshot is temporary, and I only drew it up just to get away from all the placeholder squares I had moving around.  How similar the final game art will be to this art is still unknown.</p>
<p>Right now however, things look very promising.  On a mobile device, I have 1,000 alpha&#8217;d objects flying around, rotating and everything, at a solid 50+ fps &#8211; this with no optimizations at all (aka batching).  I&#8217;m really starting to love OpenGL &#8211; it makes me want to give Stage3D another chance now that I have a basic idea of how GPU-based programming works.</p>
]]></content:encoded>
			<wfw:commentRss>http://fortheloss.org/defective-now-on-newgrounds-and-kongregate/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>&#8220;Defective&#8221; is Released!</title>
		<link>http://fortheloss.org/defective-is-released/</link>
		<comments>http://fortheloss.org/defective-is-released/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 17:00:15 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Defective]]></category>
		<category><![CDATA[Game Release]]></category>

		<guid isPermaLink="false">http://fortheloss.org/?p=648</guid>
		<description><![CDATA[You don&#8217;t know how bad I wanted this post to be on April 1st, just for shits n&#8217; giggles, but hey, what are ya gonna do? But that&#8217;s right, Defective is finally out in the wild.  Go play it and tell me what you think. A big thanks to Andy over at ShootingGamesFree.org for sponsoring [...]]]></description>
			<content:encoded><![CDATA[<p>You don&#8217;t know how bad I wanted this post to be on April 1st, just for shits n&#8217; giggles, but hey, what are ya gonna do?</p>
<p style="text-align: center;"><a href="http://shootinggamesfree.org/defective"><img class="aligncenter" title="Defective Flash Game" src="http://fortheloss.org/images/defective_release_ss.gif" alt="Defective Flash Game" width="450" height="337" /></a></p>
<p>But that&#8217;s right, <strong>Defective</strong> is finally out in the wild.  Go play it and tell me what you think.</p>
<p>A big thanks to Andy over at <a href="http://shootinggamesfree.org">ShootingGamesFree.org</a> for sponsoring the game.  <strong>Defective</strong> will be exclusively hosted on his game site for the next few days before it&#8217;s available on sites like Newgrounds / Kongregate.</p>
<p>As most of you know, I started <strong>Defective</strong> <a href="http://fortheloss.org/weekly-game-update-defective-1/">back in May 2011</a> where it was a <a href="http://fortheloss.org/images/defective-enemies-completed.gif">completely different-looking game</a> for a <a href="http://fortheloss.org/images/defective-parts-3.gif">quite a while</a> (I even uploaded a few videos of me drawing the characters, <a href="http://www.youtube.com/watch?v=Z9gsImEUB3A">here&#8217;s one of them</a>).  Then, after I had <a href="http://fortheloss.org/hello-world/">my spine ripped out</a>, I completely scrapped it, <a href="http://fortheloss.org/weekly-game-update-defective-4/">started anew</a>, and<a href="http://fortheloss.org/weekly-game-update-defective-12/"> finished the project</a> somewhere around September 2011.  Here are a few of the selling points:</p>
<ul>
<li>12 levels of shoot-em-up action&#8230; <em>in space!</em></li>
<li>3 intense boss fights.</li>
<li>5 beautiful, <em>custom-made</em> music tracks just for this game!</li>
<li>Storyline with a beginning and ending cutscene.</li>
<li>5 different upgrade types to find, 2 in each level.</li>
<li>5 different enemy types, not including 4 smaller &#8220;minion&#8221; enemies and 2 &#8220;turret&#8221; enemies.</li>
<li>The player can transform into any of the main enemy types after destroying and absorbing 3 of their &#8220;souls.&#8221;</li>
<li>Particles, particles everywhere.</li>
<li>Achievements, who doesn&#8217;t like achievements?</li>
<li>Save / load functionality with 2 separate &#8220;save slots,&#8221; players can pick up from where they left off later!</li>
<li>Beautiful and polished graphics.</li>
</ul>
<p>Speaking of selling points, another shout-out to <a href="http://www.lunaticpandora.com/">Dave Fleming</a> for scoring all of the music in <strong>Defective</strong>.</p>
<p>Alright, that&#8217;s it, <a href="http://shootinggamesfree.org/defective">go play the game already</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fortheloss.org/defective-is-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increase Game Performance By Using Bitmaps</title>
		<link>http://fortheloss.org/increase-game-performance-by-using-bitmaps/</link>
		<comments>http://fortheloss.org/increase-game-performance-by-using-bitmaps/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 21:31:09 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Game Release]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://fortheloss.org/?p=424</guid>
		<description><![CDATA[Hey guys.  I&#8217;m going to try a new thing with this blog of mine.  Instead of just rambling on about my own game development news and whatnot, I figure I&#8217;ll also throw in a tutorial post every now and then.  Sound good?  Good. First, a little background.  This concept of using bitmaps instead of the [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys.  I&#8217;m going to try a new thing with this blog of mine.  Instead of just rambling on about my own game development news and whatnot, I figure I&#8217;ll also throw in a tutorial post every now and then.  Sound good?  Good.</p>
<p>First, a little background.  This concept of using bitmaps instead of the standard MovieClips that everyone is used to came to way back when I first began development on <strong>Don&#8217;t Panic</strong>.  I had run into a strange problem that I hadn&#8217;t encountered before in either <strong>Weapons on Wheels</strong>, <strong>Oil Spill Escape</strong>, or <strong>Christmas Defense</strong>.  The problem had to do with the game lagging up very badly when there were more than about 4 or 5 enemies on the screen.</p>
<p>After some help from the <a href="http://flashgamelicense.com">FlashGameLicense.com</a> forums, I realized the problem was the enemy MovieClips &#8211; the vector graphics for the enemies were just too detailed and thus the game was having a hard time rendering them every frame.  (Vector graphics are essentially just a bunch of math equations that the CPU has to process in order to draw the image on the screen &#8211; you could imagine how a bunch of detailed vector graphics could take a toll on your processor.)</p>
<p>Anyway, this is how I came across this method of handling my game art assets.  Ever since I&#8217;ve learned about it, I&#8217;ve used it for <strong>Don&#8217;t Panic</strong>, the late <strong>Hero Dude</strong>, and my current WIP &#8211; <strong>Defective</strong>.  This method isn&#8217;t exactly blitting (which is slightly more advanced and is another tutorial all together), but sort of a middle-ground between it and the traditional usage of MovieClips.  So, let&#8217;s get started, shall we?</p>
<h2>The Classes</h2>
<p>Alright, now, from here on out, I&#8217;m going to be showing you how I utilize this method.  Take from it what you will and use it however you want/need.</p>
<p>To begin, I create two classes:</p>
<ol>
<li><strong>BMPLoader.as</strong> &#8211; This class is what &#8220;loads&#8221; the BitmapData information from your MovieClips and stores it in memory.  (It essentially takes a MovieClip  and outputs a Bitmap of it.)</li>
<li><strong>BMPObject.as</strong> &#8211; This is what you will extend your game objects as.  For example:</li>
</ol>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:465px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span><br />
<span style="color: #000000;">&#123;</span><br />
<br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Player <span style="color: #0033ff; font-weight: bold;">extends</span> BMPObject<br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>So far, so good.  Now let&#8217;s get into what each class does.  Let&#8217;s begin with BMPLoader.</p>
<h2>BMPLoader.as</h2>
<p>Alright, this is the class where all of the magic happens, it&#8217;s not very difficult once you just look at what&#8217;s going on.  <em>(I&#8217;m just going to throw a disclaimer here that from this point on there may very well be optimizations and better ways to do what I&#8217;m trying to accomplish.  Feel free to experiment and change things to your needs or even comment on this post telling me what to change.)</em></p>
<p>Here&#8217;s the entire class, commented completely to help you understand it better.</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:465px;height:500px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #009900; font-style: italic;">// Imports for this class.</span><br />
<span style="color: #009900; font-style: italic;">// Nothing more to say really ;).</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span style="color: #004993;">BitmapData</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=displayobject%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:displayobject.html"><span style="color: #004993;">DisplayObject</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html"><span style="color: #004993;">MovieClip</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.geom</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=rectangle%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:rectangle.html"><span style="color: #004993;">Rectangle</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> BMPLoader<br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #009900; font-style: italic;">// This is an important part of this class.</span><br />
<span style="color: #009900; font-style: italic;">// Here is where I declare a Vector of type</span><br />
<span style="color: #009900; font-style: italic;">// BitmapData for EACH MovieClip that I will</span><br />
<span style="color: #009900; font-style: italic;">// be transforming into a Bitmap. So I'd have</span><br />
<span style="color: #009900; font-style: italic;">// one for Bullet, Coin, Enemy, etc. Here I</span><br />
<span style="color: #009900; font-style: italic;">// have one for the Player graphic, just for</span><br />
<span style="color: #009900; font-style: italic;">// this example. Also important - note how the</span><br />
<span style="color: #009900; font-style: italic;">// Vector is PUBLIC and not private.</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> vecPlayer<span style="color: #000066; font-weight: bold;">:</span>Vector<span style="color: #000066; font-weight: bold;">.&lt;</span>BitmapData<span style="color: #000066; font-weight: bold;">&gt;;</span><br />
<span style="color: #009900; font-style: italic;">// This class also needs a DisplayObject which</span><br />
<span style="color: #009900; font-style: italic;">// will act as the reference to the coordinate</span><br />
<span style="color: #009900; font-style: italic;">// space to use. This may sound confusing, just</span><br />
<span style="color: #009900; font-style: italic;">// use a reference to the Level, World, Stage -</span><br />
<span style="color: #009900; font-style: italic;">// whatever the &quot;global parent&quot; is.</span><br />
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> levelRef<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=displayobject%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:displayobject.html"><span style="color: #004993;">DisplayObject</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// The constructor doesn't do anything other than</span><br />
<span style="color: #009900; font-style: italic;">// assign the &quot;global parent&quot; variable a value. This</span><br />
<span style="color: #009900; font-style: italic;">// is important to do!</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> BMPLoader<span style="color: #000000;">&#40;</span>_levelRef<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=displayobject%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:displayobject.html"><span style="color: #004993;">DisplayObject</span></a><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
levelRef = _levelRef<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// This destroy() function is more of a personal thing</span><br />
<span style="color: #009900; font-style: italic;">// I add to each of my classes in order to clean up and</span><br />
<span style="color: #009900; font-style: italic;">// help for garbage disposal and the freeing of memory.</span><br />
<span style="color: #009900; font-style: italic;">// Think of it as the opposite of the constructor - the</span><br />
<span style="color: #009900; font-style: italic;">// destructor, it cleans up the objects and prepares it</span><br />
<span style="color: #009900; font-style: italic;">// for deletion. Here all I do is null all of the Vectors</span><br />
<span style="color: #009900; font-style: italic;">// I've created as well as my &quot;global parent&quot; reference.</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
vecPlayer = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">;</span><br />
levelRef = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// The load() function - here's where all of the magic happens.</span><br />
<span style="color: #009900; font-style: italic;">// This functions takes two parameters, a MovieClip (to transform</span><br />
<span style="color: #009900; font-style: italic;">// into BitmapData) and a String (which is the name of the Vector</span><br />
<span style="color: #009900; font-style: italic;">// in which we will store this BitmapData).</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span>mc<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html"><span style="color: #004993;">MovieClip</span></a><span style="color: #000066; font-weight: bold;">,</span> vecString<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #009900; font-style: italic;">// First check if the Vector is already populated, if so, skip</span><br />
<span style="color: #009900; font-style: italic;">// and don't bother. If the Vector is already populated, this means</span><br />
<span style="color: #009900; font-style: italic;">// that this MovieClip has already been loaded into memory before. Cool!</span><br />
<span style="color: #009900; font-style: italic;">// ---------------------------------------------------------------------</span><br />
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>vecString<span style="color: #000000;">&#93;</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Alright, so the Vector isn't already populated. Okay, so take the</span><br />
<span style="color: #009900; font-style: italic;">// Vector and initialize it.  Then, fill the Vector with the return</span><br />
<span style="color: #009900; font-style: italic;">// value of a new function, convertMCToBitmapData().</span><br />
<span style="color: #009900; font-style: italic;">// -------------------------------------------------</span><br />
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>vecString<span style="color: #000000;">&#93;</span> = <span style="color: #0033ff; font-weight: bold;">new</span> Vector<span style="color: #000066; font-weight: bold;">.&lt;</span>BitmapData<span style="color: #000066; font-weight: bold;">&gt;;</span><br />
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#91;</span>vecString<span style="color: #000000;">&#93;</span> = convertMCToBitmapData<span style="color: #000000;">&#40;</span>mc<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Alright. This is the function that manipulates the MovieClip into BitmapData.</span><br />
<span style="color: #009900; font-style: italic;">// It first takes the MovieClip and iterates through all of it's frames. While it</span><br />
<span style="color: #009900; font-style: italic;">// does this, the function takes notw of the maximum width and height of the</span><br />
<span style="color: #009900; font-style: italic;">// MovieClip. This maximum width and height is then used in the second part of</span><br />
<span style="color: #009900; font-style: italic;">// the function where BitmapData object is initialized (it requires a width/height</span><br />
<span style="color: #009900; font-style: italic;">// parameter). After this, the built-in draw() function is used to convert each</span><br />
<span style="color: #009900; font-style: italic;">// frame of the MovieClip into BitmapData. Finally, this BitmapData is pushed into</span><br />
<span style="color: #009900; font-style: italic;">// a Vector which is eventually returned as the result of this function.</span><br />
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> convertMCToBitmapData<span style="color: #000000;">&#40;</span>mc<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html"><span style="color: #004993;">MovieClip</span></a><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>Vector<span style="color: #000066; font-weight: bold;">.&lt;</span>BitmapData<span style="color: #000066; font-weight: bold;">&gt;</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #009900; font-style: italic;">// Initialize variables we'll need for this function.</span><br />
<span style="color: #009900; font-style: italic;">// Not much to go into here, as we'll see these all later.</span><br />
<span style="color: #009900; font-style: italic;">// -------------------------------------------------------</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> curFrame<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> maxWidth<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> maxHeight<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> boundsWidth<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> boundsHeight<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> bmpData<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span style="color: #004993;">BitmapData</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> vec<span style="color: #000066; font-weight: bold;">:</span>Vector<span style="color: #000066; font-weight: bold;">.&lt;</span>BitmapData<span style="color: #000066; font-weight: bold;">&gt;;</span><br />
vec = <span style="color: #0033ff; font-weight: bold;">new</span> Vector<span style="color: #000066; font-weight: bold;">.&lt;</span>BitmapData<span style="color: #000066; font-weight: bold;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Alright, first part of this function.  Time to get the</span><br />
<span style="color: #009900; font-style: italic;">// maximum width and height of the MovieClip. Using a while</span><br />
<span style="color: #009900; font-style: italic;">// loop, we will iterate through each frame of the MovieClip,</span><br />
<span style="color: #009900; font-style: italic;">// noting the maximum width/height we come across. (This is</span><br />
<span style="color: #009900; font-style: italic;">// where that &quot;global parent&quot; reference is used, since the</span><br />
<span style="color: #009900; font-style: italic;">// getBounds() function requires it.</span><br />
<span style="color: #009900; font-style: italic;">// ---------------------------------</span><br />
<span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span>curFrame <span style="color: #000066; font-weight: bold;">&lt;</span>= mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">totalFrames</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">gotoAndStop</span><span style="color: #000000;">&#40;</span>curFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
boundsWidth = mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getBounds</span><span style="color: #000000;">&#40;</span>levelRef<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">;</span><br />
boundsHeight = mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getBounds</span><span style="color: #000000;">&#40;</span>levelRef<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>boundsWidth <span style="color: #000066; font-weight: bold;">&gt;</span> maxWidth<span style="color: #000000;">&#41;</span> maxWidth = boundsWidth<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>boundsHeight <span style="color: #000066; font-weight: bold;">&gt;</span> maxHeight<span style="color: #000000;">&#41;</span> maxHeight = boundsHeight<span style="color: #000066; font-weight: bold;">;</span><br />
curFrame<span style="color: #000066; font-weight: bold;">++;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Now that we have the maximum width/height stored appropriately</span><br />
<span style="color: #009900; font-style: italic;">// inside of maxWidth and maxHeight, it's time to move onto the next</span><br />
<span style="color: #009900; font-style: italic;">// part. Here we are once again using a while loop to iterate through</span><br />
<span style="color: #009900; font-style: italic;">// each frame in order to translate each frame of the MovieClip into</span><br />
<span style="color: #009900; font-style: italic;">// BitmapData using the draw() function.</span><br />
<span style="color: #009900; font-style: italic;">// -------------------------------------</span><br />
curFrame = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">while</span> <span style="color: #000000;">&#40;</span>curFrame <span style="color: #000066; font-weight: bold;">&lt;</span>= mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">totalFrames</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">gotoAndStop</span><span style="color: #000000;">&#40;</span>curFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
bmpData = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span style="color: #004993;">BitmapData</span></a><span style="color: #000000;">&#40;</span>maxWidth<span style="color: #000066; font-weight: bold;">,</span> maxHeight<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> 0x00000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
bmpData<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span>mc<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
vec<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>bmpData<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
curFrame<span style="color: #000066; font-weight: bold;">++;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Finally, return the Vector of BitmapData.</span><br />
<span style="color: #009900; font-style: italic;">// -----------------------------------------</span><br />
<span style="color: #0033ff; font-weight: bold;">return</span> vec<span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Now let&#8217;s move on to the next class, BMPObject.</p>
<h2>BMPObject.as</h2>
<p>This class will be extended from all of your game objects that will be utilizing Bitmaps instead of traditional MovieClips.  So, for example, the Player class, Bullet class, etc.  The real purpose of this class is to make it easy for you to assign a Vector of BitmapData from the BMPLoader class (above) to a particular object as well as make it easy for you to iterate through said Vector to animate the Bitmap &#8211; just as if it were a MovieClip.  Here&#8217;s the entire class &#8211; again fully commented.</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:465px;height:500px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #9900cc; font-weight: bold;">package</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #009900; font-style: italic;">// Imports for this class.</span><br />
<span style="color: #009900; font-style: italic;">// Nothing more to say really ;).</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span style="color: #004993;">Bitmap</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=bitmapdata%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmapdata.html"><span style="color: #004993;">BitmapData</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=movieclip%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:movieclip.html"><span style="color: #004993;">MovieClip</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> BMPObject <span style="color: #0033ff; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=sprite%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:sprite.html"><span style="color: #004993;">Sprite</span></a><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #009900; font-style: italic;">// Here are the properties of this class. Note how</span><br />
<span style="color: #009900; font-style: italic;">// they're all PROTECTED - this is important. The Vector</span><br />
<span style="color: #009900; font-style: italic;">// &quot;vecMyBitmap&quot; will reference a Vector in the BMPLoader</span><br />
<span style="color: #009900; font-style: italic;">// class and will hold the BitmapData of this object.  The</span><br />
<span style="color: #009900; font-style: italic;">// &quot;bmp&quot; variable will be the Bitmap - the actual &quot;face&quot; of</span><br />
<span style="color: #009900; font-style: italic;">// this object. Finally, the last variable, &quot;bmpFrame,&quot; simply</span><br />
<span style="color: #009900; font-style: italic;">// stores the current position in the vector (used for animation).</span><br />
<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #6699cc; font-weight: bold;">var</span> vecMyBitmap<span style="color: #000066; font-weight: bold;">:</span>Vector<span style="color: #000066; font-weight: bold;">.&lt;</span>BitmapData<span style="color: #000066; font-weight: bold;">&gt;;</span><br />
<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmp<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span style="color: #004993;">Bitmap</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #6699cc; font-weight: bold;">var</span> bmpFrame<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=int%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:int.html"><span style="color: #004993;">int</span></a> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// The constructor does nothing.</span><br />
<span style="color: #009900; font-style: italic;">// Very simple, no?</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> BMPObject<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Again, the destroy() function, just a personal</span><br />
<span style="color: #009900; font-style: italic;">// preference of mine to help with garbage disposal</span><br />
<span style="color: #009900; font-style: italic;">// and the freeing of memory. Here I just remove the</span><br />
<span style="color: #009900; font-style: italic;">// Bitmap and null the Vector and Bitmap.</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> destroy<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
vecMyBitmap = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>bmp<span style="color: #000000;">&#41;</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #004993;">removeChild</span><span style="color: #000000;">&#40;</span>bmp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
bmp = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// The setupBitmap() function is called to, well, setup</span><br />
<span style="color: #009900; font-style: italic;">// the Bitmap for this object. It takes the first value in</span><br />
<span style="color: #009900; font-style: italic;">// the Vector of BitmapData and creates a Bitmap out of it.</span><br />
<span style="color: #009900; font-style: italic;">// The Bitmap is then added as a child to this object and then</span><br />
<span style="color: #009900; font-style: italic;">// moved so it is centered properly.</span><br />
<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> setupBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
bmp = <span style="color: #0033ff; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=bitmap%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:bitmap.html"><span style="color: #004993;">Bitmap</span></a><span style="color: #000000;">&#40;</span>vecMyBitmap<span style="color: #000000;">&#91;</span>bmpFrame<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bmp<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000066; font-weight: bold;">-</span>bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">0.5</span><span style="color: #000066; font-weight: bold;">;</span><br />
bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000066; font-weight: bold;">-</span>bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> <span style="color: #000066; font-weight: bold;">*</span> <span style="color: #000000; font-weight:bold;">0.5</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// The animateBitmap() function, well... take a guess what</span><br />
<span style="color: #009900; font-style: italic;">// it does. It animates the Bitmap by iterating through the</span><br />
<span style="color: #009900; font-style: italic;">// &quot;frames&quot; of the Vector (and loops to the beginning when it</span><br />
<span style="color: #009900; font-style: italic;">// reaches the end.</span><br />
<span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> animateBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span><br />
<span style="color: #000000;">&#123;</span><br />
<span style="color: #009900; font-style: italic;">// Move position along in the vector.</span><br />
<span style="color: #009900; font-style: italic;">// ----------------------------------</span><br />
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>bmpFrame <span style="color: #000066; font-weight: bold;">&lt;</span> vecMyBitmap<span style="color: #000066; font-weight: bold;">.</span>length<span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> bmpFrame<span style="color: #000066; font-weight: bold;">++;</span><br />
<span style="color: #0033ff; font-weight: bold;">else</span> bmpFrame = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #009900; font-style: italic;">// Change bitmapData of bitmap.</span><br />
<span style="color: #009900; font-style: italic;">// -----------------------------</span><br />
bmp<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">bitmapData</span> = vecMyBitmap<span style="color: #000000;">&#91;</span>bmpFrame<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #000000;">&#125;</span><br />
<br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Still with me here?  Good, because we&#8217;re pretty much done at this point, now we just get to use the two classes we&#8217;ve created!</p>
<h2>How to use these classes</h2>
<p>Alright, now we get to the good part.  How do you use these classes?  It&#8217;s simple, really.</p>
<p>First, you obviously need to initialize the BMPLoader class.  I typically do this in the parent of all of my game objects, typically the Level object or something.</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:465px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bmpLoader = <span style="color: #0033ff; font-weight: bold;">new</span> BMPLoader<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>Then just place this code in the constructor (or init() or whatever) function of your game object (your Player, Bullet, Coin, etc):</p>
<div class="codecolorer-container actionscript3 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:465px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bmpLoader<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> PlayerSkin<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;vecPlayer&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// Obviously change these to your needs.</span><br />
vecMyBitmap = bmpLoader<span style="color: #000066; font-weight: bold;">.</span>vecPlayer<span style="color: #000066; font-weight: bold;">;</span><br />
setupBitmap<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>As the comment says in the code, obviously change <strong>new PlayerSkin()</strong> to the MovieClip you wish to turn into BitmapData and <strong>vecPlayer</strong> to the name of the Vector inside of BMPLoader in which to store said BitmapData.</p>
<p>Then, in your game object&#8217;s loop function, you can simply call the animateBitmap() function and the BMPObject class will animate your object just as if it were a MovieClip. Neat, huh?</p>
<h2>Conclusion</h2>
<p>Now, there are three major things you must remember by utilizing this method:</p>
<ol>
<li>In order to be able to convert a MovieClip into BitmapData &#8211; the MovieClip&#8217;s registration point must be set to (0,0).  To avoid clipping, your MovieClip art must at no point in any of it&#8217;s frames extend less than the x = 0 or y = 0 point.  If it does, the BMPLoader class will produce a Bitmap of your MovieClip which is clipped (and not very pretty-looking).</li>
<li>Be aware to not attempt to populate a Vector in the BMPLoader that doesn&#8217;t exist or you&#8217;ll obviously get an error.  For example, doing <strong>bmpLoader.load(new PlayerSkin(), &#8220;vecPlayer&#8221;);</strong> and not having a <strong>vecPlayer</strong> object in BMPLoader will cause you some problems.</li>
<li>Since your game will no longer be using crisp-looking vector-based graphics, you may encounter times in your game where your art doesn&#8217;t look as good as it does in the Flash IDE when you were drawing it.  This is normal, since you&#8217;re now using Bitmaps. Your art will look perfectly fine as long as you don&#8217;t zoom in or rotate it during gameplay.  I&#8217;m not saying you can&#8217;t do those things, but if you do the art will become slightly jagged-looking.  Not necessarily ugly (unless you zoom in 100x&#8217;s or something), but it&#8217;ll be noticeable.</li>
</ol>
<p>Alright, I think I&#8217;m done here. I hope if you found this article by Googling a problem you&#8217;ve been having that it&#8217;s helped you out.  If not, tough noogies.  Well, either that or leave a comment and I&#8217;ll see if I can help <img src='http://fortheloss.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>I&#8217;ve been writing this post for two hours now.  That&#8217;s insane (for me).  Excuse me while I go rest my back and watch some TV before dinner.</p>
<p><strong>PS &#8211; Today&#8217;s the 1 month anniversary of my <a href="http://fortheloss.org/hello-world/">back surgery</a>.  Pretty cool, huh?</strong></p>
<p><strong>PPS &#8211; First Weekly Game Update in a long time scheduled for tomorrow.  Pretty cool, huh?</strong></p>
<p><strong>PPPS &#8211; Pretty cool, huh?</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://fortheloss.org/increase-game-performance-by-using-bitmaps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Panic Released!</title>
		<link>http://fortheloss.org/dont-panic-released/</link>
		<comments>http://fortheloss.org/dont-panic-released/#comments</comments>
		<pubDate>Fri, 06 May 2011 18:49:03 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Don't Panic]]></category>
		<category><![CDATA[Game Release]]></category>

		<guid isPermaLink="false">http://fortheloss.org/?p=344</guid>
		<description><![CDATA[No, really.  I&#8217;m not lying this time.  I know over 90% of you are probably sick of hearing me talk about it for the past 3-4 months, so just go play it already. Play Don&#8217;t Panic on ArmorGames Big thanks to Dan and ArmorGames in general for sponsoring my game, I&#8217;m very honored to have [...]]]></description>
			<content:encoded><![CDATA[<p>No, really.  I&#8217;m not lying this time.  I know over 90% of you are probably sick of hearing me talk about it for the past 3-4 months, so just go play it already.</p>
<p><a href="http://armorgames.com/play/11366/dont-panic">Play Don&#8217;t Panic on ArmorGames</a></p>
<p>Big thanks to Dan and ArmorGames in general for sponsoring my game, I&#8217;m very honored to have such a big site be interrested in one of my games.</p>
<p>Feeling generous?  Don&#8217;t forget to vote it up!</p>
<p>I&#8217;d post more, but I&#8217;m in the middle of doing other nonsense.  WHAT IRONY.</p>
]]></content:encoded>
			<wfw:commentRss>http://fortheloss.org/dont-panic-released/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Christmas Defense Released!</title>
		<link>http://fortheloss.org/christmas-defense-released/</link>
		<comments>http://fortheloss.org/christmas-defense-released/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 20:19:14 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Christmas Defense]]></category>
		<category><![CDATA[Game Release]]></category>

		<guid isPermaLink="false">http://fortheloss.org/?p=182</guid>
		<description><![CDATA[Hey guys.  I just wanted to make a quick update that  Christmas Defense was released today. Play it on NewGrounds.com. Play it on Kongregate.com. Don&#8217;t forget to rate it!  I appreciate it. I want to give a big thanks to the site Coolbuddy.com for sponsoring the game.  Without any sponsors, odds are I wouldn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys.  I just wanted to make a quick update that  Christmas Defense was released today.</p>
<p><a href="http://www.newgrounds.com/portal/view/555782">Play it on NewGrounds.com</a>.</p>
<p><a href="http://www.kongregate.com/games/FTLRalph/christmas-defense">Play it on Kongregate.com</a>.</p>
<p><strong>Don&#8217;t forget to rate it!  I appreciate it.</strong></p>
<p>I want to give a big thanks to the site <a href="http://coolbuddy.com">Coolbuddy.com</a> for sponsoring the game.  Without any sponsors, odds are I wouldn&#8217;t have the time to make games like this.</p>
<p>I&#8217;ll update this post when the game is released on Kongregate and ArmorGames as well.</p>
<p>Go play it and tell me what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://fortheloss.org/christmas-defense-released/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>&#8220;Oil Spill Escape&#8221; Released &#8211; Go Play it Now!</title>
		<link>http://fortheloss.org/oil-spill-escape-released-go-play-it-now/</link>
		<comments>http://fortheloss.org/oil-spill-escape-released-go-play-it-now/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 15:22:46 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Game Release]]></category>
		<category><![CDATA[Game Updates]]></category>
		<category><![CDATA[Oil Spill Escape]]></category>

		<guid isPermaLink="false">http://fortheloss.org/?p=139</guid>
		<description><![CDATA[&#8220;Oil Spill Escape&#8221; (aka my Secret Project for the past four weeks) has been released this morning!  I&#8217;m really excited about this game because it truly is a very fun and addicting game. Play it exclusively on Juggernart.com &#8211; Play Oil Spill Escape. I actually completed the game in about 12 days, which is quite [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Oil Spill Escape" src="http://fortheloss.org/images/thumb180x135.png" alt="" width="180" height="135" />&#8220;Oil Spill Escape&#8221; (aka my Secret Project for the past four weeks) has been released this morning!  I&#8217;m really excited about this game because it truly is a very fun and addicting game.</p>
<p><strong>Play it exclusively on Juggernart.com &#8211; <a href="http://www.juggernart.com/games/free-online-fishing/oil-spill-escape.html">Play Oil Spill Escape</a>.</strong></p>
<p>I actually completed the game in about 12 days, which is quite speedy for only my second game ever.  The remaining 14+ days was spent just letting the game chill on <a href="http://flashgamelicense.com">FlashGameLicense.com</a> waiting for a sponsor.</p>
<p>Bla bla bla, I&#8217;m sure you all care about that stuff, right?</p>
<p>Anyway, maybe I should tell you what the game is about.  (As if you can&#8217;t tell from the title.)</p>
<p>The idea for this game was actually a result of some accidental collaboration between <span style="text-decoration: line-through;">this person I know</span> friend Paul D&#8217;Amora.  You might know him as since he&#8217;s one of the three commenters on this site.</p>
<p>The game is obviously inspired from the ongoing oil spill in the Gulf of Mexico.  The gameplay itself is very similar to that of the classic &#8220;<a href="http://www.addictinggames.com/helicopter.html">Helicopter Game</a>&#8220;.  As in, you control a fish trying to escape a cloud of oil by dodging rocks and eating fish.  Sound easy?  Well, it&#8217;s not.</p>
<p>The objective is to simply get as far as you possibly can and then to compare your score with the scores on the scoreboard.  This is where it gets addicting, trust me.</p>
<p>Anyway, I do believe that&#8217;s enough rambling from me.  Go <a href="http://www.juggernart.com/games/free-online-fishing/oil-spill-escape.html">play the game</a> and tell me how you like it!</p>
]]></content:encoded>
			<wfw:commentRss>http://fortheloss.org/oil-spill-escape-released-go-play-it-now/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weapons on Wheels Done and Released and Stuff</title>
		<link>http://fortheloss.org/weapons-on-wheels-done-and-released-and-stuff/</link>
		<comments>http://fortheloss.org/weapons-on-wheels-done-and-released-and-stuff/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 22:42:35 +0000</pubDate>
		<dc:creator>Ralph</dc:creator>
				<category><![CDATA[Game Release]]></category>
		<category><![CDATA[Game Updates]]></category>
		<category><![CDATA[Weapons on Wheels]]></category>

		<guid isPermaLink="false">http://fortheloss.org/?p=117</guid>
		<description><![CDATA[So that was one hell of a journey.  Granted, with Weapons on Wheels being the first real game I&#8217;ve ever developed, I probably did alot of things the long and hard (twss) way. Play it on MaxGames.com, who is the awesome sponsor. Update: Also play it on NewGrounds and vote 5 to be awesome. Update [...]]]></description>
			<content:encoded><![CDATA[<p>So that was one hell of a journey.  Granted, with Weapons on Wheels being the first real game I&#8217;ve ever developed, I probably did alot of things the long and hard (twss) way.</p>
<p><a href="http://www.maxgames.com/game/weapons-on-wheels.html">Play it on MaxGames.com</a>, who is the awesome sponsor.</p>
<p><em>Update: Also <a href="http://www.newgrounds.com/portal/view/539647">play it on NewGrounds</a> and vote 5 to be awesome.</em></p>
<p><em>Update 2: <a href="http://www.kongregate.com/games/FTLRalph/weapons-on-wheels">Play it on Kongregate</a> and  5-star it to be even awesomer.</em></p>
<p>So that&#8217;s it.  Go try it out and tell me how disappointed you are in the comments!</p>
<p>In all seriousness, though, I learned alot when developing that game.  Both in terms of code-stuff and in terms of what makes a game fun.  I&#8217;ll be using all that knowledge as I develop Hero Dude, which will hopefully only take me a fraction of the time it took me to make Weapons on Wheels.</p>
<p>Protip &#8211; don&#8217;t go directly behind the blue car.</p>
]]></content:encoded>
			<wfw:commentRss>http://fortheloss.org/weapons-on-wheels-done-and-released-and-stuff/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
	</channel>
</rss>

