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

<channel>
	<title>Bananattack!</title>
	<atom:link href="http://www.bananattack.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bananattack.com/blog</link>
	<description>An explosive fruit-flavored legacy of a mysterious man from the North. He's making games, and taking names!</description>
	<pubDate>Mon, 01 Mar 2010 20:00:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Spreading the webdev love.</title>
		<link>http://www.bananattack.com/blog/2009/07/26/spreading-the-webdev-love/</link>
		<comments>http://www.bananattack.com/blog/2009/07/26/spreading-the-webdev-love/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 00:06:43 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[bananattack]]></category>

		<category><![CDATA[gruedorf]]></category>

		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/?p=134</guid>
		<description><![CDATA[Hello!~ &#9829;&#9829;&#9829;
Yesterday I was bored, and one of my housemates was working on a webpage for fun. So I decided maybe I should try my hand at redoing my website so that it has minimal eyehurt and incorporates some of my colorful artwork.
I drew a rough mockup in pencil (which I scanned for interest&#8217;s sake):

Then [...]]]></description>
			<content:encoded><![CDATA[<p>Hello!~ &hearts;&hearts;&hearts;</p>
<p>Yesterday I was bored, and one of my housemates was working on a webpage for fun. So I decided maybe I should try my hand at redoing my website so that it has minimal eyehurt and incorporates some of my colorful artwork.</p>
<p><b>I drew a rough mockup in pencil</b> (which I scanned for interest&#8217;s sake):<br />
<a href='/images/miscellaneous/Bananattack.com%20Design.jpg'><img class='thickframe' src='/images/miscellaneous/Bananattack.com%20Design%20Thumb.jpg' alt='Drawing is fun!'/></a></p>
<p>Then I cracked open Photoshop and went to town. The end result, is what you see now! Here&#8217;s a thumbnail of the result anyways (showing the frontpage which is has a  larger, more detailed header):<br />
<img style='border: 0px;' src='/images/miscellaneous/Bananattack_2009-07-26.png' /></p>
<p>Just used about 3 layers for each image. A background color layer, an outline layer, and a &#8220;coloring&#8221; layer sandwiched between (The sky also had a separate &#8216;cloud&#8217; layer behind the banana but in front of the background). I painted them with the regular brush tool + pick, with a few well colors chosen in advance. Screw smudge and sponging and all those extras. Also didn&#8217;t use brush opacity settings.</p>
<p>Oh, and of course, a little bit of fighting with CSS and HTML, but not nearly as much now as I used to!<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
Today I took my rough prototype and mashed it into a Wordpress layout. Was relatively painless since it was mostly CSS changes, and a few elements being shifted around.</p>
<p>Oh, and <a href='http://www.luminance.org/'>Kael</a>, <a href='http://zarat.us/tra'>Zaratustra</a>, and <a href='http://giant-communist-robots.com/'>Andy</a> helped point out the hugeness of my old header through messaging on <a href='http://twitter.com/Bananattack/'>Twitter</a>. Thanks!</p>
<p>Anyways, that&#8217;s all I have to say for now. Games will be mentioned soon, I promise!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/07/26/spreading-the-webdev-love/feed/</wfw:commentRss>
		</item>
		<item>
		<title>History repeats, with delicious treats</title>
		<link>http://www.bananattack.com/blog/2009/07/10/history-repeats-with-delicious-treats/</link>
		<comments>http://www.bananattack.com/blog/2009/07/10/history-repeats-with-delicious-treats/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 19:41:11 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[brockoly]]></category>

		<category><![CDATA[C++]]></category>

		<category><![CDATA[game engine]]></category>

		<category><![CDATA[gruedorf]]></category>

		<category><![CDATA[lua]]></category>

		<category><![CDATA[plum]]></category>

		<category><![CDATA[unemployed]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/?p=118</guid>
		<description><![CDATA[Hello! Been a while since the last time we talked.
I am an inconsistent person, and I forget things. I quickly fell out of Gruedorf again. And I don&#8217;t really have much to show for it yet.
I haven&#8217;t been able to find a job since early May, but I&#8217;ve still been wasting a lot of time [...]]]></description>
			<content:encoded><![CDATA[<p>Hello! Been a while since the last time we talked.</p>
<p>I am an inconsistent person, and I forget things. I quickly fell out of Gruedorf again. And I don&#8217;t really have much to show for it yet.</p>
<p>I haven&#8217;t been able to find a job since early May, but I&#8217;ve still been wasting a lot of time struggling to find one. Sort of depressing, y&#8217;know?<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
Early after my last web job (which ended late May), I started working on a web paint tool, which I dubbed &#8220;Laser Toast&#8221;. It was pretty fun to make something interactive like that, especially since it was mostly in Javascript (and just a little PHP + JSON). It let you draw a super zoomed 64&#215;64 image. It worked pretty well in my tests on Opera and Firefox. But it would do terrible things in IE7, where apparently it was running out of memory or took a really long time manipulating DOM objects.</p>
<p>I gave up on that eventually after I got bored, but it was a fair deal of fun while it lasted.<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
In other news, I have been working on a 2D game engine, which I&#8217;ve called <b>Plum</b>. (This is actually a revision of Brockoly, but with <i>less</i> ridiculous-to-type/say name. It also has plenty of features that weren&#8217;t in Brockoly.) If you want an silly acronym, something funky like Platonically Loving Unicorn Machine, or Poetically Lavish Universe Maker will do the trick.</p>
<p>For starters I&#8217;ve got Lua scripting, FMOD Ex for audio, Corona for loading images, zlib for compression, zziplib for archives, and SDL for the input, timing, and video. Nothing too fancy.</p>
<p>I added a packfile loading mechanism. Packfiles ARE pretty useless, but I figure it&#8217;s nice to bundle Lua libraries (like splash screens or an &#8216;rpg&#8217; library) and stuff this way. To save myself time, I just use a ZIP format, renamed to .pit (Plums have pits&#8230; yep). I use zziplib to do the heavy lifting. And I made it so pretty much all my code properly uses ZZIP_FILE* instead FILE* for reading. I got to learn about the different &#8216;read&#8217; callback APIs for Corona and FMOD Ex in the process. Heh.</p>
<p>I&#8217;ve slowly been making the implementations for my sprite, tileset, map and world layouts. They are all written in Lua files! I decided this allows a lot more flexibility and less bugs than with that crappy language that I &#8220;invented&#8221; called Mungo, especially since the Lua API under C is pretty simple to use, and can easily do error checking. I do a bunch of checks to make sure the data is valid, and I also ensure that no control statements can appear by using &#8220;return &lt;Value Read From File&gt;&#8221; in a <code>dostring</code>.</p>
<p>Sprites are so far pretty much just images with animation strands defined. Eventually I want to add metadata so that information about a particular sprite can be stored in the format itself. But for the most part, it does 99% of the job I want the engine to do. The rest I envision will be user code written in Lua.</p>
<p>Tilesets are a little more advanced, but in different areas. For one, you can specify an <code>externalFile</code> attribute in your <code>tiles</code> table, which the engine will autoimport upon changes (provided that file exists). It saves imported data in the tileset format itself, and it keeps an SHA1 checksum to lower redundant reloading.</p>
<p>The data is a zlib compressed chunk of raw data, which is then base64 encoded so it can be stored in Lua. This was shamelessly ripped from ika.</p>
<p>I am still planning to add the other, more sophisticated features to the Tileset format. It needs a structure for &#8216;arrangements&#8217; which will denote preplotted tiles and obstructions. These would be useful for plotting an otherwise tedious collection of tiles, for something like a tree. The engine would not be capable of distinguishing what plotted tiles belong to which group without annoying amounts of extra info or sluggish pattern searching. So I decided the engine would know arrangement composition for plotting, but would become regular tiles once plotted. I figure this is a good enough.</p>
<p>There will also be &#8216;categories&#8217; for tiles, which help classify tiles and give them useful meta information. A tile can belong to many categories. This would be useful for assigning terrain costs to tiles in a tactical game, or as a way to accomodate autotile functionality. Entire arrangements could be added to a category, too, but the engine would add the individual tile components of the arrangement to the category rather than adding the actual arrangement. This is for sanity reasons, again.</p>
<p>And tilesets would have animations that can be assigned to tiles, that would be fully scriptable with strings like &#8216;F3W10F4W10F5W10R&#8217;. Any tile index would only be allowed to be used once across all animations, to allow there to be simplistic grouping, and have it so each tile has a transition into exactly one other tile.</p>
<p>I need to eventually add a cleanup mechanism to my file parser, so that after a data entry is parsed and stored, it can be safely deleted. The reason being, I don&#8217;t really want to keep large data strings in memory, if I&#8217;m ALSO.<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
So hold on, isn&#8217;t this whole making-a-game-engine thing pointless? You bet!</p>
<p>Do I consider it to be reinventing the wheel anymore? Not really. It&#8217;s more like mashing a bunch of wheels together in a horrible attempt to make a Frankenwheel. I&#8217;m generously reusing existing GPL/BSD/Public domain code, to save time and effort, and only rewriting the aspects that need to be changed to make this thing flexible. It&#8217;s targetted at being portable and fairly lightweight.</p>
<p>It&#8217;s mostly there though. In fact, it can do a lot of what Verge and ika can, without maps/tiles/sprites. This steps from the fact, there was a fair deal of inspiration off those. It also my own intuition to make reasonable decisions.</p>
<p>Note that this engine isn&#8217;t intent on replacing Verge or ika. It&#8217;s an exercise for me, first and foremost. If I can draw the interest of existing users when it&#8217;s release-ready, I guess that&#8217;s good. Ultimately, though, this is a tool for my use. To improve my software design decisions, to see if I can remedy problems I saw in other engines or if I will fall into a similar trap.</p>
<p>Some of my code was unnecessarily reinvented back in the Brockoly days, but I am really trying to harvest from existing frameworks, to modify and improve. A lot of these ideas are incompatible with Verge, but on the other hand, I could adapt Verge source to fit in my engine. There&#8217;s nitty gritty implementation things to blame there. But mostly, this is for fun.</p>
<p>Once I get a reasonable amount of engine done, making games will become much simpler.</p>
<p>If you want to play around with my engine, it&#8217;s available at Github under a BSD license. It guarantees only limited stability at this point, and some code needs serious refactoring but <a href='http://github.com/Bananattack/Plum/tree/master'>feel free to look here</a>.</p>
<p>Git is <i>awesome</i>, by the way. It had a bit of a learning curve at first, but I definitely like it a lot more than SVN now.</p>
<p>My repo includes a silly demo which shows a tileset loader test (might be removed soon), and (if you hit Enter) a simplistic rotating heart screen that does funky things when you click.</p>
<p>My repository also has a demo game called Maximum Yak Maniac, which I talked about last time I posted. It was pretty easy to remake, since it doesn&#8217;t require maps, sprites, or tiles. It just uses raw images and audio. Yay.<br />
&nbsp;<br />
&nbsp;<br />
&nbsp;<br />
So there you are. I&#8217;m unemployed, and writing a game engine in spare time. I have also been juggling a couple game projects, but I&#8217;m not really prepared to talk about them yet. Next time, maybe.</p>
<p>Also I didn&#8217;t really check the formatting too much while I writing this, it might be too wordy, in that case tl;dr sorry.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/07/10/history-repeats-with-delicious-treats/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yaks on steroids</title>
		<link>http://www.bananattack.com/blog/2009/05/18/yaks-on-steroids/</link>
		<comments>http://www.bananattack.com/blog/2009/05/18/yaks-on-steroids/#comments</comments>
		<pubDate>Mon, 18 May 2009 05:37:08 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[compo]]></category>

		<category><![CDATA[gruedorf]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/?p=107</guid>
		<description><![CDATA[So I didn&#8217;t remember to mention it, but, earlier this month, me and my housemate decided to make games in a little bit of a game making showdown. A horrible, horrible game showdown.
We had a few crazy rules for this competition, just to make things more interesting:

Our game had a random title was generated with [...]]]></description>
			<content:encoded><![CDATA[<p>So I didn&#8217;t remember to mention it, but, earlier this month, me and my housemate decided to make games in a little bit of a game making showdown. A horrible, horrible game showdown.</p>
<p>We had a few crazy rules for this competition, just to make things more interesting:
<ul>
<li>Our game had a random title was generated with the <a href='http://norefuge.net/vgng/vgng.html'>Video Game Name Generator</a>. We each got 5 rolls. At each roll, you decided if you&#8217;d keep it or not. If you kept it, you stopped rolling. Otherwise, you decided you would not use that name, and took another roll  (you couldn&#8217;t go back to old names).</li>
<li>Someone writes a theme or idea down on paper, and forces you to incorporate that into your game.</li>
<li>We had 24 hours to make the game.</li>
<li>No previously created code/art could be used (with the exception of code libraries, and premade fonts)</li>
<li>We had 30 minutes to brainstorm before the contest actually started, where we knew our idea and could plan, but couldn&#8217;t perform real work.</li>
</ul>
<p>&nbsp;<br />
&nbsp;<br />
My friend made <b>Advanced Battleship Mission</b>.<br />
He had to incorporate <b>Cel-shaded Goats</b> somehow.<br />
<a href='http://www.megaupload.com/?d=XUJI0MHA'>His game is downloadable here</a>.<br />
You need to protect your battleship from submarines, with the help of your trusty cel-shaded goat advisor!</p>
<p><b>Controls:</b><br />
WASD = move<br />
1 = sonar<br />
2 = nukes<br />
3 = mines<br />
mouse = fire cannon.</p>
<p>&nbsp;<br />
&nbsp;<br />
I made <b>Maximum Yak Maniac</b>.<br />
My friend was malicious and wrote down it had to be <b>Multiplayer</b>.<br />
<a href='http://www.bananattack.com/blog/maximum-yak-maniac/'>Here is what I came up with</a>.<br />
You (and a friend) are yaks with steroid addictions, and must out-do their opponent by having the most destructive roid-rage.</p>
<p><b>Controls:</b> listed in game.</p>
<p>It was a fun competition, and we said we&#8217;d need to do another retarded contest again sometime.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/05/18/yaks-on-steroids/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making a game out of progress does not help progress on making games.</title>
		<link>http://www.bananattack.com/blog/2009/05/18/making-a-game-out-of-progress-does-not-help-progress-on-making-games/</link>
		<comments>http://www.bananattack.com/blog/2009/05/18/making-a-game-out-of-progress-does-not-help-progress-on-making-games/#comments</comments>
		<pubDate>Mon, 18 May 2009 05:11:51 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[gamagame]]></category>

		<category><![CDATA[gruedorf]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/?p=105</guid>
		<description><![CDATA[Yeah, so, a couple posts ago, I mentioned Gamagame (The Game Making Game), which was supposed to be a fun way to keep tabs on what sort of progress I have left.
Unfortunately, it eventually got in the way of real progress for making games, along with school and the paid webwork I was finishing up.
So [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, so, a couple posts ago, I mentioned <a href='http://www.bananattack.com/blog/2009/03/26/the-game-making-game/'>Gamagame (The Game Making Game)</a>, which was supposed to be a fun way to keep tabs on what sort of progress I have left.</p>
<p>Unfortunately, it eventually got in the way of real progress for making games, along with school and the paid webwork I was finishing up.</p>
<p>So my idea to help me more efficiently make work on games eventually ended up with me become much, much, less effecient, as I got horrible horrible ideas to make a twitter app instead of making games like I was supposed to.</p>
<p>And even before I was obsessed with making a webapp for my progress tracking, the premise of the progress game was a bad one. It was penalizing me for not getting work done, which is fair, but it was based on &#8220;progress points&#8221; allocated earlier in the week. The thing is, later, I might realize one of the tasks requires a lot more work, and so it can&#8217;t be done for a very long time. So those would be wasted points. It didn&#8217;t focus on the big picture, so tasks would be arbitrary things, which might not even be relevant to actual game progress.</p>
<p>Anyways, I don&#8217;t care to talk about anymore. Gamagame, good bye.</p>
<p>I am going to make progress through traditional methods. Well-crafted design documents, implementation requirement documentation, and to-do lists. Prepare for further announcements, as I discuss recent game development.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/05/18/making-a-game-out-of-progress-does-not-help-progress-on-making-games/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Quest for Colour</title>
		<link>http://www.bananattack.com/blog/2009/04/12/quest-for-colour/</link>
		<comments>http://www.bananattack.com/blog/2009/04/12/quest-for-colour/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 10:50:54 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[art]]></category>

		<category><![CDATA[compo]]></category>

		<category><![CDATA[gruedorf]]></category>

		<category><![CDATA[map]]></category>

		<category><![CDATA[verge]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/?p=79</guid>
		<description><![CDATA[I remade my first compo game, Quest for Colour for fun this weekend. It was a neat experience. It taught me a lot about my old art and code, and how I&#8217;ve improved since then. I had plenty of head scratching puzzle along the way.
Among the improvements was a HUD showing the time limit, bits [...]]]></description>
			<content:encoded><![CDATA[<p>I remade my first compo game, <a href='http://www.bananattack.com/blog/quest-for-colour/'>Quest for Colour</a> for fun this weekend. It was a neat experience. It taught me a lot about my old art and code, and how I&#8217;ve improved since then. I had plenty of head scratching puzzle along the way.</p>
<p>Among the improvements was a HUD showing the time limit, bits collected in the current area, and overall completion percentage. Gave the player way way more time. Scrapped the old battle system, and replaced it with a quest to capture all the slimes. Although it&#8217;s sort of annoying it&#8217;s less so than the battle system that was there.</p>
<p><a href='/images/games/qfc1.png' class='noborder'><img class='thickframe' src='/images/games/thumbnails/qfc1.png' /></a><a href='/images/games/qfc2.png' class='noborder'><img class='thickframe' src='/images/games/thumbnails/qfc2.png' /></a><a href='/images/games/qfc3.png' class='noborder'><img class='thickframe' src='/images/games/thumbnails/qfc3.png' /></a><a href='/images/games/qfc.png' class='noborder'><img class='thickframe' src='/images/games/thumbnails/qfc.png' /></a></p>
<p>There was some god awful hideous work-around code, that I commented out and replaced with like one or two lines of new Verge. It shows how both Verge and my coding has evolved.</p>
<p>At any rate, it&#8217;s there to download and drool at now.</p>
<p>I can&#8217;t say I was fully satisfied with what I&#8217;ve done, but I&#8217;ve made the thing a little more presentable and thus more playable for everyone. It was a fun diversion. So, go <a href='http://www.bananattack.com/blog/quest-for-colour/'>check it out</a>.</p>
<p>UPDATE: Fixed more bugs with the game, and added a difficulty selector. With the addition of hard mode, which IS hard. If you switch maps which you haven&#8217;t cleared, all slimes return. Easy mode is the same difficulty settings as last update. Normal mode is slightly more challenging.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/04/12/quest-for-colour/feed/</wfw:commentRss>
		</item>
		<item>
		<title>We need Verge 3.14</title>
		<link>http://www.bananattack.com/blog/2009/04/09/we-need-verge-314/</link>
		<comments>http://www.bananattack.com/blog/2009/04/09/we-need-verge-314/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 06:49:14 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[lua]]></category>

		<category><![CDATA[LuaVerge]]></category>

		<category><![CDATA[verge]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/2009/04/09/we-need-verge-314/</guid>
		<description><![CDATA[Seriously need to sit down with Zeromus, and hammer out a release for Verge 3.14 already. These awesome Lua features are just sitting here being under utilized! :(
Both Textshmup and Resonance have been using the new LuaVerge, and new vx, and I need to share the love. In a more stable form.
When these things are [...]]]></description>
			<content:encoded><![CDATA[<p>Seriously need to sit down with Zeromus, and hammer out a release for <a href='http://www.verge-rpg.com/'>Verge</a> 3.14 already. These awesome Lua features are just sitting here being under utilized! :(</p>
<p>Both Textshmup and Resonance have been using the new LuaVerge, and new vx, and I need to share the love. In a more stable form.<br />
When these things are released, I can make sure <a href='http://www.wundermint.com'>ustor</a> updates his space game, and other people can convert.</p>
<p>Having this release also means we could possibly pave the way for a functional <a href='http://www.bananattack.com/stuff/VCtoLua.txt'>VergeC to LuaVerge converter</a>. This in turn would mean games with giant code investment, like Sully Chronicles or any number of Verge 3 RPG systems could be seamlessly converted into similar Lua code.</p>
<p>Okay remind me not to post at 3 in the morning again when I am half-asleep and have an exam first thing when I wake up. Okay later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/04/09/we-need-verge-314/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Anonymous Functions, and Textshmup: A retrospect</title>
		<link>http://www.bananattack.com/blog/2009/04/08/textshmup-a-retrospect/</link>
		<comments>http://www.bananattack.com/blog/2009/04/08/textshmup-a-retrospect/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 01:53:25 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[anonymous functions]]></category>

		<category><![CDATA[callbacks]]></category>

		<category><![CDATA[gruedorf]]></category>

		<category><![CDATA[lua]]></category>

		<category><![CDATA[LuaVerge]]></category>

		<category><![CDATA[OOP]]></category>

		<category><![CDATA[textshmup]]></category>

		<category><![CDATA[vx]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/2009/04/08/textshmup-a-retrospect/</guid>
		<description><![CDATA[Some of you may have recently played my 24h game textshmup. As expected, it wasn&#8217;t that well received. It was a bad concept to begin with, after all! :D
It was too hard to read quickly and type responses.  Audio cues and colored text were added to make the game slightly easier to react to, [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you may have recently played my <a href='http://www.bananattack.com/blog/2009/04/05/textshmup/'>24h game textshmup</a>. As expected, it wasn&#8217;t that well received. It was a bad concept to begin with, after all! :D</p>
<p>It was too hard to read quickly and type responses.  Audio cues and colored text were added to make the game slightly easier to react to, but even then, it was just too tedious. It was just a randomly generated endurance test, with no goal, and no intermediate tasks.</p>
<p>That said, I had fun making it! I mentioned last time that I made it in LuaVerge. I never mentioned why it was so quick to write. </p>
<p>Well let&#8217;s go!</p>
<p>For one, I used the <a href='http://www.bananattack.com/vx'>vx library</a> I had written. It came with the spiffy <a href='http://www.bananattack.com/blog/2009/01/25/minty-chewing-gum/'>nifty object-oriented class system</a> that I made.</p>
<p>I had my entire game use a single well-divided render/update loop, which boiled down to this:
<pre>
while true do
    Render()
    Update()
end</pre>
<p>I declare two lists which contain all the callbacks done by the render and update events:
<pre>render_list = {}
update_list = {}</pre>
<p>Here is <code>Render()</code>, in its entirety:
<pre>function Render()
    vx.screen:RectFill(0, 0, vx.screen.width, vx.screen.height, 0)
    for i, f in ipairs(render_list) do
        f()
    end
    vx.ShowPage()
end</pre>
<p>The <code>Render()</code> function starts by clearing the screen, then it iterates over all entries in the render list, and calls them all. At the end, it shows the changes on the screen. This was <i>ridiculously</i> nice to hook in new rendering events.</p>
<p>Similarly, here was my <code>Update()</code> code, which used frame-throttling so each update callback could be written in per-tick logic:
<pre>function Update()
    frame_limiter:Update()

    local i = 0
    while i < frame_limiter.gap do
        for _, f in ipairs(update_list) do
            f()
        end
        i = i + 1
    end
    vx.SetAppName(TITLE .. ' ' .. frame_limiter.frame_rate)
end</pre>
<p>Both of these worked great for global functions and static methods.</p>
<p>There was one issue with the way they were designed though. Which wasn&#8217;t immediately apparent, but here goes.</p>
<p>Say I made a class named <code>BlueBox</code>, which has an <code>x</code>, <code>y</code>, <code>x2</code> and <code>y2</code>. I declare a method for it like this.
<pre>function BlueBox:Draw()
    vx.screen:RectFill(self.x, self.y, self.x2, self.y2, vx.RGB(0, 0, 255))
end</pre>
<p>In Lua, the colon <code>:</code> in that function is syntax sugar for the following:
<pre>
function BlueBox.Draw(self)
    vx.screen:RectFill(self.x, self.y, self.x2, self.y2, vx.RGB(0, 0, 255))
end
</pre>
<p>Which is syntax sugar for:
<pre>BlueBox.Draw = function(self)
    vx.screen:RectFill(self.x, self.y, self.x2, self.y2, vx.RGB(0, 0, 255))
end</pre>
<p>See that &#8217;self&#8217; parameter? Well, earlier when I&#8217;m calling the functions, I go like this:
<pre>f()</pre>
<p>That&#8217;s a call with no arguments. If we try and add the method pointer for a particular blue box&#8217;s render, it will call it <i>without</i> passing self, so &#8217;self&#8217; is nil:
<pre>-- Won't pass the self parameter!
table.insert(render_list, self.Render)
-- Similarly, won't pass the self parameter!
table.insert(render_list, self:Render)
</pre>
<p>Thus object instances aren&#8217;t passed around. Not good!</p>
<p>So how do you pass around the &#8217;self&#8217; parameter to this list? Well, fortunately, Lua allows you to create anonymous functions, wherever you want because <a href='http://www.lua.org/pil/6.1.html'>functions are first-class values</a>. And these anonymous functions can be passed &#8220;upvalues&#8221;, which are local values defined in a scope outside the function.</p>
<p>Using these facts, I wrote a trivial fix to bind method pointers to their objects, and leave Render unchanged! I made a function that did the method wrapping for me:
<pre>function MethodPointer(self, meth)
    return function(...)
        return self[meth](self, ...)
    end
end</pre>
<p>The function is passed the &#8217;self&#8217; parameter and the method pointer to bind together, and it returns an anonymous function which will take care of calling, with &#8217;self&#8217; being passed automatically.</p>
<p>Then I can go add to the render_list and update list:
<pre>table.insert(render_list, MethodPointer(self, 'Render'))
table.insert(update_list, MethodPointer(self, 'Update'))</pre>
<p>This is actually <i>pretty close</i> to <a href='http://www.prototypejs.org/api/function/bind'>how Javascript gets around similar problems</a>, but with its definition of &#8216;this&#8217;.</p>
<p>This little tidbit allowed my various components of my game to plugged and unplugged from the main loop as it progressed.</p>
<p>For my text input, I used a callback to process commands when enter was pressed, using the same method pointer stuff. The callback passed around the piece of text, and would return <code>true</code> or <code>false</code> on whether or not the command was permissible. It was very nice.</p>
<p>Lua is just awesome. I love it.</p>
<p>Anyways. As you might see, coding isn&#8217;t really a colossal obstacle, with Lua around. Instead, the new obstacle is coming up with good ideas!</p>
<p>Something to remember for the next time I try and make a 24h game, and what I always need to consider, while making Resonance.</p>
<p>Catch you later, everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/04/08/textshmup-a-retrospect/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Slight site update</title>
		<link>http://www.bananattack.com/blog/2009/04/07/slight-site-update/</link>
		<comments>http://www.bananattack.com/blog/2009/04/07/slight-site-update/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 04:14:05 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[bananattack]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/2009/04/07/slight-site-update/</guid>
		<description><![CDATA[I made a few updates update to Bananattack. Nothing tremendously major, but probably noticeable.
Made the lime green unripe banana color in the header a little less pukey. Sharpened the Banana image moderately to look more crisp. I think both of these things make the top area of the page a lot nicer to look at.
Made [...]]]></description>
			<content:encoded><![CDATA[<p>I made a few updates update to Bananattack. Nothing tremendously major, but probably noticeable.</p>
<p>Made the lime green unripe banana color in the header a little less pukey. Sharpened the Banana image moderately to look more crisp. I think both of these things make the top area of the page a lot nicer to look at.</p>
<p>Made the font a bit smaller and not-Verdana, and I actually think this improved the readability of most text here. And I modified the way links are presented, so it&#8217;s more obvious from a glance which areas are clickable in my messages.</p>
<p>I also updated my <a href='http://www.bananattack.com/blog/about/'>About Page</a> somewhat! Now with moderately more awesome.</p>
<p>Oh, and I realized that my posts weren&#8217;t displayed tags at all with my custom template. Fixed that. So now you can &#8216;ooh&#8217; and &#8216;ah&#8217; at the horrendous categorization metadata you didn&#8217;t see before.</p>
<p>That&#8217;s all for now. I&#8217;m open for suggestions to improve this site more if you have ideas! :D</p>
<p>EDIT: Now with more visible pagination links! And less stupid when there ARE no previous/next pages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/04/07/slight-site-update/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Textshmup</title>
		<link>http://www.bananattack.com/blog/2009/04/05/textshmup/</link>
		<comments>http://www.bananattack.com/blog/2009/04/05/textshmup/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 20:35:37 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[24 hour game]]></category>

		<category><![CDATA[compo]]></category>

		<category><![CDATA[gruedorf]]></category>

		<category><![CDATA[lua]]></category>

		<category><![CDATA[LuaVerge]]></category>

		<category><![CDATA[shmup]]></category>

		<category><![CDATA[textshmup]]></category>

		<category><![CDATA[verge]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/2009/04/05/textshmup/</guid>
		<description><![CDATA[For my 24 hour game, I made a weird game. A text-based shoot-em-up. Think of a text adventure, played on the console, but the scenario is constantly updating. You have obstacles to avoid and enemies to blast. Your situtation is narrated, and you type text commands to avoid things.
You constantly move forward, and need evade [...]]]></description>
			<content:encoded><![CDATA[<p>For my 24 hour game, I made a weird game. <a href='http://www.bananattack.com/files/games/textshmup.zip'>A text-based shoot-em-up</a>. Think of a text adventure, played on the console, but the scenario is constantly updating. You have obstacles to avoid and enemies to blast. Your situtation is narrated, and you type text commands to avoid things.</p>
<p>You constantly move forward, and need evade the hills and ceilings of the game&#8217;s endless cave.<br />
As a result you need to adjust altitude to avoid things.<br />
Crashing into obstacles results in an instant death.</p>
<p>As you fly along, you will encounter enemies, who need to be taken out quickly.</p>
<p>You have lasers and missiles. Lasers are weak, but unlimited and fast firing.<br />
On the other hand, your missiles are powerful, but limited and slower firing, and recharge gradually as you go on.</p>
<p>Your shields protect you when engaged but gradually decrease in energy.<br />
Your shields charge and replenish when disabled.<br />
Your frame has limited health, and so as you go further in, toggling shields becomes crucial to survival.</p>
<p>At the end of a run, it displays the distance traveled, your score, and the enemies you destroyed.</p>
<p>It was all coded up in LuaVerge, making it ridiculously quick to code up.</p>
<p>So, now that&#8217;s it&#8217;s been introduced, <a href='http://www.bananattack.com/files/games/textshmup.zip'>download textshmup</a>.</p>
<p>UPDATE:<br />
Textshmup now has the ability to speed up/slow down your ship.<br />
The higher your speed, the less missiles you replenish, and the more obstacles you encounter.<br />
So it&#8217;s sort of a difficulty modifier, I guess?<br />
Also: it reports the time you were alive. I forget if it did that before, but whatever.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/04/05/textshmup/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Temporal Stasis</title>
		<link>http://www.bananattack.com/blog/2009/04/03/temporal-stasis/</link>
		<comments>http://www.bananattack.com/blog/2009/04/03/temporal-stasis/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 23:00:31 +0000</pubDate>
		<dc:creator>Overkill</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[gamagame]]></category>

		<category><![CDATA[gruedorf]]></category>

		<category><![CDATA[resonance]]></category>

		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.bananattack.com/blog/2009/04/03/temporal-stasis/</guid>
		<description><![CDATA[I&#8217;m putting this project on hold temporary, since I have exams. I also want to participate in Thrasher&#8217;s 24h compo idea tomorrow, and I want make a twitter app to automate Gamagame.
I will return sooner or later though. Later!
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m putting this project on hold temporary, since I have exams. I also want to participate in Thrasher&#8217;s 24h compo idea tomorrow, and I want make a twitter app to automate Gamagame.</p>
<p>I will return sooner or later though. Later!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bananattack.com/blog/2009/04/03/temporal-stasis/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
