<?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>MochiLand &#187; Developer Spotlight</title>
	<atom:link href="http://mochiland.com/category/mochiland/developer-spotlight/feed" rel="self" type="application/rss+xml" />
	<link>http://mochiland.com</link>
	<description>for(developer in flash_games){ this.mochiland = _root }</description>
	<lastBuildDate>Sat, 04 Feb 2012 02:03:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Flash Game Friday Winner: Catnarok 2: Longcat Rampage</title>
		<link>http://mochiland.com/articles/flash-game-friday-winner-catnarok-2-longcat-rampage</link>
		<comments>http://mochiland.com/articles/flash-game-friday-winner-catnarok-2-longcat-rampage#comments</comments>
		<pubDate>Sat, 04 Feb 2012 01:30:24 +0000</pubDate>
		<dc:creator>Colin Cupp</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Flash Game Friday]]></category>
		<category><![CDATA[Game Showcase]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Publisher Feed]]></category>
		<category><![CDATA[Antoine Litzler]]></category>
		<category><![CDATA[Catnarok 2: Longcat Rampage]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[winner]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=6174</guid>
		<description><![CDATA[Winner&#8217;s Circle This week&#8217;s Flash Game Friday winner is Catnarok 2: Longcat Rampage by Antoine Litzler! If you are an internet geek, you&#8217;ll love this game. Memes and parody abound as Antoine manages to pull in countless familiar characters into one hilarious game! You are the longcat, and you are definitely on a rampage. You [...]]]></description>
			<content:encoded><![CDATA[ <h1>Winner&#8217;s Circle</h1>
<p>This week&#8217;s Flash Game Friday winner is <a href="http://www.mochimedia.com/games/play/catnarok-2-longcat-rampage">Catnarok 2: Longcat Rampage</a> by <a href="https://www.mochimedia.com/community/profile/Hyakkidouran">Antoine Litzler</a>!</p>
<p><a href="http://www.mochimedia.com/games/play/catnarok-2-longcat-rampage"><img class="alignleft size-full wp-image-6185" style="border: 0px;" title="Catnarok 2" src="http://mochiland.com/wp-content/uploads/2012/01/Catnarok-2.jpg" alt="" width="560" height="280" /></a><br />
If you are an internet geek, you&#8217;ll love this game. Memes and parody abound as Antoine manages to pull in countless familiar characters into one hilarious game!</p>
<p>You are the longcat, and you are definitely on a rampage. You shoot fire and even lasers from your eyes at incoming enemies. As you progress, more and more familiar memes are revealed. Antoine added a directory of the characters he used in his games, and their origins (giving proper credit).</p>
<p>Catnarok 2: Longcat Rampage, in movie terms, would be referred to as &#8220;An irreverent good time&#8221;- congratulations on winning Flash Game Friday, Antoine!</p>
<h2>Get to Know Antoine Litzler</h2>
<h4>Tell me about yourself- how many people are on your team? Where are you based?</h4>
<p>My name is Antoine Litzler, but you might know me as my fancy online name &#8220;Hyakkidouran&#8221;, which is probably the only thing close to cool I will ever get. I am a froggie and am based in Frogland (some call it France).</p>
<p>This might be dissapointing to some people, but I am not much more than a bedroom programmer working alone. I wish I could say I have a dynamic and great team I am working with, but life has not put other crazies like me on my way yet (or a pile of gold to hire crazies), so I have to make do with my own hands.</p>
<h4>How long have you been making games? What did you do before?</h4>
<p>I think I started about 5 years ago with (what else?) a dress up game. But, even though my games got more complex, this always has been amateur or semi-pro (if that word even has a meaning) work, as I could not make enough money to consider quitting a regular job. Even today, I still have my day job as a computer developer/administrator for a huge cultural association.</p>
<p>I am probably not being original by saying that being able to live from making what I do on my own would be awesome. But I still have to thank my day job for providing me with food and licenses for Photoshop and Flash CS until now. Without this food and software, I would not be making games..</p>
<h4>What was your inspiration for &#8220;Catnarok 2: Longcat Rampage&#8221;?</h4>
<p>Wasn&#8217;t it obvious? Memes.</p>
<p>Internet memes are very diverse and range from being really funny to being pure crap. I really like the older memes in particular, like &#8220;Longcat&#8221; or &#8220;All your base are belong to us&#8221;, which spawned pretty funny and interesting content.</p>
<p>But now it seems that young teenagers attempt to artificially create memes for the sake of &#8220;internet fame&#8221;, which usually results in crap. The good memes were usually born from a natural selection process of something that is actually funny, and that was how it worked in the early 2000&#8242;s.</p>
<p>The idea of the game was to adapt the &#8220;internet legend&#8221; of Longcat, while giving the opportunity to kill some bad memes.</p>
<p>The first Catnarok was kind of a prototype for that idea. When I saw that the prototype did fairly well despite its simplicity, I decided it was worth it to invest the time to get closer to my original vision.</p>
<h4>Any major challenges or hurdles during development?</h4>
<p>&#8230;Everything?</p>
<p>Joke aside, I think the hardest was that I had to stop the project for extended periods of time as my job or other IRL things pulled my leg. Coming back to the code after 1 month of not writing anything was a nightmare.</p>
<p>I also was pretty scared of the potential copyright issues.</p>
<p>Since there are sites out there which make money from referencing memes, I figured that, if I traced/redrew over the meme pictures, I would probably be fine (and I probably am since mochi approved the game), but I admit this worried me through all the development. I was scared that all that work would go for naught if some guy came and said &#8220;sorry, this parody, that is like the over 9000 there already are, is copyright infringement because it is more visible than the others&#8221;. ?_-</p>
<p>I also can&#8217;t do music, meaning I have to rely on the generosity of people online for it (usually throught people on Newgrounds audio portal or classic public domain music). All this creates kind of a legal mess that I am pretty scared of and it might be the greatest obstacle there is to moving to actual commercial game development.</p>
<p>Fair use is a blurry line, and it seems I did not cross it on that particular project, at least to the eyes of the users&#8230;this is quite a relief.</p>
<h4>What types of games do you like to create the most? What types of games do you like to play the most?</h4>
<p>Being a bedroom programmer, I have to create games I can grasp entirely on my own.</p>
<p>This is why I create usually shoot-them-ups or puzzle games. Those are simple enough for my monkey brain.</p>
<p>I have little interest in studying 3D because I think it is out of my reach (for now?), plus I am actually quite the japanese anime fan, and I really love the way 2D looks and feels.</p>
<p>Considering this, you will not be surprised to hear that I am a great fan of Japanese 2D fighters like Guilty Gear, Blazblue or Arcana Heart. In general, I can enjoy anything with good 2D graphics, unless the gameplay really sucks.</p>
<p>I am also quite the fan of Starcraft and Deus Ex. And I also have some very obscure games that I have been loving since 20 years and still play sometimes, like &#8220;Ristar&#8221; or &#8220;Zoom!&#8221; .</p>
<h4>How long is your game creation cycle? What is your process?</h4>
<p>I am that kind of person who usually has 20 funny and unrealistic ideas per minute, so the main part of the process is to filter those ideas by wondering &#8220;what can I, with my skill and time currently at hand, actually do?&#8221;. Once I can envision an idea that is simple enough to code, but still feels like it will be fun despite my limited ressources, I start working on it.</p>
<p>After that, it usually becomes pretty chaotic, since I am forced to code and draw when I can, with sometimes huge periods during which I can&#8217;t do anything on the game. Talking about a &#8220;process&#8221; would be complimenting this mess really.</p>
<h4>Are there any game developers that you admire or consider &#8220;rock stars&#8221;?</h4>
<p>Daisuke Ishiwatari, who is litterally a developer AND a rock star.</p>
<p>I am also quite a fan of the early work of Peter Molyneux on the PC, before he started doing this Fable-RPG thing. Even though I don&#8217;t play his games as regularily as the ones I quoted earlier, all of them are really good, intriguing games that qualify as &#8220;unique experiences&#8221;.</p>
<p>I also admire all indie developers. Period. I realized how much it takes balls to do games, and everyone taking this risk without stable financing deserves respect.</p>
<h4>What is it about making a new game that you enjoy most?</h4>
<p>Hard to tell. What is certain is that the moment your prototype runs well enough, allowing you to play the game from start to finish, do feel really special. The polishing and balancing that comes after that is actually way more tedious (but unfortunately necessary).</p>
<h4>Do you have any hot projects you&#8217;re working on right now?</h4>
<p>Do I! I virtually have a pile of projects waiting that I can&#8217;t wait to recede.</p>
<p>I think that the hottest news is that I have been working on creating a completely original license, based on my love for anime. I took a few clues from Mochi&#8217;s very own Mr. Shen, and thought it would be a great idea to have a cross-media character that I could use for games, comics, or virtually anything I want.</p>
<p>This character is &#8220;Serina, the star guardian&#8221;, a character heavily influenced by the magical girl genre, but with a bunch of personnal twists that hopefully will make her unique. Besides expressing my anime love, I am also creating this character for the sake of all the kids in my family, which makes this project even more stimulating and interesting.</p>
<p>Overall, I have great hopes for the future, and maybe this feature of Catnarok 2 will contribute to that extra boost I need to start my own thing into full steam. And if it&#8217;s not&#8230; well, I am ready to keep doing my dirty things in my bedroom at night. :)</p>
<p>&nbsp;</p>
<p><em><strong>Thanks Antoine, and congratulations again on winning Flash Game Friday!</strong></em></p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Colin Cupp for <a href="http://mochiland.com">MochiLand</a>, 2012. |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-catnarok-2-longcat-rampage">Permalink</a> |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-catnarok-2-longcat-rampage#comments">3 comments</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/flash-game-friday-winner-catnarok-2-longcat-rampage&amp;title=Flash Game Friday Winner: Catnarok 2: Longcat Rampage">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/flash-game-friday-winner-catnarok-2-longcat-rampage" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/flash-game-friday" title="View all posts in Flash Game Friday" rel="category tag">Flash Game Friday</a>, <a href="http://mochiland.com/category/mochiland/featured-games" title="View all posts in Game Showcase" rel="category tag">Game Showcase</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/publisher-feed" title="View all posts in Publisher Feed" rel="category tag">Publisher Feed</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/flash-game-friday-winner-catnarok-2-longcat-rampage/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash Game Friday Winner: Greens Survive Only When Reds Die</title>
		<link>http://mochiland.com/articles/flash-game-friday-winner-greens-survive-only-when-reds-die</link>
		<comments>http://mochiland.com/articles/flash-game-friday-winner-greens-survive-only-when-reds-die#comments</comments>
		<pubDate>Sat, 28 Jan 2012 00:24:08 +0000</pubDate>
		<dc:creator>Colin Cupp</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Flash Game Friday]]></category>
		<category><![CDATA[Game Showcase]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Publisher Feed]]></category>
		<category><![CDATA[Greens Survive Only When Reds Die]]></category>
		<category><![CDATA[Mochi Media]]></category>
		<category><![CDATA[Oleksii Zagorodnii]]></category>
		<category><![CDATA[winner]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=6176</guid>
		<description><![CDATA[Winner&#8217;s Circle This week&#8217;s Flash Game Friday winner is Greens Survive Only When Reds Die by Oleksii Zagorodnii! You have to love a game with instructions in the title, and this title pretty much says it all- Greens Survive Only When Reds Die! The object is to get the green guy through the door. Problem [...]]]></description>
			<content:encoded><![CDATA[ <h1>Winner&#8217;s Circle</h1>
<p>This week&#8217;s Flash Game Friday winner is <a href="http://www.mochimedia.com/games/play/greens-survive-only-when-reds-die">Greens Survive Only When Reds Die</a> by <a href="http://www.friedpixel.com/">Oleksii Zagorodnii</a>!<br />
<a href="http://www.mochimedia.com/games/play/greens-survive-only-when-reds-die"><img class="alignleft size-full wp-image-6178" style="border: 0px;" title="Greens Survive Only When Reds Die" src="http://mochiland.com/wp-content/uploads/2012/01/Greens-Survive-Only-When-Reds-Die.png" alt="" width="560" height="280" /></a><br />
You have to love a game with instructions in the title, and this title pretty much says it all- Greens Survive Only When Reds Die!</p>
<p>The object is to get the green guy through the door. Problem is, you have to make sure to kill the red guys in order to get the door open&#8230;without killing the green guy, of course!</p>
<p>Greens Survive Only When Reds Die is a great platformer witha unique gameplay twist- congratulations Oleksii!</p>
<h2>Get To Know Oleksii Zagorodnii</h2>
<h4>Tell me about yourself- how many people are on your team? Where are you based?</h4>
<p>There is one person in my team, this is me :). I live in Kyiv, Ukraine. I do programming and art by myself, but I know nothing about writing music, so the music for most of my games is created by Alexander Ahura. He is a really great composer and I&#8217;m happy to work with him.</p>
<h4>How long have you been making games? What did you do before?</h4>
<p>I&#8217;ve been making (actually, trying to make) games since I was in school. Back in those days I used Game Maker and then BlitzMax, but never actually finishing anything. I completed my first Flash game in the summer of 2010, and since then I have created six more games, all of which can be found at my site: <a href="http://www.friedpixel.com/">friedpixel.com</a>.</p>
<h4>What was your inspiration for &#8220;Greens Survive Only When Reds Die&#8221;?</h4>
<p>I really love platform games and wanted to create something original and fun in this genre. The idea of playing with lots of characters at the same time looked promising. However, I saw a few released games where players controlled several characters simultaneously, so I decided to add a twist, and make some of these controlled characters &#8216;bad&#8217;, setting a task for players to kill them.</p>
<h4>Any major challenges or hurdles during development?</h4>
<p>The main challenge for me is my laziness. I&#8217;m not a full-time game developer. I have a dayjob and sometimes it&#8217;s very difficult to start working on a game, especially when the prototype and all of the experiments are done and there are lots of things and polishing to be done to complete the final version.</p>
<h4>What types of games do you like to create the most? What types of games do you like to play the most?</h4>
<p>I love to create different arcade and platform games. I also enjoy playing platform games in Flash and on mobile devices the most. Sometimes I also play some big AAA games on XBox, the last were Gears of War and Skyrim.</p>
<h4>How long is your game creation cycle? What is your process?</h4>
<p>Usually it takes 2-3 months to finish a game. There is not so much work in the type of games I create, but I can&#8217;t spend a lot of time on them. There is no particular process; I just do the things that need to be done to create the game.</p>
<h4>Are there any game developers that you admire or consider &#8220;rock stars&#8221;?</h4>
<p>I really admire indie developers who create original and fun games, especially those who share their experience and help less experienced game creators. I would name Adam Atomic (Canabalt and Flixel, my favorite Flash engine) and Johnny-K (Cover Orange, Ragdoll Cannon).</p>
<h4>What is it about making a new game that you enjoy most?</h4>
<p>At the first stages of development it&#8217;s really fun to try new things and see how game mechanic starts working. Later, when the game is released, I like to read reviews from players on different sites. It&#8217;s really great to know that some people from the different corners of the Earth like your creation.</p>
<h4>Do you have any hot projects you&#8217;re working on right now?</h4>
<p>Everyone is making mobile games now. I thought that I also may try to create something in this field and started new arcade shooter for iPhone with my friend. Unfortunately, we didn&#8217;t make it as quickly as we would have liked, and it&#8217;s still a little too early to draw any conclusions about the success of the game.</p>
<p>&nbsp;</p>
<p><em><strong>Thanks Oleksii, and congratulations again on winning Flash Game Friday!</strong></em></p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Colin Cupp for <a href="http://mochiland.com">MochiLand</a>, 2012. |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-greens-survive-only-when-reds-die">Permalink</a> |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-greens-survive-only-when-reds-die#comments">2 comments</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/flash-game-friday-winner-greens-survive-only-when-reds-die&amp;title=Flash Game Friday Winner: Greens Survive Only When Reds Die">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/flash-game-friday-winner-greens-survive-only-when-reds-die" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/flash-game-friday" title="View all posts in Flash Game Friday" rel="category tag">Flash Game Friday</a>, <a href="http://mochiland.com/category/mochiland/featured-games" title="View all posts in Game Showcase" rel="category tag">Game Showcase</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/publisher-feed" title="View all posts in Publisher Feed" rel="category tag">Publisher Feed</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/flash-game-friday-winner-greens-survive-only-when-reds-die/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Game Friday Winner: Orbits</title>
		<link>http://mochiland.com/articles/flash-game-friday-winner-orbits</link>
		<comments>http://mochiland.com/articles/flash-game-friday-winner-orbits#comments</comments>
		<pubDate>Mon, 23 Jan 2012 22:17:48 +0000</pubDate>
		<dc:creator>Colin Cupp</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Flash Game Friday]]></category>
		<category><![CDATA[Game Showcase]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Publisher Feed]]></category>
		<category><![CDATA[Andy Brown]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[Mochi Media]]></category>
		<category><![CDATA[Orbits]]></category>
		<category><![CDATA[winner]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=6162</guid>
		<description><![CDATA[Winner&#8217;s Circle This week&#8217;s Flash Game Friday winner is Orbits by Andy Brown! Orbits is a really well-made physics-based puzzler. You are a ship, and you have to propel yourself to the target on the planet. As you complete this task, you advance to the next level. You start in Autumn, and work your way [...]]]></description>
			<content:encoded><![CDATA[ <h1>Winner&#8217;s Circle</h1>
<p>This week&#8217;s Flash Game Friday winner is <a href="http://www.mochimedia.com/games/play/orbits_v858584">Orbits</a> by <a href="https://www.mochimedia.com/community/profile/AndyBrown">Andy Brown</a>!</p>
<p><a href="http://www.mochimedia.com/games/play/orbits_v858584"><img class="alignleft size-full wp-image-6164" style="border: 0px;" title="Orbits" src="http://mochiland.com/wp-content/uploads/2012/01/Orbits.png" alt="" width="560" height="280" /></a></p>
<p>Orbits is a really well-made physics-based puzzler. You are a ship, and you have to propel yourself to the target on the planet. As you complete this task, you advance to the next level. You start in Autumn, and work your way through Spring, Summer, and Winter, each with their own design and music.</p>
<p>So, just aim for the target right? Well, it isn&#8217;t <em>that</em> easy. There are a certain amount of moves it should take you to complete each level, and you gain points for coming in at or under &#8220;par&#8221;, so keep an eye on your click level. If you go over your click level it is very bad for your score!</p>
<p>Obstacles also get in your way, where you need to go around them just to get close to the target. Coins are available throughout the game, which you can collect. You can use these coins to upgrade your ship. There are also 20 different achievements waiting to be unlocked!</p>
<p>Orbits is a well-made game with great artwork and fun game mechanics. Congratulations Andy Brown!</p>
<h2>Get To Know Andy Brown</h2>
<h4>Tell me about yourself- how many people are on your team? Where are you based?</h4>
<p>We have three people on our team right now, Sam, Chris, and myself. Sam does artwork and design, Chris does the music, and I do the programming and whatever else is needed. I currently live in Northern Idaho, USA.</p>
<h4>How long have you been making games? What did you do before?</h4>
<p>My first released Flash game was in 2006, but I started making games a few years before that, and designing them long before that just drawing out concepts on paper. I didn&#8217;t do anything before making games, I was making them while I was still in high school.</p>
<h4>What was your inspiration for &#8220;Orbits&#8221;?</h4>
<p>This was actually the first game that I&#8217;ve made where I did not come up with the original concept. I asked the designer / artist of the game and he said: &#8220;It just.. came to me *adjusts sunglasses*&#8221;.</p>
<h4>Any major challenges or hurdles during development?</h4>
<p>There were a few new concepts in this game for me that took me awhile to get working how I wanted. The gravity mechanics and the bouncing mechanics took me the longest to get right without over complicating the whole process.</p>
<h4>What types of games do you like to create the most? What types of games do you like to play the most?</h4>
<p>This is a really hard question for me, as I like playing and making almost all genres of games. I think I have the most fun making games with randomly generated content, because then I get excited when seeing something new every time I playtest it. Lately I&#8217;ve been playing a lot of Skyrim, so I will just leave it at that for what I play the most.</p>
<h4>How long is your game creation cycle? What is your process?</h4>
<p>My game creation cycles vary for every game, and gets shorter as I master more techniques. Orbits took us nearly six months to make and polish. My process usually consists of coming up with a game idea,  brainstorming with my co-workers and friends, writing down the best ideas and then just start making the game, adding in new ideas and crossing out others as the game continues development.</p>
<h4>Are there any game developers that you admire or consider &#8220;rock stars&#8221;?</h4>
<p>There are actually quite a few! Shigeru Miyamoto, John Carmack, Gabe Newell, and Tim Schafer would be the ones I admire the most. What is it about making a new game that you enjoy most? My favorite moment is when I&#8217;m struggling with a new idea and I finally get the idea working in the game. It&#8217;s a very rewarding feeling to see your ideas come to life.</p>
<h4>Do you have any hot projects you&#8217;re working on right now?</h4>
<p>Yes, I do! I&#8217;m currently working on a couple projects.</p>
<p>The first one is a platformer where you play as a ninja and is planned to play like a distance game where you must keep running to the right with randomly generated obstacles, collect coins, and purchase upgrades.</p>
<p>The second project is a RPG where you are stranded on an island and need to survive by foraging, crafting, and killing wild animals. This one started as a Ludum Dare 22 project and I had so much fun with the idea that I decided I would flesh it out and make a full game out of it.</p>
<p>&nbsp;</p>
<p><em><strong>Thanks Andy, best of luck to you and the team on your upcoming projects!</strong></em></p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Colin Cupp for <a href="http://mochiland.com">MochiLand</a>, 2012. |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-orbits">Permalink</a> |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-orbits#comments">No comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/flash-game-friday-winner-orbits&amp;title=Flash Game Friday Winner: Orbits">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/flash-game-friday-winner-orbits" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/flash-game-friday" title="View all posts in Flash Game Friday" rel="category tag">Flash Game Friday</a>, <a href="http://mochiland.com/category/mochiland/featured-games" title="View all posts in Game Showcase" rel="category tag">Game Showcase</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/publisher-feed" title="View all posts in Publisher Feed" rel="category tag">Publisher Feed</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/flash-game-friday-winner-orbits/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Game Friday Winner: Raze 2</title>
		<link>http://mochiland.com/articles/flash-game-friday-winner-raze-2</link>
		<comments>http://mochiland.com/articles/flash-game-friday-winner-raze-2#comments</comments>
		<pubDate>Mon, 09 Jan 2012 20:22:17 +0000</pubDate>
		<dc:creator>Colin Cupp</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Flash Game Friday]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Publisher Feed]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[Juice-Tin]]></category>
		<category><![CDATA[Mochi Media]]></category>
		<category><![CDATA[Raze 2]]></category>
		<category><![CDATA[winner]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=6131</guid>
		<description><![CDATA[Winner&#8217;s Circle This week&#8217;s Flash Game Friday Winner is Raze 2 by Juice-Tin! If shooters are your thing, this will be your new favorite game. Raze 2 really delivers as a big-time shooter with a ton of polish and tight gameplay. You are a soldier in the Raze unit, and your mission is to eradicate [...]]]></description>
			<content:encoded><![CDATA[ <h1>Winner&#8217;s Circle</h1>
<p>This week&#8217;s Flash Game Friday Winner is <a href="http://www.mochimedia.com/games/play/raze-2">Raze 2</a> by <a href="http://www.juice-tin.com/">Juice-Tin</a>!</p>
<p><a href="http://www.mochimedia.com/games/play/raze-2"><img class="alignleft size-full wp-image-6135" style="border: 0px;" title="Raze 2" src="http://mochiland.com/wp-content/uploads/2012/01/Raze-2_560x280.jpg" alt="" width="560" height="280" /></a></p>
<p>If shooters are your thing, this will be your new favorite game. Raze 2 really delivers as a big-time shooter with a ton of polish and tight gameplay.</p>
<p>You are a soldier in the Raze unit, and your mission is to eradicate aliens from the planet. You have a wide range of weapons to select from, and as you play you can upgrade your soldier with a variety of options. Speaking of upgrades, you can also upgrade a bunch of abilities and items using an in-game credits system- so you can really customize the game and your soldier to your liking!</p>
<p>All of these upgrades, amazing artwork, and superb gameplay make Raze 2 a natural choice for Flash Game Friday. Congratulations Juice-Tin!</p>
<h2>Get To Know Juice-Tin</h2>
<h4>Tell me about yourself- how many people are on your team? Where are you based?</h4>
<p>As of right now, our team consists of one programmer (myself), and two artists. They take turns making games with me, as their both also busy with school/work. Right we&#8217;re located in Canada, Ontario/Quebec and are planning on forming a company soon and expanding to a much bigger staff. Games will still be created by only two people, but a bigger staff means we can work on multiple games at once, on multiple platforms!</p>
<h4>How long have you been making games? What did you do before?</h4>
<p>Funny thing is that all three of us always wanted to be artists, including me! I&#8217;ve always loved drawing and expressing my creativity. When I finally tried programming in highschool I fell in love, and have been creating games just for fun ever since. It wasn&#8217;t until about 3 years ago that I finally decided my work was good enough to release publicly.</p>
<h4>What was your inspiration for &#8220;Raze 2&#8243;?</h4>
<p>One of the things we really wanted to achieve, was the big environments found in the Halo games, and the very vibrant and almost exotic areas from the game Bullet Storm. We really wanted it to feel like you were just a small person in a huge world, despite being limited to a small map. As you can also probably tell, we&#8217;re both fans of the leveling up and upgrading systems found in many shooters today. It was these new PC/Console first person shooters that made us strive to make the biggest and best game we possibly could. Since we can&#8217;t yet make a full game for PC/Console, we wanted to achieve as close to it as possible with Raze 2.</p>
<h4>What are the major improvements / changes compared to the original Raze?</h4>
<p>There&#8217;s really too many to list here. We read almost every possible comment about Raze 1, and because of the success it had, really wanted to fix as many problems people had with the original Raze as possible. We first started with a completely new game engine, created from scratch. Raze 2 now features tighter controls/camera, smarter AI, and a 100x better game engine, that allows an incredible amount of detail in the maps and effects (including waterfalls, sparks, etc) without causing slowdown for decent computers. Aside from the technical point of view, the levels are much more detailed and better designed for a shooting type of game. Oh yeah, there&#8217;s also over 26 more weapons than Raze 1, 9 modifying equipments, 7 abilities, a deep and detailed campaign with cut-scenes, and up to 4 separate teams allowed in game play.</p>
<h4>Any major challenges or hurdles in creating Raze 2?</h4>
<p>To be completely honest, no, actually. Creating Raze 1 was more or less a nightmare. Being our first game we were doing a lot of trial and error. We learned an incredible amount from not only our Raze 1 experiences, but all the feedback we got from it&#8217;s players. With everything we learned, we were actually able to create Raze 2 quite smoothly. In terms of the engine, I already created one slightly similar when I created the engine for Siegius. So really, from everything we did prior to starting Raze 2, we ended up being 100% prepared for everything ahead of us, as we&#8217;ve tackled it all before, and now knew the proper ways to do it all.</p>
<h4>Can we expect another (future) installment in the &#8220;Raze&#8221; series?</h4>
<p>Yes! We have plans for both a Raze 3, and an eventual Raze Online. Because Addison is busy with school, we&#8217;d first like to focus on Raze 3 to complete the story, fix any remaining problems people had with Raze 2, as well as introduce a bunch of really cool, and crazy ideas that couldn&#8217;t make it into Raze 2, including many new ones. Our goal is to get Raze as perfect as possible, so when we have the time to work on the Online version, we&#8217;ll be able to make it both massive, and as enjoyable to all as humanly possible!</p>
<h4>What types of games do you like to create the most? What types of games do you like to play the most?</h4>
<p>All, and all. I really enjoy all types of games. From RPG&#8217;s Shooters, and Strategy games, to the silly games, Viva Pinata, Party games, etc. One of my long term goals actually, is to create a game of every genre. I would normally not want to create sequels, as you don&#8217;t learn too much or get to challenge yourself as much when you stick to the same type of game (Raze being an exception of course because of how well it was received, and how fun it was to make). But I would really love to explore every possible Genre. So far I&#8217;ve created Shooter, Strategy, Puzzle, Adventure/Rpg, and now we&#8217;ve got a beat&#8217;em&#8217;up, and eventually a 3rd person Racer in the works. I feel every new type of game you create, furthers your skill, and teaches you many more techniques that can be used in other games. It&#8217;s this reason I would like to continue making a variety of games, along with Raze.</p>
<h4>How long is your game creation cycle? What is your process?</h4>
<p>Depending on the game size, we try to take about 1 month for small games, and 4 months for larger games (such as Raze 2). I used to do all my work on my main computer, but purchased a new Laptop strictly for game development, which helps keep my personal data and work data separate. As of now the development process is the same as any, work as much as possible while keeping in good contact with your team. However because Raze 2 was such a huge project, I took a 6.5 hour bus ride to stay with Addison for 1.5 weeks. Surprisingly, we did about a month&#8217;s worth of work in just that week and a half. It really is incredible how much more gets accomplished when working side by side with your partner.</p>
<h4>Are there any game developers that you admire or consider &#8220;rock stars&#8221;?</h4>
<p>Absolutely! I really admire the developers that start off small, and are able to expand into a well known and established company. One that I really appreciate is the work of Tom Fulp and Dan Paladin at The Behemoth. They both started as Flash developers and went on to create the excellent XBLA title &#8216;Castle Crashers&#8217;. Another would be Edmund McMillen and Florian Himsl, who also went from Flash developers, to remaking their game Super Meatboy for PC as well as multiple consoles. Their newest game Binding of Isaac, is actually a Flash game that was ported to PC via Steam. This is direction I&#8217;m trying to go in now, and would love to achieve some day.</p>
<h4>What is it about making a new game that you enjoy most?</h4>
<p>Well really, who doesn&#8217;t love creating new things? Much of it comes from the positive feedback when other people play my game. It really makes you feel good, knowing many people really enjoy something you created. It feels good to make people happy, it feels great to know they are thoroughly entertained, and it&#8217;s nice to sit back at the end of it all, look at your work and what you&#8217;ve accomplished, and think &#8220;I did that :)&#8221;.</p>
<h4>Do you have any hot projects you&#8217;re working on right now?</h4>
<p>Yes! I&#8217;m currently working on a Gladiator game with Sleva (artist from Siegius). The game has been put on hold for the holiday month, but should be finished sometime soon. Screenshots are available at Juice-Tin.com.</p>
<p><em><strong>Thanks Juice-tin, can&#8217;t wait to play your upcoming Gladiator game as well as Raze 3!</strong></em></p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Colin Cupp for <a href="http://mochiland.com">MochiLand</a>, 2012. |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-raze-2">Permalink</a> |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-raze-2#comments">One comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/flash-game-friday-winner-raze-2&amp;title=Flash Game Friday Winner: Raze 2">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/flash-game-friday-winner-raze-2" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/flash-game-friday" title="View all posts in Flash Game Friday" rel="category tag">Flash Game Friday</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/publisher-feed" title="View all posts in Publisher Feed" rel="category tag">Publisher Feed</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/flash-game-friday-winner-raze-2/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mochi Community Contribution: Creating Ally AI by Danny Buoncore</title>
		<link>http://mochiland.com/articles/mochi-community-contribution-creating-ally-ai-by-danny-buoncore</link>
		<comments>http://mochiland.com/articles/mochi-community-contribution-creating-ally-ai-by-danny-buoncore#comments</comments>
		<pubDate>Tue, 06 Dec 2011 00:55:01 +0000</pubDate>
		<dc:creator>dannybuoncore</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Flash Development]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Game Design]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[Danny Buonocore]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Mochi Media]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=5916</guid>
		<description><![CDATA[Creating Ally AI That Locates Nearest Enemy and Attacks In this tutorial, you will learn: Basic for loop usage Basic array usage How to find the distance between two points How to use Math.atan2() to have MovieClips follow each other How to fire projectiles How to split a velocity vector into two perpendicular lines using [...]]]></description>
			<content:encoded><![CDATA[ <h1 class="post-title">Creating Ally AI That Locates Nearest Enemy and Attacks</h1>
<h2>In this tutorial, you will learn:</h2>
<ul>
<li>Basic for loop usage</li>
<li>Basic array usage</li>
<li>How to find the distance between two points</li>
<li>How to use Math.atan2() to have MovieClips follow each other</li>
<li>How to fire projectiles</li>
<li>How to split a velocity vector into two perpendicular lines using sine and cosine</li>
<li>How to create objects from custom classes</li>
</ul>
<h4>Introduction</h4>
<p>When learning Actionscript, or any programming language for that matter, I find it best to create specific engines that employ a variety of techniques and functions.  This way, you are not only learning how to use these features, but you are also experiencing a pragmatic use for them.  In this tutorial we will be creating a class for an ally AI that will locate the enemy nearest it, chase it, and shoot it.  This is used in just about any game where there are characters not controlled by the player.  Take, for example, a tower defense game.  The towers created do not simply attack any enemy they want.  They usually attack the closest.  However, there are some games where you can choose to have them attack the quickest enemy, or the one with the most health, or whatever it may be.  But for now let&#8217;s concentrate on distance.</p>
<p>Now, what if there are three allies (let&#8217;s call them followers for now) and two enemies, one of which is really far away?  The tutorial you are about to read is designed so that rather than all three followers clustering up on the closest enemy, two will attack it and the third will set off for the far one.  Furthermore, what happens when a third enemy is spawned when all this is going on?  Well, rather than the follower by itself (which may be closer) going out to attack it, one of the two that are attacking the same enemy will leave and target the newfound enemy.  This optimizes the strategy of the followers so no enemy is left alone while there is a surplus of followers elsewhere.</p>
<p>Rather than just talking about what we&#8217;re going to do, let&#8217;s actually do it.  Sometimes I prefer to just see the source code and play around with it rather than just following a tutorial.  If you want, you may download a heavily-commented copy of all the code down below.  Without further ado, let&#8217;s begin the tutorial.</p>
<p><object id="test1" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="400" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"><param name="movie" value="http://www.swfup.com/swf/e5z3.swf" /><embed type="application/x-shockwave-flash" width="640" height="400" src="http://www.swfup.com/swf/e5z3.swf" name="Follow" pluginspage="http://www.adobe.com/go/getflashplayer"></embed></object></p>
<p><a href="http://www.mediafire.com/?xhhbm1ovehio8ag">Download Source</a></p>
<h4>Step 1: Setting Up the MovieClips</h4>
<p>There are three MovieClips essential to this tutorial.  First, we need the followers and the enemies.  We also need some sort of projectile or bullet for the followers to shoot.  For the sake of example, I am programming this tutorial in a way that the user can create followers and enemies by clicking buttons at the bottom of the stage.  So now we&#8217;re up to five MovieClips.  Name them Bee, EnemyBee, Ball, BeeButton, and EnemyButton.  Below are my five MovieClips in their respective order:</p>
<p><img src="http://img337.imageshack.us/img337/6232/movieclips.jpg" alt="MovieClips" /></p>
<p>When saving each as a symbol, be sure to check the &#8220;Export for Actionscript&#8221; box and keep the class name the same.</p>
<h4>Step 2: The Arrays</h4>
<p>Now that we have our MovieClips, we need a place to store them.  Open up the Main Timeline&#8217;s Actions Panel (F9) and input the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> beeArray=<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> eArray=<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> ballArray=<span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>What&#8217;s happening here is we are creating three arrays to store our objects: one for all the bees (followers), one for all the enemies, and one for all the balls being shot.  These arrays are going to be accessed a ton of times throughout the tutorial, so if you need to brush up on any of the arrays basics be sure to check out this <a href="http://active.tutsplus.com/tutorials/actionscript/as3-101-arrays/">tutorial</a></p>
<h4>Step 3: The Enemies</h4>
<p>The enemies are much easier to program, so we&#8217;ll start with them first.  Create a new custom class called EnemyBee (or whatever necessary to match the name of your enemy MovieClip) and start off with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MovieClip</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.*;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> EnemyBee <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">MovieClip</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> r<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">angle</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> rot<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> health<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speedX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speedY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> dist<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> reload<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">50</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//reload timer for shooting (don't worry about this for now)</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> isTarget<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> EnemyBee<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ADDED_TO_STAGE</span><span style="color: #000066; font-weight: bold;">,</span> beginClass<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> beginClass<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
r=<span style="color: #004993;">MovieClip</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">root</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> eFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><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>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span>=<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageWidth</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span>=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">400</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000; font-weight:bold;">20</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> h<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span>=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #004993;">angle</span>=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">atan2</span><span style="color: #000000;">&#40;</span>h<span style="color: #000066; font-weight: bold;">-</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,-</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>speedX=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">cos</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>speedY=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rotation</span>=<span style="color: #004993;">angle</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PI</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">180</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
rot=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">random</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> eFrame<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Now this is a lot of code all at once so let&#8217;s go through it line by line.  Lines 6-13 declare variables which are more or less self-explanatory.  The main one to note here is the public variable isTarget.  This variable isn&#8217;t accessed at all by EnemyBee, but from the followers.  It is used to tell how many bees are following the EnemyBee.  But let&#8217;s move on for now.</p>
<p>In the beginClass function, line 20 places EnemyBee inside eArray (on the Main Timeline) through the use of r (the root of the MovieClip).  Below, the initial x and y coordinates are set to be just off the right side of the stage anywhere from the top to the bottom.  Variable h is the destination of EnemyBee and, using Math.random(), is different every time.  The next line uses a function called Math.atan2().  Most of you trigonometry aficionados know that the atan2 function, being a variant of the arctangent function, returns the angle (in radians) between the positive x axis of a plane and the point constructed by the given coordinates.  For now, all you need to know are the parameters.  They are as follows:</p>
<p><span> Math.atan2(destinationY-this.y , destinationX-this.x);</span></p>
<p>It seems strange, but just remember the y comes first.  By using the atan2 function we now know the angle between the point EnemyBee is going for (in this case h) and itself.  But how do we make it so that our object moves towards it?  That&#8217;s where the sine and cosine lines come in.  By taking the cosine of the angle we can find the horizontal speed the object must take.  Similarly, we can use sine to find the vertical speed.  You can replace the 2 at the end of each line with a larger or smaller number to increase or decrease the speed (respectively).  Finally, we rotate the object to face its target once again using angle, and then assign rot (the rotational speed) a random number from 0-3.99999 (this is used later on).</p>
<p>Now we can edit the eFrame function.  So within the brackets, place this code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>speedX<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<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: #000066; font-weight: bold;">.</span>health<span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>speedY<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<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: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #0033ff; font-weight: bold;">this</span><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;">2</span><span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">splice</span><span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><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><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
removeMe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><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;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">splice</span><span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><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><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rotation</span><span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000000; font-weight:bold;">5</span><span style="color: #000066; font-weight: bold;">+</span>rot<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000000; font-weight:bold;">3</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">3</span><span style="color: #000066; font-weight: bold;">-</span>rot<span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<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: #000066; font-weight: bold;">.</span>y<span style="color: #000066; font-weight: bold;">-</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>width<span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;;</span>stage<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">stageHeight</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
removeMe<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>First, the object moves horizontally.  Next, if its health is greater than zero (meaning it is not dead) it will also move vertically and if it manages to survive the followers and go offstage to the left, remove itself from eArray, and then call the removeMe() function which we will declare in a little bit.  In case EnemyBee IS defeated, however, it will first check to see if its index in eArray is at least 0.  A useful fact about arrays is that &#8220;if&#8221; an object isn&#8217;t in the array at all, its index is -1.  Through this &#8220;if statement&#8221; we are effectively checking to see if EnemyBee is in eArray so we don&#8217;t accidentally remove it twice (that would result in an error).  The next few lines are pretty much self-explanatory.</p>
<p>The last piece of code for EnemyBee is the removeMe() function.  Here it is:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> removeMe<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> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> eFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeChild</span><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>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This last part is easy.  First the event listener is removed, and then the object itself is deleted.  That&#8217;s all we need for EnemyBee.  Now we can start the hard stuff! (:</p>
<h4>Step 4: The Followers</h4>
<p>Now it&#8217;s time to get to the heart of the tutorial: creating the followers.  Create a new custom class for your followers (in this case it&#8217;s called Bee), and input this code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
 	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MovieClip</span><span style="color: #000066; font-weight: bold;">;</span>
 	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.*;</span>
&nbsp;
 	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Bee <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">MovieClip</span> <span style="color: #000000;">&#123;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> r<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">max</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span>=<span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MAX_VALUE</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speedX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speedY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span>=<span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">angle</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> reload<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">50</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Bee<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
   	<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ADDED_TO_STAGE</span><span style="color: #000066; font-weight: bold;">,</span> beginClass<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #000000;">&#125;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> beginClass<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
   	r=<span style="color: #004993;">MovieClip</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">root</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
   	<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> eFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
   	r<span style="color: #000066; font-weight: bold;">.</span>beeArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><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>
   	<span style="color: #004993;">x</span>=<span style="color: #000000; font-weight:bold;">275</span><span style="color: #000066; font-weight: bold;">;</span>
   	<span style="color: #004993;">y</span>=<span style="color: #000000; font-weight:bold;">245</span><span style="color: #000066; font-weight: bold;">;</span>
  	<span style="color: #000000;">&#125;</span>
  	<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> eFrame<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
  	<span style="color: #000000;">&#125;</span>
 	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>You&#8217;ve seen all this code already in EnemyBee so I&#8217;m not going to explain it all again.  The only exceptions are c (which will be explained in a bit) and Number.MAX_VALUE, which can simply be thought of as infinity.</p>
<p>There&#8217;s a lot of code in the eFrame event, so let&#8217;s do it all in pieces.  First, we need this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">!</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">//paste all the following code here</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This line of code tells us if there are any enemies on stage or not.  Without it, we would get errors.  Within the brackets, place this first bunch of code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">c</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if c is NOT in eArray...</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//for every object in eArray...</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> obj=r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign address of object to obj</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> distX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span>=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>x<span style="color: #000066; font-weight: bold;">-</span>obj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//horizontal distance between self and obj (the enemy)</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> distY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span>=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>y<span style="color: #000066; font-weight: bold;">-</span>obj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//vertical distance between self and obj (the enemy)</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> dist<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span>=<span style="color: #000000;">&#40;</span>distX<span style="color: #000066; font-weight: bold;">*</span>distX<span style="color: #000066; font-weight: bold;">+</span>distY<span style="color: #000066; font-weight: bold;">*</span>distY<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//overall distance using distance formula</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>dist<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>max<span style="color: #000066; font-weight: bold;">&amp;</span>amp<span style="color: #000066; font-weight: bold;">;&amp;</span>amp<span style="color: #000066; font-weight: bold;">;</span>obj<span style="color: #000066; font-weight: bold;">.</span>isTarget==<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if distance &amp;lt; max and obj has no followers...</span>
&nbsp;
<span style="color: #004993;">max</span>=dist<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign distance to max (the new shorst distance)</span>
&nbsp;
<span style="color: #004993;">c</span>=obj<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign address of object currently being tested in c</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">c</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if c is in eArray...</span>
&nbsp;
<span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span>isTarget<span style="color: #000066; font-weight: bold;">++;</span> <span style="color: #009900; font-style: italic;">//tell c (EnemyBee) that one more bee is following it</span>
&nbsp;
<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if c is NOT in eArray...</span>
&nbsp;
<span style="color: #004993;">max</span>=<span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MAX_VALUE</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//reset max to maximum value</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> j<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> j<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> j<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//for every object in eArray...</span>
&nbsp;
obj=r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign address of object to obj</span>
&nbsp;
distX=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>x<span style="color: #000066; font-weight: bold;">-</span>obj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//horizontal distance between self and obj (the enemy)</span>
&nbsp;
distY=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>y<span style="color: #000066; font-weight: bold;">-</span>obj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//vertical distance between self and obj (the enemy)</span>
&nbsp;
dist=<span style="color: #000000;">&#40;</span>distX<span style="color: #000066; font-weight: bold;">*</span>distX<span style="color: #000066; font-weight: bold;">+</span>distY<span style="color: #000066; font-weight: bold;">*</span>distY<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//overall distance using distance formuala</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>dist<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>max<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if distance is closer than max...</span>
&nbsp;
<span style="color: #004993;">max</span>=dist<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign distance to max (the new shortest distance)</span>
&nbsp;
<span style="color: #004993;">c</span>=obj<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign address of object currently being tested in c</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span>isTarget<span style="color: #000066; font-weight: bold;">++;</span> <span style="color: #009900; font-style: italic;">//tell c (EnemyBee) that one more bee is following it</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>It can get a little confusing at this point, so I included plenty of comments.  The variable c is used to hold the address of the closest enemy (hence it&#8217;s name).  First we check to see if it is not in the array (meaning the closest enemy has not been determined).  We use a for loop to iterate through all the enemies in eArray.  If you&#8217;re new to loops, you can read up on them <a href="http://active.tutsplus.com/tutorials/actionscript/as3-101-loops/">here</a>.</p>
<p>Next we instantiate four variables:  a placeholder for the object being tested, the horizontal distance, the vertical distance, and the total distance.  Just in case you are wondering, the distance formula is as follows:</p>
<p><img src="http://upload.wikimedia.org/wikipedia/en/math/f/0/a/f0a4a3d633ef96d31f068e387cd91fc2.png" alt="Distance Formula" /></p>
<p>Now that we know the distance of the object being checked, we must see if it is closer than the previous.  Recall that max was equal to Number.MAX_VALUE, so it is greater than anything we could compare it to.  So the first instance to be checked will definitely be closer, and the if statement will be true.  Therefore, max is set to the distance between itself and the enemy being tested (the new shortest distance), and obj is stored in c.  All that happened for the first enemy in eArray.  Now go through it again for the second enemy.  The second enemy is stored in obj, just like the first, and the distance is established.  However, instead of max being equal to the highest value, it is equal to the distance of the previous enemy.  If the distance between the bee and the enemy being tested is shorter than that of the first enemy, max is lowered again to match the distance and the enemy is stored in c.  If not, the loop skips over this and goes on to test the next enemy.  This process continues for every enemy in the array.  Logically, the value of max by the time all of the enemies are done being tested will be equal to the shortest distance, and c will hold the address for the corresponding enemy.</p>
<p>Note that with the if statement, Bee only looks for enemies that have isTarget==0.  In plain English, that means it only takes enemies that are not being followed into consideration.  This way we don&#8217;t have that surplus of followers in one section and a non-followed enemy elsewhere like we previously discussed.  However, there is the case that every enemy is already being followed.  The if statement right after the for loop checks to see if a closest enemy (with no followers) has been found.  If so, it increases the value of isTarget on the enemy (amount of followers).  If not, another for loop extremely similar to the previous is carried out.  The only difference is the if statement:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>dist<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>max<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span></pre></div></div>

<p>Instead of checking to be sure the enemy being tested has no followers, it just looks for the closest.  I found this to be the best design, but you might have another use for it.  This code is very easy to customize.  Say you wanted locate the enemy with the least amount of followers.  You could simply substitute the if statement for this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>obj<span style="color: #000066; font-weight: bold;">.</span>isTarget<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>max<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #004993;">max</span>=obj<span style="color: #000066; font-weight: bold;">.</span>isTarget<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #004993;">c</span>=obj<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>All right we&#8217;re getting closer to finishing this up.  One more loop:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">max</span>=<span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MAX_VALUE</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//reset max to maximum value</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span>length<span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span>=r<span style="color: #000066; font-weight: bold;">.</span>beeArray<span style="color: #000066; font-weight: bold;">.</span>length<span style="color: #000066; font-weight: bold;">&amp;</span>amp<span style="color: #000066; font-weight: bold;">;&amp;</span>amp<span style="color: #000066; font-weight: bold;">;</span>c<span style="color: #000066; font-weight: bold;">.</span>isTarget<span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if c has other followers...</span>
&nbsp;
<span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span>isTarget<span style="color: #000066; font-weight: bold;">--;</span> <span style="color: #009900; font-style: italic;">//tell c it has one fewer follower</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> l<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> l<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> l<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//for every object in eArray...</span>
&nbsp;
obj=r<span style="color: #000066; font-weight: bold;">.</span>eArray<span style="color: #000000;">&#91;</span>l<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign address of object to obj</span>
&nbsp;
distX=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>x<span style="color: #000066; font-weight: bold;">-</span>obj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//horizontal distance between self and obj (the enemy)</span>
&nbsp;
distY=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>y<span style="color: #000066; font-weight: bold;">-</span>obj<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//vertical distance between self and obj (the enemy)</span>
&nbsp;
dist=<span style="color: #000000;">&#40;</span>distX<span style="color: #000066; font-weight: bold;">*</span>distX<span style="color: #000066; font-weight: bold;">+</span>distY<span style="color: #000066; font-weight: bold;">*</span>distY<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//overall distance using distance formula</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>dist<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>max<span style="color: #000066; font-weight: bold;">&amp;</span>amp<span style="color: #000066; font-weight: bold;">;&amp;</span>amp<span style="color: #000066; font-weight: bold;">;</span>obj<span style="color: #000066; font-weight: bold;">.</span>isTarget==<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if distance &amp;lt; max and obj has no followers...</span>
&nbsp;
<span style="color: #004993;">max</span>=dist<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign distance to max (the new shortest distance)</span>
&nbsp;
<span style="color: #004993;">c</span>=obj<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//assign address of object currently being tested in c</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span>isTarget<span style="color: #000066; font-weight: bold;">++;</span> <span style="color: #009900; font-style: italic;">//tell c (EnemyBee) that one more bee is following it</span>
&nbsp;
<span style="color: #004993;">max</span>=<span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MAX_VALUE</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//reset max to maximum value</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Okay so after doing two loops almost exactly like this one, no explanation should be necessary.  However, a brief discourse on the logic behind it should help.  The only thing different here than the first loop is that it is only executed when there are more enemies than followers and the enemy the bee is following has at least one other follower.  You may be asking yourself why I chose to create three loops that are almost identical instead of simply making a function called several times with slightly different arguments.  Well, I think it&#8217;s easier to retain the information if you see it several times.  Plus, a tutorial is never complete unless something is left up to you to figure out yourself.</p>
<p>All right, now that the difficult part is out of the way, we can move on to actually moving the bee.  The code below immediately follows the if statement above:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">angle</span>=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">atan2</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span>y<span style="color: #000066; font-weight: bold;">-</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span>x<span style="color: #000066; font-weight: bold;">-</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//angle between self and closest enemy</span>
&nbsp;
speedX=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">cos</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>speed<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//find horizontal speed according to angle</span>
&nbsp;
speedY=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>speed<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//find vertical speed according to angle</span>
&nbsp;
<span style="color: #004993;">rotation</span>=<span style="color: #004993;">angle</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PI</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">180</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//rotate to face enemy</span>
&nbsp;
distX=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>x<span style="color: #000066; font-weight: bold;">-</span><span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//horizontal distance between self and closest enemy</span>
&nbsp;
distY=<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>y<span style="color: #000066; font-weight: bold;">-</span><span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//vertical distance between self and closest enemy</span>
&nbsp;
dist=<span style="color: #000000;">&#40;</span>distX<span style="color: #000066; font-weight: bold;">*</span>distX<span style="color: #000066; font-weight: bold;">+</span>distY<span style="color: #000066; font-weight: bold;">*</span>distY<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//overall distance using distance formula</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>dist<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>=<span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if distance is less than or equal to 100...</span>
&nbsp;
speed=<span style="color: #000066; font-weight: bold;">-.</span>1<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//slow down</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>speed<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if speed is less than 0...</span>
&nbsp;
speed=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//keep speed at 0</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if distance is greater than 100...</span>
&nbsp;
speed<span style="color: #000066; font-weight: bold;">+</span>=<span style="color: #000066; font-weight: bold;">.</span>1<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//speed up</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>speed<span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span><span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if speed is greater than 2...</span>
&nbsp;
speed=<span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//keep speed at 2</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">+</span>=speedX<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//move horizontally</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">+</span>=speedY<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//move vertically</span></pre></div></div>

<p>This is very similar to the motion employed in the EnemyBee class and shouldn&#8217;t be too difficult at all.  The if and else statements are purely for aesthetic purposes so that the bee doesn&#8217;t sit directly on the enemy.</p>
<p>That concludes the code for the followers.  Now all we need is a means to create the followers and enemies.  I&#8217;m sure you will come up with plenty of ways that pertain to your game, but for the sake of convenience I just created two buttons that allow the user to spawn them.  If you&#8217;d like to see the Actionscript for this, download the source code files from above.</p>
<h4>Step 5: Shooting</h4>
<p>Run your .swf.  If you did it right, you should get something like this:</p>
<p>The bees follow the enemies just like we programmed them to, but they do not attack.  Remember that Ball Movieclip we make at the beginning of the tutorial?  Well we&#8217;re finally going to use it.  Open up the custom class for Ball and type this in:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MovieClip</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.*;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Ball <span style="color: #0033ff; font-weight: bold;">extends</span> <span style="color: #004993;">MovieClip</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> r<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">c</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">15</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> id2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">angle</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speedX<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speedY<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> speed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span>=<span style="color: #000000; font-weight:bold;">8</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> mc<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Ball<span style="color: #000000;">&#40;</span>id<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ADDED_TO_STAGE</span><span style="color: #000066; font-weight: bold;">,</span> beginClass<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
id2=id<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> beginClass<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
r=<span style="color: #004993;">MovieClip</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">root</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> eFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
mc=r<span style="color: #000066; font-weight: bold;">.</span>beeArray<span style="color: #000000;">&#91;</span>id2<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//find which object created it</span>
&nbsp;
<span style="color: #004993;">angle</span>=mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rotation</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PI</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">180</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span>=mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//set x coordinate to that of bee's</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span>=mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//set y coordinate to that of bee's</span>
&nbsp;
speedX=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">cos</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>speed<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
speedY=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>speed<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">setChildIndex</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">,</span>r<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildIndex</span><span style="color: #000000;">&#40;</span>mc<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> eFrame<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">+</span>=speedX<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">+</span>=speedY<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>c<span style="color: #000066; font-weight: bold;">&amp;</span>gt<span style="color: #000066; font-weight: bold;">;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
c<span style="color: #000066; font-weight: bold;">--;</span>
&nbsp;
<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>alpha<span style="color: #000066; font-weight: bold;">-</span>=<span style="color: #000066; font-weight: bold;">.</span>1<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<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: #000066; font-weight: bold;">.</span>alpha<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
removeBall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> removeBall<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> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ENTER_FRAME</span><span style="color: #000066; font-weight: bold;">,</span> eFrame<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span>ballArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">splice</span><span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>ballArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><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><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeChild</span><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>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Basically we&#8217;re just creating an object that follows a straight line path using the rotation of the bee it&#8217;s coming from.  The address of the bee is determined by the parameter id2, which we will explain it a bit.  Now we have to program Bee to actually shoot the balls.  In the eFrame event of Bee, right after the speedX and speedY are used, place the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">reload<span style="color: #000066; font-weight: bold;">--;</span> <span style="color: #009900; font-style: italic;">//lower reload timer</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>reload==<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if reload is complete...</span>
&nbsp;
reload=<span style="color: #000000; font-weight:bold;">50</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//reset reload timer to 50</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> newBall<span style="color: #000066; font-weight: bold;">:</span>Ball=<span style="color: #0033ff; font-weight: bold;">new</span> Ball<span style="color: #000000;">&#40;</span>r<span style="color: #000066; font-weight: bold;">.</span>beeArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//create new ball</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>newBall<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//add ball to stage</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span>ballArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>newBall<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//put ball in ballArray</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This creates a new instance of the Ball class and places it in the corresponding array on the Main Timeline.  As you can see, the argument incorporated while instantiating the new ball is the index of the bee in its array.  This is then later accessed by the ball in its class to find where it should be placed on the stage and the angle it should follow:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">mc=r<span style="color: #000066; font-weight: bold;">.</span>beeArray<span style="color: #000000;">&#91;</span>id2<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//find which object created it</span>
&nbsp;
<span style="color: #004993;">angle</span>=mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">rotation</span><span style="color: #000066; font-weight: bold;">*</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">PI</span><span style="color: #000066; font-weight: bold;">/</span><span style="color: #000000; font-weight:bold;">180</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span>=mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//set x coordinate to that of bee's</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span>=mc<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">//set y coordinate to that of bee's</span>
&nbsp;
speedX=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">cos</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>speed<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
speedY=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">sin</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">angle</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">*</span>speed<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
r<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">setChildIndex</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">,</span>r<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getChildIndex</span><span style="color: #000000;">&#40;</span>mc<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>The address of the bee is found using id2 (which is equal to the argument we just mentioned) and stored in mc, which is used to set all that good stuff above.  The setChildIndex() statement is used so that the ball appears below the bee, giving the illusion that it&#8217;s being shot by the bee, and not appearing right on top of it.</p>
<p>Okay so run your .swf again and you should see this:</p>
<p>Pretty good, huh?  Now we just have more step: the collisions.</p>
<h4>Step 6: The Collisions</h4>
<p>This part is easy.  Simply open up the class file for EnemyBee and, in the first line of the eFrame event, put in the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span>=<span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;</span>r<span style="color: #000066; font-weight: bold;">.</span>ballArray<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> mc<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Object</span>=r<span style="color: #000066; font-weight: bold;">.</span>ballArray<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
dist=<span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">abs</span><span style="color: #000000;">&#40;</span>mc<span style="color: #000066; font-weight: bold;">.</span>x<span style="color: #000066; font-weight: bold;">-</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">abs</span><span style="color: #000000;">&#40;</span>mc<span style="color: #000066; font-weight: bold;">.</span>y<span style="color: #000066; font-weight: bold;">-</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>dist<span style="color: #000066; font-weight: bold;">&amp;</span>lt<span style="color: #000066; font-weight: bold;">;;</span>this<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;">2</span><span style="color: #000066; font-weight: bold;">+</span>mc<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;">2</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #009900; font-style: italic;">//if they touch...</span>
&nbsp;
health<span style="color: #000066; font-weight: bold;">--;</span>
&nbsp;
mc<span style="color: #000066; font-weight: bold;">.</span>removeBall<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>It&#8217;s just a for loop that iterates over every instance in the ball array and tests for a collision.  You can use whatever collision-detection technique you want, but for this example the best choice is a simple circle-to-circle test.  Upon each collision, the health of the bee is lowered, and the ball is removed through the function removeBall().</p>
<p>Well, that&#8217;s about it.  Test your .swf and it should work just as my example up above did.  This technique is very useful and I&#8217;m sure you&#8217;ll find plenty of ways to use it in your games.  If you make something cool, I&#8217;d love to see it (: Thanks for reading!</p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; dannybuoncore for <a href="http://mochiland.com">MochiLand</a>, 2011. |
	  <a href="http://mochiland.com/articles/mochi-community-contribution-creating-ally-ai-by-danny-buoncore">Permalink</a> |
	  <a href="http://mochiland.com/articles/mochi-community-contribution-creating-ally-ai-by-danny-buoncore#comments">2 comments</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/mochi-community-contribution-creating-ally-ai-by-danny-buoncore&amp;title=Mochi Community Contribution: Creating Ally AI by Danny Buoncore">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/mochi-community-contribution-creating-ally-ai-by-danny-buoncore" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/flash" title="View all posts in Flash Development" rel="category tag">Flash Development</a>, <a href="http://mochiland.com/category/mochiland/front-page" title="View all posts in Front Page" rel="category tag">Front Page</a>, <a href="http://mochiland.com/category/mochiland/game-design" title="View all posts in Game Design" rel="category tag">Game Design</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/mochi-community-contribution-creating-ally-ai-by-danny-buoncore/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FGS 2012 Advisory Board Interview Series: Jakub Dvorský</title>
		<link>http://mochiland.com/articles/fgs-2012-advisory-board-interview-series-jakub-dvorsky</link>
		<comments>http://mochiland.com/articles/fgs-2012-advisory-board-interview-series-jakub-dvorsky#comments</comments>
		<pubDate>Wed, 30 Nov 2011 01:51:07 +0000</pubDate>
		<dc:creator>Colin Cupp</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Mochi Media Announcements]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Publisher Feed]]></category>
		<category><![CDATA[Amanita Design]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[FGS 2012]]></category>
		<category><![CDATA[flash gaming summit]]></category>
		<category><![CDATA[Jakub Dvorsky]]></category>
		<category><![CDATA[Mochi Media]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=5892</guid>
		<description><![CDATA[FGS 2012 Advisory Board Interview Series This is part three in a series of interviews of the Flash Gaming Summit 2012 Advisory Board. This is your chance to get to know the folks who determine the content of Flash Gaming Summit, getting their thoughts on both the conference and the games industry in general. This week&#8217;s [...]]]></description>
			<content:encoded><![CDATA[ <p><a href="http://www.flashgamingsummit.com"><img class="alignleft size-full wp-image-5984" style="border: 0px;" title="fgs2012_interview_series_banner" src="http://mochiland.com/wp-content/uploads/2011/11/fgs2012_interview_series_banner.jpg" alt="" width="650" height="100" /></a></p>
<h1>FGS 2012 Advisory Board Interview Series</h1>
<p>This is part three in a series of interviews of the <a href="http://www.flashgamingsummit.com">Flash Gaming Summit 2012</a> Advisory Board. This is your chance to get to know the folks who determine the content of Flash Gaming Summit, getting their thoughts on both the conference and the games industry in general. This week&#8217;s Advisory Board interview features Jakub Dvorský, founder of <a href="http://amanita-design.net/">Amanita Design</a>. In case you have been living under a rock, their game <a href="http://amanita-design.net/games/machinarium.html">Machinarium</a> has been a huge success on iTunes, specifically hitting #1 on the iPad. Machinarium was also a <a href="http://www.flashgamingsummit.com/past-events/2010/awards.html">Mochis Award Show winner at FGS 2010</a> (Best Game Art category).</p>
<p>For more information on Flash Gaming Summit, including passes, speaking, or award show nomination information <a href="http://www.flashgamingsummit.com">please visit the conference website</a>.</p>
<p>&nbsp;</p>
<p><a href="http://amanita-design.net/index.html"><img class="alignleft size-full wp-image-5963" style="border: 0px;" title="Jakub Dvorsky" src="http://mochiland.com/wp-content/uploads/2011/11/jakub_dvorsky-Amanita_100x100_2.png" alt="" width="125" height="125" /></a><a href="http://amanita-design.net/index.html"><img class="alignleft size-full wp-image-5962" style="border: 0px;" title="amanita_logo_dark_500" src="http://mochiland.com/wp-content/uploads/2011/11/amanita_logo_dark_500.jpg" alt="" width="500" height="125" /></a></p>
<h2>Introduce yourself- who are you, how big is your team, and how do you participate in the Flash games industry?</h2>
<p>My name is Jakub Dvorský, I&#8217;m visual artist and game designer. In 2003 I founded the studio Amanita Design, which is now nine employees strong. We are focused mostly on developing independent games (built in Flash) but sometimes also on other projects like films, music videos or some experimental stuff.</p>
<h2>What did you do before? How did you first get into the Flash games industry? Tell us about your path.</h2>
<p>I grew up on 8bit computers and started making my own games when I was 15 on my first PC, I was in grammar school at that time. Later I went to the Academy of Arts in Prague to study animated film. When I was finishing the academy I created my first Flash game (Samorost) as my thesis project and later the same year founded Amanita Design.</p>
<h2>What has been your proudest moment since joining the Flash gaming community?</h2>
<p>I&#8217;m most proud of assembling our team &#8211; a bunch of great friends, professionals and passionate creators.</p>
<h2>What was your biggest challenge early on with Amanita Design? How does that compare to the types of challenges you face today?</h2>
<p>When I started making Flash games I was alone so the biggest challenge was programming &#8211; I was doing it myself which was very tough for me even on a basic level, my head is just chaotic for this kind of work. Nowadays we have a couple of excellent programmers so the biggest challenge is probably game design, more specifically how to make a game entertaining, challenging, accessible, new and original.</p>
<p><a href="http://mochiland.com/wp-content/uploads/2011/11/hires_Machinarium_namesti_2.png"><img class="alignleft size-full wp-image-5976" style="border: 0px;" title="hires_Machinarium_namesti_2" src="http://mochiland.com/wp-content/uploads/2011/11/hires_Machinarium_namesti_2.png" alt="" width="600" height="379" /></a></p>
<h2>Do you have any recommendations or advice for game developers who are trying to make a multi-platform &#8220;hit&#8221; game? What should they be focused on?</h2>
<p>The game must definitely be fresh, distinctive and original and at the same time perfectly executed and polished. Sounds easy right? :)</p>
<h2>What is it that you love the MOST about the Flash games industry?</h2>
<p>It&#8217;s easy to create a simple game and publish it on the web or as an app, so any idea can be quickly transformed into a real game and can be played by thousands of people all around the world. This is really  great because you can immediately see if it works or not and you can also improve your game according to the feedback you get from your players.</p>
<h2>What do you like the least?</h2>
<p>The bugs in Flash.</p>
<h2>How has the industry changed since you fist joined?</h2>
<p>The whole scene has changed, it was a completely different world when I started with Flash games. When I was searching the web for interesting interactive stuff, there were just a few really good websites and only a couple of games worth mentioning, nowadays there are tens of thousands of games, experimental interactive projects, art projects, websites and portals.</p>
<h2>The theme for FGS 2012 is &#8220;Maximize Your Game&#8221;. How do you think Flash game developers are maximizing their games today? What could they be doing better / differently?</h2>
<p>I&#8217;ll be repeating myself but I think the developers should try to be more original and brave, they should experiment more with art, game mechanics, narrative approaches and with the whole medium which is still unexplored and waiting for young adventurers who wants to create something really new.</p>
<h2>Where do you see the Flash games industry going? What’s in store for the future?</h2>
<p>A more interesting question to to me is &#8220;where is the games industry is going&#8221;? I think the future of the games industry is extremely bright because the medium will be broader and more serious in many ways. I see really big potential for creative people from various disciplines from artists, writers, designers and musicians to programmers and engineers.</p>
<h2>What part of Flash Gaming Summit do you enjoy or look forward to the most?</h2>
<p>The best part of almost every game conference or festival is always meeting other developers and players in person.</p>
<h2>In your opinion, why should people come out to FGS 2012? What should they expect from the conference?</h2>
<p>Similarly to my previous answer answer, the most valuable part of conferences for me is meeting some interesting people in person. It&#8217;s sometimes much more influential than weeks of reading, surfing or watching videos on the web.</p>
<p><em><strong>Thanks for your thoughts and insights Jakub, see you at FGS 2012!!</strong></em></p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Colin Cupp for <a href="http://mochiland.com">MochiLand</a>, 2011. |
	  <a href="http://mochiland.com/articles/fgs-2012-advisory-board-interview-series-jakub-dvorsky">Permalink</a> |
	  <a href="http://mochiland.com/articles/fgs-2012-advisory-board-interview-series-jakub-dvorsky#comments">No comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/fgs-2012-advisory-board-interview-series-jakub-dvorsky&amp;title=FGS 2012 Advisory Board Interview Series: Jakub Dvorský">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/fgs-2012-advisory-board-interview-series-jakub-dvorsky" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/front-page" title="View all posts in Front Page" rel="category tag">Front Page</a>, <a href="http://mochiland.com/category/mochiland/mochi-media-announcements" title="View all posts in Mochi Media Announcements" rel="category tag">Mochi Media Announcements</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/publisher-feed" title="View all posts in Publisher Feed" rel="category tag">Publisher Feed</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/fgs-2012-advisory-board-interview-series-jakub-dvorsky/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FGS 2012 Advisory Board Series: Carl Trelfa of thePodge</title>
		<link>http://mochiland.com/articles/fgs-2012-advisory-board-series-carl-trelfa-of-thepodge</link>
		<comments>http://mochiland.com/articles/fgs-2012-advisory-board-series-carl-trelfa-of-thepodge#comments</comments>
		<pubDate>Wed, 16 Nov 2011 01:22:30 +0000</pubDate>
		<dc:creator>Colin Cupp</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Games Industry]]></category>
		<category><![CDATA[Mochi Media Announcements]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Publisher Feed]]></category>
		<category><![CDATA[#FGS2012]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[FGS]]></category>
		<category><![CDATA[FGS 2012]]></category>
		<category><![CDATA[flash gaming summit]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Maximize Your Game]]></category>
		<category><![CDATA[Mochi Media]]></category>
		<category><![CDATA[thePodge]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=5848</guid>
		<description><![CDATA[FGS 2012 Advisory Board Interview Series This is part one in a series of interviews of the Flash Gaming Summit 2012 Advisory Board. This is your chance to get to know the folks who determine the content of FGS, and hear their thoughts on both the conference and the games industry in general. This week&#8217;s [...]]]></description>
			<content:encoded><![CDATA[ <p><a href="http://www.flashgamingsummit.com"><img style="border: 0px" src="http://mochiland.com/wp-content/uploads/2011/11/fgs2012_interview_series_banner2.jpg" alt="" title="fgs2012_interview_series_banner" width="650" height="100" class="alignleft size-full wp-image-5989" /></a></p>
<h1>FGS 2012 Advisory Board Interview Series</h1>
<p>This is part one in a series of interviews of the <a href="http://www.flashgamingsummit.com">Flash Gaming Summit 2012</a> Advisory Board. This is your chance to get to know the folks who determine the content of FGS, and hear their thoughts on both the conference and the games industry in general. This week&#8217;s Advisory Board interview features Carl Trelfa, Co-founder of <a href="http://www.thepodge.co.uk/">thePodge</a>.</p>
<p>For more information on Flash Gaming Summit, including passes, speaking, or award show information <a href="http://www.flashgamingsummit.com">please visit the conference website</a>.</p>
<p><a href="http://www.thepodge.co.uk/"><img class="alignleft size-full wp-image-5857" style="border: 0px;" title="Carl Trelfa" src="http://mochiland.com/wp-content/uploads/2011/11/hi-res.jpg" alt="" width="140" height="185" /></a><a href="http://www.thepodge.co.uk/"><img class="alignright size-full wp-image-5899" style="border: 0px;" title="thePodge" src="http://mochiland.com/wp-content/uploads/2011/11/podgelogo.png" alt="" width="299" height="193" /></a></p>
<h2>Introduce yourself- who are you, how big is your team, and how do you participate in the Flash games industry?</h2>
<p>Hi, my name is Carl Trelfa, chief Code Monkey at <a href="http://www.thepodge.co.uk/">thePodge</a>.  Our team consists of 3 people: Me, Jim and Sarah &#8211; we&#8217;re good friends and have been for years.  We make games!</p>
<h2>What did you do before?</h2>
<p>Over the years I&#8217;ve done a lot of jobs &#8211; most of them not worth mentioning, but immediately prior to setting up thePodge, I worked for a couple of Flash Games development companies &#8211; most notably Nitrome, where I worked for about a year.  Before that I worked for a web development agency and also worked on some freelance projects.  Jim and Sarah both have worked freelance in the past as well.  None of us like working for other people!</p>
<h2>How did you first get into the Flash games industry? Tell us about your path.</h2>
<p>I&#8217;ve always been into making games, since I was a kid &#8211; I taught myself to code when I was pretty young.  About 10 or so years ago, Jim and I set up a business where we made online games using Java (way back before the industry had really got going properly).  We did OK, but we both ended up getting &#8220;proper&#8221; jobs.  I got really fed up of doing work that I felt wasn&#8217;t making use of my skill-set (you know, stuff like working in call centres, fixing people&#8217;s internet problems) and decided to give freelancing a go.  I was pretty late into Flash to be honest, my first sponsored game was Extreme Sketch-Pak way back in 2007 &#8211; sponsored by Bubblebox followed by 3D Super Snowboarder and Santa Caught Christmas. Next I decided to make a Flash games portal, www.ussgames.com, which helped bag me the job at Fish In A Bottle (with thanks also to RobotJAM for that!).  I then came to realise that web design wasn&#8217;t really my thing. I really wanted to get into making Flash games full-time, and that&#8217;s when I saw that Nitrome was looking for coders &#8211; so I applied and spent a year there.  While working at Nitrome I kept in touch with my old friend Jim and we decided to make another Flash games web site, www.gamebods.com. The goal was to give this a nicer design than USSgames, and we would concentrate on having higher quality games as well as keeping our users (check it out &#8211; you can earn points and build your own Bod, which serves as your site-wide avatar!).  After a while I felt I was just scraping by (living in London is expensive!). As much as I loved working at Nitrome, I always wanted to work for myself- so Jim, Sarah and I decided we&#8217;d go ahead and set up our own game dev company&#8230;and here we are now, almost 2 years on!</p>
<h2>Why did you decide to form thePodge? How did you guys find each other?</h2>
<p>I think I pretty much covered this already in my previous answers, although I should add that Jim is a really great graphic artist and Sarah&#8217;s character design is awesome, so we thought between us we&#8217;d make a good team.</p>
<h2>What challenges did you encounter going from a solo developer to working in a team? Do you have any advice for developers who are thinking of making a similar decision?</h2>
<p>I don&#8217;t really think there were any challenges to be honest.  My art and graphics are not great so I tend to prefer working with an artist &#8211; if anything it means we can work on bigger projects.  If I were pressed to name a challenge, it might be trying to divide up the work effectively- the coder tends to become a bit of bottle neck towards the end of the project.</p>
<h2>What is the single most difficult challenge facing game developers today?</h2>
<p>I&#8217;d say making original games that are intuitive and also hold people&#8217;s attention.  You&#8217;ve got to be original, easy to play and interesting enough to hold the attention of people with 3 second attention spans.  Flash games are ten-a-penny to the average online player, if it doesn&#8217;t grab them immediately then they will go play something else.</p>
<h2>Do you have any advice for developers who want to form a small team?</h2>
<p>Just go for it.  It&#8217;s hard to give up the security of a full-time job, but there is nothing more rewarding than working for yourself, doing something you love!</p>
<h2>What has been your single biggest challenge in the Flash games industry? How does it compare to the types of challenges you face today?</h2>
<p>Getting games sponsored is always a challenge.  The industry has changed since I first got in to it &#8211; the sponsorship model probably makes it easier for developers to make some money, but to be honest I&#8217;m not sure it&#8217;s the best model in terms of long term income.  Probably building up your own site is the best way to go, which is obviously a challenge in itself, but I think should lead to more long term benefits.</p>
<h2>What has been your proudest moment since joining the Flash gaming community?</h2>
<p>Probably winning a Mochi Award with Inferno Meltdown last year.  We were not expecting that!</p>
<h2>What is it that you love the MOST about the Flash games industry?</h2>
<p>Making creative and original games.</p>
<h2>What do you like the least?</h2>
<p>Silly comments on games.  Sometimes we get people saying we should do things in our game that are already there and often the players don&#8217;t consider what would happen if we implemented their idea &#8211; some of them are just downright silly and would completely break the game or just make it so easy it wouldn&#8217;t be worth playing!  It&#8217;s impossible to please all the people all the time&#8230;although, to be fair we get a lot of very good comments as well and really good suggestions &#8211; a lot of which have made it into City Siege 3.</p>
<h2>How has the industry changed since you first joined?</h2>
<p>Companies like Mochi appeared and gave us in-game advertising!  Now anybody can make some money from their games.</p>
<h2>How do you think Flash game developers are &#8220;Maximizing their games&#8221; today? What could they be doing better / differently?</h2>
<p>I see a lot of Devs these days with splash screens at the start of their games, which in my mind is essential &#8211; everybody can make their branding more visible in their games.  We&#8217;re currently looking into ways to encourage click-throughs to our site, people signing up for our mailing list (which you can do within our games) and keeping them playing.  How do you get somebody to carry on playing the game even if they have already played all the way through?  We have an answer &#8211; in one of our latest games, Firebug, you actually earn a Golden Jellybean every time you complete a level perfectly which you can then spend on silly things like hats for the bug, alternate skins, tilesets, backdrops, and all that stuff.  We also offer a 5 bean incentive to click through to our site and a 10 bean incentive to sign up to our mailing list.  A lot of iPhone games work in a similar way &#8211; just look at Jetpack Joyride, it&#8217;s literally the same 30 seconds of gameplay over and over, the main incentive to carry on playing is to collect the coins and buy a new jetpack and the new jetpacks are purely cosmetic! Firebug is coming out very soon, look for it on our <a href="http://www.thepodge.co.uk">website</a>!</p>
<p><a href="http://mochiland.com/wp-content/uploads/2011/11/firebug_2.png"><img class="alignleft size-full wp-image-5905" style="border: 0px;" title="Firebug" src="http://mochiland.com/wp-content/uploads/2011/11/firebug_2.png" alt="" width="401" height="328" /></a></p>
<h2>Where do you see the Flash games industry going? What&#8217;s in store for the future?</h2>
<p>That&#8217;s a bit of touchy subject with Adobe dropping the mobile browser plugin, but I see that as a positive &#8211; if players can&#8217;t just play our games in their browser, then they have to buy them in the app store, which is a good thing.  I&#8217;ve personally never missed not having Flash on my iPhone!  I think we&#8217;ll see a lot of 3D games soon &#8211; I might add that a lot of them will be rubbish, 3D doesn&#8217;t make a good game.  Hopefully we&#8217;ll see some good 2D/3D cross over type games (Paper Mario style, maybe or just interesting effects like in K.O.L.M.) and some amazing stuff using Molehill to accelerate 2D games.</p>
<h2>What part of Flash Gaming Summit do you most enjoy or look forward to?</h2>
<p>I think maybe the <a href="http://www.flashgamingsummit.com/awards.html">Mochi Award Show</a>, but I&#8217;m sure there will be some very interesting <a href="http://www.flashgamingsummit.com/speakers.html">speakers</a> as well.</p>
<h2>In your opinion, why should people come out to FGS 2012? What should they expect?</h2>
<p>Well the theme is Maximize Your Game, so I think any developer has something to gain from going.  We all need to maximize our income and generally get the most from our games.</p>
<p>&nbsp;</p>
<p><em><strong>Thanks for taking the time to chat Carl, this is great insight (and I&#8217;m looking forward to playing Firebug!). For more info on FGS 2012, please visit the <a href="http://www.flashgamingsummit.com">conference website</a>.</strong></em></p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Colin Cupp for <a href="http://mochiland.com">MochiLand</a>, 2011. |
	  <a href="http://mochiland.com/articles/fgs-2012-advisory-board-series-carl-trelfa-of-thepodge">Permalink</a> |
	  <a href="http://mochiland.com/articles/fgs-2012-advisory-board-series-carl-trelfa-of-thepodge#comments">One comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/fgs-2012-advisory-board-series-carl-trelfa-of-thepodge&amp;title=FGS 2012 Advisory Board Series: Carl Trelfa of thePodge">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/fgs-2012-advisory-board-series-carl-trelfa-of-thepodge" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/front-page" title="View all posts in Front Page" rel="category tag">Front Page</a>, <a href="http://mochiland.com/category/mochiland/games-industry" title="View all posts in Games Industry" rel="category tag">Games Industry</a>, <a href="http://mochiland.com/category/mochiland/mochi-media-announcements" title="View all posts in Mochi Media Announcements" rel="category tag">Mochi Media Announcements</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/publisher-feed" title="View all posts in Publisher Feed" rel="category tag">Publisher Feed</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/fgs-2012-advisory-board-series-carl-trelfa-of-thepodge/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building A Retro Platform Game In Flixel, Pt. 1</title>
		<link>http://mochiland.com/articles/building-a-retro-platform-game-in-flixel-pt-1</link>
		<comments>http://mochiland.com/articles/building-a-retro-platform-game-in-flixel-pt-1#comments</comments>
		<pubDate>Thu, 03 Nov 2011 20:26:24 +0000</pubDate>
		<dc:creator>Photon Storm</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Flash Development]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Game Design]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Flixel]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Mochi Media]]></category>
		<category><![CDATA[Photon Storm]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=5618</guid>
		<description><![CDATA[Building a retro platform game in Flixel, Part 1 Note: This tutorial was originally written for .net magazine. I&#8217;m now allowed to publish it here, so read on and enjoy! Grab the files for download before starting! Retro style games are becoming more popular than ever online. Commonly referred to as &#8220;8-bit&#8221; these games have [...]]]></description>
			<content:encoded><![CDATA[ <p><strong>Building a retro platform game in Flixel, Part 1</strong></p>
<p>Note: This tutorial was <a title="My .net magazine " href="http://www.photonstorm.com/archives/1436/my-net-magazine-build-a-retro-game-in-flixel-article-is-now-out">originally written</a> for .net magazine. I&#8217;m now allowed to publish it here, so read on and enjoy! Grab the files for <a href="http://www.photonstorm.com/archives/2247/flash-game-dev-tip-12-building-a-retro-platform-game-in-flixel-part-1">download</a> before starting!</p>
<p>Retro style games are becoming more popular than ever online. Commonly referred to as &#8220;8-bit&#8221; these games have pixel-art graphics and &#8220;chip tune&#8221; music that apes the consoles of old, but often have surprisingly innovative gameplay mechanics. And Flash has turned out to be the perfect tool for creating them, as hit titles like <a href="http://adamatomic.com/canabalt/">Canabalt</a> and <a href="http://adamatomic.com/fathom" target="_blank">Fathom</a> demonstrate.</p>
<div id="attachment_2248" class="wp-caption alignnone" style="width: 417px"><img src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Fathom.png" alt="" /><p class="wp-caption-text">Fathom was one of the first games built with Flixel and is a good example of what it can do.</p></div>
<p>This may seem at odds with a technology known for its vector graphics and timeline animation. But under the hood Flash is perfectly capable of pushing around large volumes of pixels which is exactly what is required. Flixel is a game framework born from a desire to create 8-bit style games. But it has evolved into a powerful way to rapidly create games in Flash. With a strong community and plug-ins available it&#8217;s the perfect choice to create our game with. In this two part series we&#8217;ll explore how Flixel works and build a retro-styled platform game in the process.</p>
<p><a href="http://sandbox.photonstorm.com/netmag/Building%20a%20retro%20Flash%20game%20in%20Flixel%20Part%201.zip">Download the tutorial files</a> and look through the source code alongside reading the article, because for the sake of space not all of it can be included here and we&#8217;ve got a lot of ground to cover.</p>
<h2>Getting started</h2>
<p>For Windows users there is a guide on <a href="http://www.photonstorm.com/archives/1200/flash-game-dev-tip-6-setting-up-flashdevelop-and-flixel-for-the-first-time" target="_blank">installing FlashDevelop with Flixel</a>. On Mac OS X you can use Adobe Flash Builder. <a href="http://flashgamedojo.com/wiki/index.php?title=Hello_World_-_Flash_Builder_(Flixel)" target="_blank">FlashGameDojo has a tutorial</a> for this. Or run <a href="http://www.flashdevelop.org/community/viewtopic.php?f=9&amp;t=2463" target="_blank">FlashDevelop under Parallels</a>.</p>
<p>Even if you use FlashDevelop / Flash Builder already I&#8217;d still recommend following the guides so you become familiar with the Flixel package structure.</p>
<h2>Game Design Brief</h2>
<p>It helps to have a plan of your game <em>before</em> you start on it. While the plan should never restrict you from iterating your game during development, it will set a base ground on which to build. Here is a concise brief for our game:</p>
<p>&#8220;Player controls a chick who can run left/right and jump on platforms across a horizontally scrolling level. The environment is a lush green jungle with trees, grass, flowers and ruins to explore. There will be static and moving platforms and stars to collect. Collect enough stars and the level exit opens. Player cannot die by falling unless he hits the water. Animal baddies move around the platforms and are fatal to touch.&#8221;</p>
<p>From this brief we can instantly visualise how the game will look and play. This allows us to break the code structure into logical objects such as Player, Map, Star and Enemy. The artist can also create concept sketches to set the style of the game, and provide a point of reference for the pixel art.</p>
<div id="attachment_2249" class="wp-caption alignnone" style="width: 443px"><a href="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Nutmeg-Concept-Sketches-433x480.jpg"><img class="size-medium wp-image-2249" style="border: 0px;" src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Nutmeg-Concept-Sketches-433x480.jpg" alt="" width="433" height="480" /></a><p class="wp-caption-text">Concept Sketches These help set a visual style for the game, introduce main characters and act as a reference for the pixel art.</p></div>
<h2>It starts with FlxGame</h2>
<p>Open <em>Main.as</em> from the &#8220;Part 1&#8243; source folder:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Main <span style="color: #0033ff; font-weight: bold;">extends</span> FlxGame
<span style="color: #000000;">&#123;</span>
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">320</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">240</span><span style="color: #000066; font-weight: bold;">,</span> PlayState<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">60</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">60</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
forceDebugger = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>FlxGame is the wrapper for your whole game, setting up Flixel in the process. The call to <em>super</em> sets the resolution of our game (320 x 240), the initial State (PlayState), the zoom level (2) and the frame rates (60 fps).</p>
<p>While 320 x 240 may seem small at a zoom level of 2 it will display at 640 x 480. The up-scaling of retro games is a common trait that helps show-off the detailed pixel art. <em>forceDebugger</em> enables the built-in debugger which is activated by pressing the &#8216; key. This lets you view bounding boxes, collision, paths, variables, logs and save out game replays.</p>
<p>Your game can have only one FlxGame class, but it can have many State<em>s</em>. States are a way to split your game into logical sections. For example a <em>MainMenuState</em>, a <em>PlayState</em> with the guts of the game and a <em>GameOverState</em>. Only one State can be active at a time.</p>
<h2>Getting into a right State</h2>
<p>States in Flixel extend FlxState and they are the guts of your game. When the State is initialised it calls the function <em>create</em>. This is used to construct any assets or variables the game needs. Once your game is running Flixel calls the <em>update</em> function every frame. In Flash terms it&#8217;s the equivalent of an Enter Frame event. Here is where you handle anything that needs to happen continuously. We&#8217;ll use it to detect collision between game objects.</p>
<p>Inside the <em>create</em> function we make two types of object: the Player sprite and some platforms.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">player = <span style="color: #0033ff; font-weight: bold;">new</span> Player<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">32</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">floor</span> = <span style="color: #0033ff; font-weight: bold;">new</span> FlxTileblock<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">208</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">320</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">32</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">floor</span><span style="color: #000066; font-weight: bold;">.</span>makeGraphic<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">320</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">32</span><span style="color: #000066; font-weight: bold;">,</span> 0xff689c16<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span>player<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">floor</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>The <em>floor</em> variable is one such platform. Although we&#8217;ll replace it in the final game it&#8217;s a great rapid way to provide objects the player can jump on to test the physics. The objects are then added to the State, allowing Flixel to draw them when it renders the scene. It&#8217;s similar to <em>addChild</em> in native Flash and the order in which you add defines how they are drawn.</p>
<p>All player specific code is held in the Player class, represented here through the <em>player</em> variable. This keeps it organised and easy to re-use. Before we start that however we need to give our player some wings &#8211; quite literally &#8211; by preparing the sprite sheet.</p>
<div id="attachment_2250" class="wp-caption alignnone" style="width: 650px"><a href="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Player-Sprite-Sheet-640x182.png"><img class="size-medium wp-image-2250" style="border: 0px;" src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Player-Sprite-Sheet-640x182.png" alt="" width="640" height="182" /></a><p class="wp-caption-text">Nutmeg The sprite sheet for the pixel hero of our game, drawn in 16 x 18 sized frames.</p></div>
<p>Flixel can automatically create reversed frames so we only draw him facing right. The first frame is an idle pose. Frames 2 and 3 are the walk cycle, and frame 4 is a hurt expression. If you are more comfortable animating inside of Flash Professional then you can create a timeline sequence as usual, export it to a SWF and use a tool such as Grant Skinner&#8217;s Zoe (<a href="http://easeljs.com/zoe.html">http://easeljs.com/zoe.html</a>) to convert it to a sprite sheet.</p>
<p>Sprites in Flixel are called FlxSprite which is what our Player extends. These differ from regular Flash Sprites in that as well as graphics data they contain extra values to allow you to easily control physics, animation, direction, collision and rotation. Inside Player.as we&#8217;ve embedded the sprite sheet:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>Embed<span style="color: #000000;">&#40;</span><span style="color: #004993;">source</span> = <span style="color: #990000;">'../assets/player.png'</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span> <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> playerPNG<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Class</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>And then tell FlxSprite to use it:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">loadGraphic<span style="color: #000000;">&#40;</span>playerPNG<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> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">16</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">18</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>This tells Flixel  to chop the sheet into 16&#215;18 frames and create reversed versions. Animation works in a similar way to Flash MovieClips.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">addAnimation<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;walk&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">2</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">10</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>This creates a new animation sequence called &#8220;walk&#8221; which cycles through frames 0, 1, 0, 2 at a rate of 10 frames per second. The true parameter makes it loop. To play an animation you use its label:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;walk&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<h2>What goes up must come down</h2>
<p>Making the player sprite run and jump smoothly provides us with a great opportunity to explore ones of Flixel&#8217;s strengths: its plug-ins. Much like with WordPress and Drupal, the Flixel community release plug-ins which extend the framework further and ultimately save you time.</p>
<p>One such plug-in is FlxControl which is part of the Flixel Power Tools. They are included in the tutorial zips but are constantly updated, so check <a href="https://github.com/photonstorm/Flixel-Power-Tools" target="_blank">https://github.com/photonstorm/Flixel-Power-Tools</a> for updates. If downloading fresh there is a Getting Started guide in the Docs folder.</p>
<p>The plug-in needs to be activated and assigned to our player FlxSprite:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>FlxG<span style="color: #000066; font-weight: bold;">.</span>getPlugin<span style="color: #000000;">&#40;</span>FlxControl<span style="color: #000000;">&#41;</span> == <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
FlxG<span style="color: #000066; font-weight: bold;">.</span>addPlugin<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> FlxControl<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
FlxControl<span style="color: #000066; font-weight: bold;">.</span>create<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">,</span> FlxControlHandler<span style="color: #000066; font-weight: bold;">.</span>MOVEMENT_ACCELERATES<span style="color: #000066; font-weight: bold;">,</span> FlxControlHandler<span style="color: #000066; font-weight: bold;">.</span>STOPPING_DECELERATES<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">1</span><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> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>The parameters tell it that we want the sprite to accelerate and decelerate. If we didn&#8217;t pick this the sprite would start and stop immediately making the experience very abrupt.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">FlxControl<span style="color: #000066; font-weight: bold;">.</span>player1<span style="color: #000066; font-weight: bold;">.</span>setCursorControl<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><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> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
FlxControl<span style="color: #000066; font-weight: bold;">.</span>player1<span style="color: #000066; font-weight: bold;">.</span>setJumpButton<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;SPACE&quot;</span><span style="color: #000066; font-weight: bold;">,</span> FlxControlHandler<span style="color: #000066; font-weight: bold;">.</span>KEYMODE_PRESSED<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">200</span><span style="color: #000066; font-weight: bold;">,</span> FlxObject<span style="color: #000066; font-weight: bold;">.</span>FLOOR<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">250</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">200</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
FlxControl<span style="color: #000066; font-weight: bold;">.</span>player1<span style="color: #000066; font-weight: bold;">.</span>setMovementSpeed<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">400</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">200</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">400</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
FlxControl<span style="color: #000066; font-weight: bold;">.</span>player1<span style="color: #000066; font-weight: bold;">.</span>setGravity<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">400</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>This enables cursor control for the left and right keys, and sets SPACE BAR to be the jump button. The player can only jump if on the floor and will try to jump to a height of 200 pixels. setMovementSpeed allows the sprite to accelerate at 400px/sec up to top speed of 100px/sec. Modify these values to much lower or higher numbers to see the effect! Finally we set some gravity, pulling the player back down to earth. Try changing the gravity value to make the player float or drop like a lead balloon. The best thing you can do to learn about Flixel and its plug-ins is to mess around with them. You never know what might come out of it! I&#8217;ve seen whole game ideas born from what were code bugs, so it pays to experiment.</p>
<h2>Putting it all together</h2>
<p>Run the code at this point and you&#8217;ll see we have a cute little chick sprite who can run and leap around at will. It collides smoothly with the ground, and there&#8217;s even a platform to leap on. If you press the debug key (&#8216;) you can watch the physics values in real-time. Click the box icon in the top right to turn on the visual outlines.</p>
<div id="attachment_2251" class="wp-caption alignnone" style="width: 650px"><a href="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Test-1.png"><img class="size-full wp-image-2251" style="border: 0px;" src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Test-1.png" alt="" width="640" height="480" /></a><p class="wp-caption-text">We have lift off! A running and jumping player with platforms to leap on</p></div>
<p>Granted it isn&#8217;t quite Mario, but we&#8217;re not finished just yet.</p>
<h2>Building a Level Map with DAME</h2>
<p>Green blocks are all well and good, but we need a proper level for the player to explore. Flixel has built-in support for Tile Maps which are an efficient and fast way to construct game levels. Tile Maps work by using Tile Set in a series of tiles aligned to a fixed-size grid. Here is the Tile Set created for our game:</p>
<div id="attachment_2252" class="wp-caption alignnone" style="width: 650px"><a href="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Tileset-640x202.png"><img class="size-medium wp-image-2252" style="border: 0px;" src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Tileset-640x202.png" alt="" width="640" height="202" /></a><p class="wp-caption-text">The Tile Set used to draw the game map, complete with water, plants and platforms.</p></div>
<p>Each tile is 16&#215;16 pixels in size, and you can see that some of them join together to form game objects such as the platform in the bottom right. The organisation of the Tile Set is up to you (or your artist!), but it&#8217;s sensible to leave big chunks of empty tiles should you need to insert new tiles later on in development. Tiles are separated into two types: Tiles you can collide with, and tiles you never collide with. In Flixel this is determined by the tile number and is called the Collide Index. Every tile after the index is treated as a tile you collide with. In our Tile Set you&#8217;ll see on the top row items such as flowers, bushes and shrubs. These are all non-colliding tiles, as we don&#8217;t want our player getting stuck on flowers.</p>
<p>With our Tile Set created we now need to design the level. To do this we use a Tile Map Editor. For this tutorial we&#8217;ll use an editor called DAME. Although the interface takes some getting used-to, the actual map view in DAME is rendered directly with Flixel so you know for sure that what you see in the editor is how it appears in game.</p>
<p>DAME can be downloaded from <a href="http://dambots.com/dame-editor/" target="_blank">http://dambots.com/dame-editor/</a> and works on Windows, OS X and Linux. Create 3 map layers in DAME, one for the Sky background, one for the level itself and one for the stars which the player can collect. You can find our DAME maps by downloading the tutorial files and looking in &#8220;Nutmeg Part 2 &#8211; The Map&#8221;. With the Map Layer selected click on a tile in the Tile window and then paint with it, just like an art package:</p>
<div id="attachment_2253" class="wp-caption alignnone" style="width: 650px"><a href="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Map-Editing-with-Dame-640x360.png"><img class="size-medium wp-image-2253" style="border: 0px;" src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Map-Editing-with-Dame-640x360.png" alt="" width="640" height="360" /></a><p class="wp-caption-text">Tile Map Editor DAME in action showing part of the level created for the game</p></div>
<p>Once you are happy with the design of your level you can export the map data to a CSV file from the File ñ Export menu.</p>
<h2>Lights, Camera, Action</h2>
<p>Add a new class to the project called Level1 that extends FlxGroup. This is Flixel&#8217;s way of grouping display objects together and keeps our code logical and structured. We can also check for collision against a whole group, which is significantly faster than checking every element individually. Our map is held in a local variable:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">map</span> = <span style="color: #0033ff; font-weight: bold;">new</span> FlxTilemap<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">map</span><span style="color: #000066; font-weight: bold;">.</span>loadMap<span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> mapCSV<span style="color: #000066; font-weight: bold;">,</span> mapTilesPNG<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">16</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">16</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">31</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">add</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">map</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>loadMap takes our CSV map data exported from DAME, and an embedded Tile Set png and creates a Tile Map object which is then added to the group. The same process is repeated for the Sky background.</p>
<p>Back in the PlayState we add the level to the display. But before we can unleash the player we tell Flixelís camera system to follow them around and restrict the camera to the map boundary:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">FlxG<span style="color: #000066; font-weight: bold;">.</span>camera<span style="color: #000066; font-weight: bold;">.</span>setBounds<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">level</span><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: #004993;">level</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
FlxG<span style="color: #000066; font-weight: bold;">.</span>camera<span style="color: #000066; font-weight: bold;">.</span>follow<span style="color: #000000;">&#40;</span>player<span style="color: #000066; font-weight: bold;">,</span> FlxCamera<span style="color: #000066; font-weight: bold;">.</span>STYLE_PLATFORMER<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>The last task is to add a collision check into the PlayState update function:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">FlxG<span style="color: #000066; font-weight: bold;">.</span>collide<span style="color: #000000;">&#40;</span>player<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">level</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>With the map loaded, the camera set and collision running we can now test the game. The chick now happily bounces around the level, landing on platforms and not colliding with flowers.</p>
<h2>Sprinkling a little stardust</h2>
<p>Now we&#8217;ve a pretty landscape to traverse we&#8217;ll add stars for the player to collect, and display the total collected as a score in the game. Flixel has a text function called FlxText which we use to display the score:</p>
<p>&gt;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">score = <span style="color: #0033ff; font-weight: bold;">new</span> FlxText<span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
score<span style="color: #000066; font-weight: bold;">.</span>scrollFactor<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
score<span style="color: #000066; font-weight: bold;">.</span>scrollFactor<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>The score is added at the top left of the screen and has a scrollFactor of zero. This means the text will be locked in place at the coordinates given, and not scroll around as the camera moves.</p>
<p>In the DAME map the Stars layer was exported to a CSV file and weíll use this map data to create Star sprites. The function parseStars in the Level1 class works by looping through the CSV map data, and for every tile it creates a new Star sprite at those coordinates. All of these sprites are added to an FlxGroup called stars. In the PlayState update function we check to see if the player is colliding with a star:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">FlxG<span style="color: #000066; font-weight: bold;">.</span>overlap<span style="color: #000000;">&#40;</span>player<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">level</span><span style="color: #000066; font-weight: bold;">.</span>stars<span style="color: #000066; font-weight: bold;">,</span> hitStar<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>If a collision occurs this will call the function hitStar, passing in the two objects that collided, in this case the player and the star he hit. The star is removed from the game and the score increased:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">star<span style="color: #000066; font-weight: bold;">.</span>kill<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
FlxG<span style="color: #000066; font-weight: bold;">.</span>score <span style="color: #000066; font-weight: bold;">+</span>= <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>
score<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = FlxG<span style="color: #000066; font-weight: bold;">.</span>score<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toString</span><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; / &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #004993;">level</span><span style="color: #000066; font-weight: bold;">.</span>totalStars<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">toString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>Finally the score text is updated to show them how many stars they&#8217;ve collected, and how many are left. With this one small addition we&#8217;ve now got a real playable game with an objective to collect all stars:</p>
<div id="attachment_2254" class="wp-caption alignnone" style="width: 650px"><a href="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/nutmeg_preview1.png"><img class="size-full wp-image-2254" style="border: 0px;" src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/nutmeg_preview1.png" alt="" width="640" height="480" /></a><p class="wp-caption-text">Reach for the stars With the stars in place our game now has a purpose - try to complete the level</p></div>
<p>In part 2 we will introduce baddies for you to avoid, sound effects, a user interface (HUD) and Game Over sequence. If you feel inspired to build your own games be sure to visit <a href="http://flixel.org" target="_blank">http://flixel.org</a> which is home to a vibrant developer community. You&#8217;ll also find stacks of Flixel related tutorials at <a href="http://www.photonstorm.com" target="_blank">http://www.photonstorm.com</a> along with the Flixel Power Tools plug-ins. Finally for reference to the classic games of old <a href="http://www.retrogamingtimes.com" target="_blank">http://www.retrogamingtimes.com</a> is well worth a visit.</p>
<p>The following 2 parts were the &#8220;box-outs&#8221; that appeared in the print article. I&#8217;ve included them here because they&#8217;re interesting :)</p>
<h2>Adam Saltsman talks about why he created Flixel</h2>
<p>I guess it was around 7 years ago that I tried to make a little &#8220;game engine&#8221;, something that would allow me to make Super NES style games. It just seemed like a fun thing to do. After a few abortive attempts in C++ / Python / Java I finally settled on AS3. It was the pixel-level stuff in it that really interested me. However I&#8217;d grown very cautious about &#8220;engine building&#8221; and not actually making any games. So I stuck with AS3 and created game after game, and noticed which patterns evolved. The games kept getting more complex, and re-used code from previous projects, and eventually those parts I was seeing in every project got moved to their own folder. I think a lot (if not most) developers have a similar folder somewhere, just a pile of &#8220;really handy&#8221; code.</p>
<p>Originally this was just for me, something I&#8217;d use to sketch new game designs in. But it wasn&#8217;t long before I thought that with a little polish here and there I might be able to release it publicly. Turns out it needed a lot of polish (and still does), but I really like where it&#8217;s going. Lately I have been thinking a lot about how to &#8220;make stuff that matters&#8221;, which is a very loose idea, but something I obsess over, for better or worse. I think Flixel is a cool thing. It&#8217;s not really &#8220;art&#8221; in and of itself, but it contributes to the cultural food chain, and that makes me feel like a hero.</p>
<p>Eventually it would be great to add official support for a physics engine like Nape, and port it over to Molehill, the hardware-accelerated Flash Player by the end of the year. I am very hesitant to ever add game-specific features to the framework, but these all seem like good general systems and will just make making games easier and more fun.</p>
<p>At the risk of leaving out something awesome I would say the following games are shining examples of Flixel in action:</p>
<p><a href="http://adamatomic.com/canabalt/" target="_blank">Canabalt</a><br />
<a href="http://patkemp.com/wp-gallery/games/Station38.html" target="_blank">Station 38</a><br />
<a href="http://www.newgrounds.com/portal/view/522276" target="_blank">Tuper Tario Tros</a><br />
<a href="http://www.newgrounds.com/portal/view/555641" target="_blank">Cat Astro Phi</a></p>
<div id="attachment_2255" class="wp-caption alignnone" style="width: 539px"><a href="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Box-Out-1-Cat-Astro-Phi-529x480.png"><img class="size-medium wp-image-2255" style="border: 0px;" src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Image-Box-Out-1-Cat-Astro-Phi-529x480.png" alt="" width="529" height="480" /></a><p class="wp-caption-text">Cat Astro Phi Designed to look, sound and feel like a Gameboy Classic title it&#39;s a good example of what Flixel is capable of.</p></div>
<h2>Pushing Pixels</h2>
<h3>Mastering the style of pixel art</h3>
<p>Professional pixel artist Ilija Melentijevic explains how he created the artwork for Nutmeg:</p>
<p>Pixel art is a time-consuming but rewarding approach to creating game graphics. If you have little screen space such as on a mobile device, or are simply looking for that charm and precision it offers, then itís worth making the extra effort. Also, it&#8217;s incredibly fun!</p>
<p>It&#8217;s a good idea to start from the big picture. First make a mock-up of a game scene, defining the style, colours, characters, etc. Once you have such solid foundation it&#8217;s easy to turn it into actual game assets. Your art must fit and enhance the game, not just look nice on its own, so make sure everything reads well and speaks to the player in a consistent way. In a busy shooter, use colours to separate bullets from power-ups, or to make the foreground objects pop out. Immersion is a priority in any game, and understanding what&#8217;s going on plays a big part in this. Fire up your favourite games and look how the pros do it.</p>
<p>There are a number of tools you can use and they vary widely. Some people even use Microsoft Paint! Many professionals use Photoshop and it certainly gets the job done, but I prefer a dedicated pixel-oriented program. Closest to the industry standard is <a href="http://cosmigo.com" target="_blank">Cosmigo Promotion</a> which boasts an impressive set of features and will look familiar to Photoshop users. My personal favourite is the 100% free <a href="http://code.google.com/p/grafx2" target="_blank">GraFX2</a>. Currently it lacks animation, but otherwise provides for an unparalleled workflow and ease of use.</p>
<p>Make sure you join an active pixel art community that will provide both feedback and motivation. <a href="http://www.pixeljoint.com" target="_blank">PixelJoint</a> lets you comment, rate and vote on other people&#8217;s work, submit your own, and even take part in weekly challenges, perhaps the best way to hone your skills.</p>
<p>For a less casual approach consider <a href="http://pixelation.wayofthepixel.net" target="_blank">Pixelation</a>, a community focused on pushing the medium forward. Here you&#8217;ll find discussions on theory, game art analysis, collaborations and more. Many masters of the form frequent the forum, so it&#8217;s a great place to post your work to get some constructive critique.</p>
<p>View Ilija&#8217;s artwork at <a href="http://www.photonstorm.com/topics/art" target="_blank">http://www.photonstorm.com/topics/art</a></p>
<div id="attachment_2256" class="wp-caption alignnone" style="width: 650px"><a href="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Box-Out-2-Grafx2-640x457.png"><img class="size-medium wp-image-2256" style="border: 0px;" src="http://c251763.r63.cf3.rackcdn.com/wp-content/uploads/2011/09/Box-Out-2-Grafx2-640x457.png" alt="" width="640" height="457" /></a><p class="wp-caption-text">GraFX2 A lightweight and free (as in free beer) pixel-pushing program for Windows, Mac and Linux</p></div>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Photon Storm for <a href="http://mochiland.com">MochiLand</a>, 2011. |
	  <a href="http://mochiland.com/articles/building-a-retro-platform-game-in-flixel-pt-1">Permalink</a> |
	  <a href="http://mochiland.com/articles/building-a-retro-platform-game-in-flixel-pt-1#comments">7 comments</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/building-a-retro-platform-game-in-flixel-pt-1&amp;title=Building A Retro Platform Game In Flixel, Pt. 1">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/building-a-retro-platform-game-in-flixel-pt-1" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/flash" title="View all posts in Flash Development" rel="category tag">Flash Development</a>, <a href="http://mochiland.com/category/mochiland/front-page" title="View all posts in Front Page" rel="category tag">Front Page</a>, <a href="http://mochiland.com/category/mochiland/game-design" title="View all posts in Game Design" rel="category tag">Game Design</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/tutorials" title="View all posts in Tutorials" rel="category tag">Tutorials</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/building-a-retro-platform-game-in-flixel-pt-1/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Flash Game Friday Winner: Diamond Hollow II</title>
		<link>http://mochiland.com/articles/flash-game-friday-winner-diamond-hollow-ii</link>
		<comments>http://mochiland.com/articles/flash-game-friday-winner-diamond-hollow-ii#comments</comments>
		<pubDate>Fri, 07 Oct 2011 19:56:37 +0000</pubDate>
		<dc:creator>Colin Cupp</dc:creator>
				<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Flash Game Friday]]></category>
		<category><![CDATA[Game Showcase]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Publisher Feed]]></category>
		<category><![CDATA[Arkeus]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[Diamond Hollow II]]></category>
		<category><![CDATA[Mochi Media]]></category>
		<category><![CDATA[winner]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=5655</guid>
		<description><![CDATA[Winner&#8217;s Circle This week&#8217;s Flash Game Friday winner is Diamond Hollow II by Arkeus! If you like retro platformers, you are going love Diamond Hollow II. Arkeus creates a world beneath the surface, where you need to climb and defeat various creatures in order to get out. The closer to the surface you get, the [...]]]></description>
			<content:encoded><![CDATA[ <h1>Winner&#8217;s Circle</h1>
<p>This week&#8217;s Flash Game Friday winner is <a href="http://www.mochimedia.com/games/play/diamond-hollow-ii/">Diamond Hollow II</a> by <a href="http://iarke.us">Arkeus</a>!</p>
<p><a href="http://www.mochimedia.com/games/play/diamond-hollow-ii/"><img class="alignleft size-full wp-image-5688" style="border: 0px;" title="Diamond Hollow II_560X280" src="http://mochiland.com/wp-content/uploads/2011/10/Diamond-Hollow-II_560X280.png" alt="" width="560" height="280" /></a></p>
<p>If you like retro platformers, you are going love Diamond Hollow II. Arkeus creates a world beneath the surface, where you need to climb and defeat various creatures in order to get out. The closer to the surface you get, the harder the game becomes. That&#8217;s where the diamonds come in.</p>
<p>Armed with a powerful (and talking) gun built by some mad professor, you collect diamonds as you move through the levels. You can then redeem these diamonds to increase various things, from powering up your gun to increasing your character traits (such as &#8220;jump&#8221;, &#8220;agility&#8221;, etc.).</p>
<p>For the nostalgic gamers out there, this game has obviously been influenced by early Nintendo games. Everything from the graphics, sounds, and music makes this an awesome retro-platformer- congratulations Arkeus!</p>
<h2>Get To Know Arkeus</h2>
<h4>Tell me about yourself- how many people are on your team? Where are you based?</h4>
<p>My name is Lee Miller and I&#8217;m 23 years old. I live in Seattle, and I currently work as a solo developer on my projects.</p>
<h4>How long have you been making games? What did you do before?</h4>
<p>Currently game making is something I do in my free time (nights and weekends). I&#8217;ve been at it since middle school as it&#8217;s something I really enjoy doing. During the day I work as a software engineer on things completely unrelated to gaming, which creates a nice balance.</p>
<h4>What was your inspiration for &#8220;Diamond Hollow II&#8221;?</h4>
<p>My inspiration came from a simplistic climbing platformer I created for a 48 hour Ludum Dare competition. However, after releasing it I really wanted to expand it into something more than just a basic platformer. Drawing elements from some of my favorite series such as Zelda and Metroid, Diamond Hollow II grew into what it is today.</p>
<h4>What types of games do you like to create the most? What types of games do you like to play the most?</h4>
<p>I am absolutely in love with games that tie in RPG elements to their gameplay, and it&#8217;s something I love to do in my own games. However, rather than typical RPGs, I tend to prefer faster paced games such as platformers.</p>
<p>In bigger terms, I&#8217;m fascinated by large scale MMORPGs. They contain so many elements that appeal to me, particularly in regards to allowing me to compete against the entire world.</p>
<h4>How long is your game creation cycle? What is your process?</h4>
<p>I often come up with a large list of ideas that I want to work on, and jump back and forth between them, sometimes designing, or even prototyping many of them. Then, whichever one brings me the most joy in working on, I try to follow with through to the end. Sometimes, though, an idea comes at me so hard that it&#8217;s all I can think about, and I&#8217;ll often drop everything else to work on it. This often leads to many unfinished projects, but it keeps the development process fast and fun. Because it&#8217;s mostly weekends and some nights that I work on games (and I try to spend time on other things to overwhelm myself), it can take many months to get a project done.</p>
<h4>Are there any game developers that you admire or consider &#8220;rock stars&#8221;?</h4>
<p>In the world of big name developers, Blizzard and Bethesda Softworks are the two that stand out to me. More so than other developers, they don&#8217;t settle for anything less than amazing, and they never fail to deliver on that.</p>
<h4>What is it about making a new game that you enjoy most?</h4>
<p>The beginning of a project is always my favorite part. Starting with absolutely nothing and modelling it into a game excites me (and is another reason I often end up with many unfinished projects).</p>
<h4>Do you have any hot projects you&#8217;re working on right now?</h4>
<p>I&#8217;m currently juggling between four different games to determine which is going to become my next big project. Most my recent time has been going into designing and building some basic systems for a JRPG, and I believe that is the one I&#8217;ll be spending quite some time on. I&#8217;ve always wanted to make an epic RPG where I can create a deep story, so hopefully this one will stick and I&#8217;ll follow through with it until the end. Eventually though, I want to return to the world of Diamond Hollow and create a full-on metroidvania as a third entry in the series. :)</p>
<p><em><strong>Thanks Arkeus, and good luck on you next game!</strong></em></p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Colin Cupp for <a href="http://mochiland.com">MochiLand</a>, 2011. |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-diamond-hollow-ii">Permalink</a> |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-diamond-hollow-ii#comments">No comment</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/flash-game-friday-winner-diamond-hollow-ii&amp;title=Flash Game Friday Winner: Diamond Hollow II">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/flash-game-friday-winner-diamond-hollow-ii" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/flash-game-friday" title="View all posts in Flash Game Friday" rel="category tag">Flash Game Friday</a>, <a href="http://mochiland.com/category/mochiland/featured-games" title="View all posts in Game Showcase" rel="category tag">Game Showcase</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/publisher-feed" title="View all posts in Publisher Feed" rel="category tag">Publisher Feed</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/flash-game-friday-winner-diamond-hollow-ii/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Game Friday Winner: Wonderputt</title>
		<link>http://mochiland.com/articles/flash-game-friday-winner-wonderputt</link>
		<comments>http://mochiland.com/articles/flash-game-friday-winner-wonderputt#comments</comments>
		<pubDate>Fri, 30 Sep 2011 20:42:47 +0000</pubDate>
		<dc:creator>Colin Cupp</dc:creator>
				<category><![CDATA[Developer Feed]]></category>
		<category><![CDATA[Developer Spotlight]]></category>
		<category><![CDATA[Flash Game Friday]]></category>
		<category><![CDATA[MochiLand Topics]]></category>
		<category><![CDATA[Publisher Feed]]></category>
		<category><![CDATA[DampGnat]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[Mochi Media]]></category>
		<category><![CDATA[winner]]></category>

		<guid isPermaLink="false">http://mochiland.com/?p=5503</guid>
		<description><![CDATA[Winner&#8217;s Circle This week&#8217;s Flash Game Friday winner is Wonderputt by Damp Gnat! Wonderputt. Is. Awesome. That pretty much sums it up. The enjoyment of playing this game comes from two directions: the gameplay of putting the ball into the hole(s), and also from the fact that your interacting with a work of art. The [...]]]></description>
			<content:encoded><![CDATA[ <h1>Winner&#8217;s Circle</h1>
<p>This week&#8217;s Flash Game Friday winner is <a href="http://www.mochimedia.com/games/play/wonderputt/">Wonderputt</a> by <a href="http://www.dampgnat.com/">Damp Gnat</a>!</p>
<p><a href="http://www.mochimedia.com/games/play/wonderputt/"><img class="alignleft size-full wp-image-5661" style="border: 0px;" title="Wonderputt" src="http://mochiland.com/wp-content/uploads/2011/09/Wonderputt_560x280.jpg" alt="" width="560" height="280" /></a></p>
<p>Wonderputt. Is. Awesome. That pretty much sums it up. The enjoyment of playing this game comes from two directions: the gameplay of putting the ball into the hole(s), and also from the fact that your interacting with a work of art. The amount of polish in this game is just insane.</p>
<p>At first glance, you might think this is a simple game with a few holes of mini-golf. Then you start playing, and see beautifully animated meteors crash into the first hole to form the course. On the next hole, you realize that each hole is not as it seems as an alien spaceship controls the layout (and picks up a few cows). It may not look like it, but this is actually an 18-hole mini-golf course where animations transform and open up some of the unseen parts of the course.</p>
<p>If all of that weren&#8217;t enough, Wonderputt also has achievements and some nice social hooks that you can access from the game info screen. You can share your status, your score, time, individual hole score, and the number of collectables you found. Speaking of collectibles, these become available in &#8220;wonder&#8221; mode (which is unlocked once you have played the game in regular mode).</p>
<p>Wonderputt is a beautifully crafted game with great artwork, fluid animations, and great sound to boot. The extra game mode should make most players play at least twice, though I have personally played it approximately 20 times now. Go play this game, you&#8217;ll be glad you did. Congratulations Damp Gnat!</p>
<h2>Get To Know Damp Gnat</h2>
<h4>Tell me about yourself- how many people are on your team? Where are you based?</h4>
<p>I run an interactive arts &amp; animation studio called Damp Gnat in Brighton UK, which consists of just me at present, although I closely collaborate with sound &amp; web designers Stilton Studios and Redtone Media.</p>
<h4>How long have you been making games? What did you do before?</h4>
<p>I released my first online Flash game &#8211; Icycle in September 2009 (which took 4 months to make over 4 years) although my experience stretches back to a Commodore Amiga release (Odyssey) 16 years ago in collaboration with a school friend.  My college years led me into the animation industry where I worked on commercials, infomercials, music promos, series work and feature film intros as a drawn &amp; 3D CG animator &amp; compositor.  My role at Nexus Productions allowed me to have my fingers in all pies so these skills have been crucial to developing Flash games without a team of specialists.</p>
<h4>What was your inspiration for &#8220;Wonderputt&#8221;? How did you come up with this design concept?</h4>
<p>Wonderputt was actually built on the framework of <a href="http://www.adverputt.com/">Adverputt</a> but this time I wanted a rich and animated environment, free of integrated brands.  So as it had to be a full static isometric screen, I naturally looked towards styles and illustrators that use this perspective to full effect.  Everything from old encyclopedia illustrations and their geographic cross sections, to bar chart statistics and air fix kit assembly info graphics.  Isometric view also allows for playful illusions with space and structure, so M.C.Escher was an obvious influence there.  The final look ended up like a fusion between the rich bustling cityscapes of Eboy and the sublime light &amp; airy landscapes of Josh Keyes.</p>
<p>The real challenge in making Wonderputt was balancing playability with aesthetics.  Those two aspects of game design are constantly at war with each other.  It was very important to me that the game held together as an illustration at any one point during play.  The music was designed to be unobtrusive and to discretely set the mood.  References were from 70&#8242;s educational tv and nostalgic tracks that evoke the wonder of science.  Perhaps there&#8217;s a little homage/spoof in there too.</p>
<p>You can look back over the process in my <a href="http://www.dampgnat.com/wonderputtwip">development diary</a>.</p>
<h4>What types of games do you like to create the most? What types of games do you like to play the most?</h4>
<p>My main motivation is to innovate at least one aspect of each game and shake up how games are perceived.  There are fair reasons developers tend to stick to pixel art and tile maps, such as advantages in performance but this does seem to be keeping flash games anchored to a retro medium.  I don&#8217;t think I have a preference in specialising in a particular type of game, just so long as each one poses a creative challenge and reinvents.</p>
<p>I tend to play Wii sports games with family &amp; friends.  Otherwise its the Xbox360 and immersive games such as Assassin&#8217;s Creed, Red Dead, Portal etc.</p>
<h4>How long is your game creation cycle? What is your process?</h4>
<p>I seem to be putting one out a year.  Each project ranges between 4-6 months spread over durations between 1-4 years.  I really wish I could improve my turnover, but working alone holds me back a bit.</p>
<h4>Are there any game developers that you admire or consider &#8220;rock stars&#8221;?</h4>
<p>I&#8217;m an admirer of innovative auteurs of games such as Samorost, Windowsil, the Bridge Builders, Armadillo Run, Portal and Braid.  They&#8217;re all pushing the boundaries and offering unique interactive experiences.  The godfathers to me are developers such as David Braben, Peter Irvin and Jeremy Smith.</p>
<h4>What is it about making a new game that you enjoy most?</h4>
<p>I keep note books.  I write notes more than I draw.  This is probably an unhealthy thing for an artist but it seems to be the natural way I forge and incubate ideas.  Between this and prototyping a game has got to be the most enjoyable part of making a new game.  Results turn over quickly and the creation process is far more malleable than at the other end, the gruelling polish.  Releasing a game seems to bring stress and euphoria in equal measures :)</p>
<h4>Do you have any hot projects you&#8217;re working on right now?</h4>
<p>Icycle 2 is up next.  I have plans to really improve on the original in many aspects.  Hoping to release that early next year online and on iOS.  I&#8217;m extremely pleased with the port of the original, so I plan to release that together with the sequel.</p>
<p>&nbsp;</p>
<p><em><strong>Thanks Damp Gnat, we&#8217;re looking forward to Icycle 2!</strong></em></p>
 <div class='series_toc'></div>	<p></p>
	<hr noshade style="margin:0;height:1px" />
	<p>&copy; Colin Cupp for <a href="http://mochiland.com">MochiLand</a>, 2011. |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-wonderputt">Permalink</a> |
	  <a href="http://mochiland.com/articles/flash-game-friday-winner-wonderputt#comments">6 comments</a></p>
	<p>Add to <a href="http://del.icio.us/post?url=http://mochiland.com/articles/flash-game-friday-winner-wonderputt&amp;title=Flash Game Friday Winner: Wonderputt">del.icio.us</a></p>
	<p>Search blogs linking this post with <a href="http://www.technorati.com/search/http://mochiland.com/articles/flash-game-friday-winner-wonderputt" title="Search on Technorati">Technorati</a></p>
	<p>Want more on these topics ? Browse the archive of posts filed under <a href="http://mochiland.com/category/mochiland/developer-feed" title="View all posts in Developer Feed" rel="category tag">Developer Feed</a>, <a href="http://mochiland.com/category/mochiland/developer-spotlight" title="View all posts in Developer Spotlight" rel="category tag">Developer Spotlight</a>, <a href="http://mochiland.com/category/mochiland/flash-game-friday" title="View all posts in Flash Game Friday" rel="category tag">Flash Game Friday</a>, <a href="http://mochiland.com/category/mochiland" title="View all posts in MochiLand Topics" rel="category tag">MochiLand Topics</a>, <a href="http://mochiland.com/category/mochiland/publisher-feed" title="View all posts in Publisher Feed" rel="category tag">Publisher Feed</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mochiland.com/articles/flash-game-friday-winner-wonderputt/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

