<?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>Kalimat al-Mutafalsif &#187; Games</title>
	<atom:link href="http://thesnarky.com/category/interests/games/feed/" rel="self" type="application/rss+xml" />
	<link>http://thesnarky.com</link>
	<description>The Words of the One Who Calls Himself a Philosopher</description>
	<lastBuildDate>Mon, 24 May 2010 21:25:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Communist Sci-Fi GTA</title>
		<link>http://thesnarky.com/2010/05/23/communist-sci-fi-gta/</link>
		<comments>http://thesnarky.com/2010/05/23/communist-sci-fi-gta/#comments</comments>
		<pubDate>Mon, 24 May 2010 04:13:11 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Game Review]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[PS3]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=428</guid>
		<description><![CDATA[It's been a while since I posted a game review, partially due to life catching up with me, and partially sticking with some old favorites on the PS3. Then two weeks ago I got Red Faction: Guerrilla used from Gamefly for $5 after some rebates. I'll pay $5 to try a game, not too worried [...]]]></description>
			<content:encoded><![CDATA[<p>It's been a while since I posted a game review, partially due to life catching up with me, and partially sticking with some old favorites on the PS3. Then two weeks ago I got <a href="http://www.redfaction.com/">Red Faction: Guerrilla</a> used from <a href="http://www.gamefly.com">Gamefly</a> for $5 after some rebates. I'll pay $5 to try a game, not too worried about wasting that money, especially when the online media made it look fairly yummy. </p>
<p><strong>The Premise</strong><br />
So what's it all about? If I had to summarize the game in three words or less it'd be: "Communist Sci-fi GTA".Yes, I cheated by using some abbreviations, but still, that sums it up quite nicely. The game starts out with you meeting your brother on Mars, sometime in the not so close future. Mars has been colonized by Earth, and is controlled by a military group named the Earth Defense Force (EDF). They maintain control and security because at this point in the future we've ravaged Earth's resources, and we have to get our metals from Mars. </p>
<p>Of course, the game wouldn't have a plot without strife, and naturally the EDF has taken a turn for the totalitarian regime. This regime manifests itself in the typical ways, forcing workers to work long hours, illegal search and seizure, and, of course, executions. Naturally this angers you in the bottom of your 'just wanted to come and earn a living' soul, and you join up with the Red Faction. Red Faction being the stereotypical worker uprising, complete with pick-up trucks for APCs, mining tools for weapons, and cheesy lines on the underground radio broadcasts designed to uplift the huddled masses.</p>
<p><strong>The Game</strong><br />
Enough about the background, you'll learn all that and more in the opening cut-scene, how's the game play? I liked it... a lot. I'd even go so far as to say I loved it, if in a guilty-pleasure kinda way.</p>
<p><strong>Controls</strong><br />
The controls were for the most part intuitive and par for the course for a PS3 game. A few tidbits caught me, such as having a more accurate look at your targeting reticle be a toggle, rather than just a mode you'll drop out of after releasing the button. My biggest concern was the variance found amongst vehicle controls. In a normal car R2 goes forwards and L2 goes backwards (mostly). If you get into a car with a turret and shoot, it'll track to the nearest enemy... sorta. But, let's say you get into a tank? Now left thumb stick moves you forwards and backwards, right thumbstick is turret control, and you shoot with L1/R1. Oh, you're in a walker? Well if it has jump packs you'll be using the X button, though if it has rockets those will be L1/L2... ARG!</p>
<p>A unified control scheme there is not! Thankfully, the 3rd person perspective was as I'd expect, and most ordinary vehicles behaved correctly, most of the time.</p>
<p><strong>Physics</strong><br />
In a word, "fun". If I got two, perhaps "non-so realistic," but I'll stick with "fun". This game uses the Havok engine, which allows for a lot of fun stuff, such as an almost completely destructible environment. You can't impact the ground, but just about every building, vehicle, and sign can and will go kerblooey if met with sufficient force.</p>
<p>The buildings react fairly correctly, as far as I'd know having never taken down a building using det mines and a well placed dump truck. They teach you throughout the game how to take down buildings using more and more elaborate means, but basically if you find a building supported by anything, take out the anything and it'll crash down. They crash in the direction of the supports you removed, and if you're quick enough it'll come straight down. </p>
<p>Vehicle physics... not so good. Throughout the game I had issues with vehicles. I couldn't figure out why, but backing up in a car seemed it or miss. I always had to gas it a little forwards, then switch into reverse to get moving! Plus, you can climb many, many surfaces that you shouldn't be able to... things that are 75% grades that let you drive up them, for instance. Sure, "it's Mars" but still, all you ever had to do if you were stuck, was turn your tires slightly, and hit the gas. This technique, plus a dump truck, levels most buildings in fairly short order. Further, there were times I'd somehow ramp a vehicle over a small bump and find myself achieving darn near escape velocity, in my opinion. That said, it was awesome the time it happened on my way into an EDF camp and I smashed through a few buildings before coming to rest. </p>
<p>Overall, the physics were fun, and I'd say the quirks actually added to the fun, rather than detracting from it. </p>
<p><strong>Environment</strong><br />
The graphics weren't at the level of some games that can, say, load a new level before you drive across a continent, but they were quite good considering some of the vistas you can look at. Mars is fairly well done, lots of red, lots of dust, and, uh, somehow a breathable atmosphere. You can even stumble across the Mars rover if you go hunting for ore deposits, and no... it's not destructible <img src='http://thesnarky.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> .</p>
<p>The buildings are not very varied. After you destroy 5-10, you'll know exactly how to take them down in 30 seconds or less.</p>
<p><strong>Plot</strong><br />
The plot was kind of a typical Sci-Fi deal... you have colonists, oppressive military, easily predictable twists, but enjoyable overall.</p>
<p><strong>Combat</strong><br />
Combat I'm torn on. On the one hand it was fun once you started building up a repertoire of weapons. My typical load out for most of the game was my sledgehammer, det mines, grenade launcher, and an assault rifle. That let me deal with infantry (rifle/sledge, and yes, you'll use the sledge the entire game, and no, it never gets old), armor (mines/grenades), buildings (see previous), and buildings (all of the above). The controls for combat made sense, although felt a little simplistic coming from a lot of Call of Duty: Modern Warfare 2. </p>
<p>My big issue was the difficulty. I played through on 'Normal', but even then I was dying a... freaking... lot. What's more, I got the feeling the game was designed that way, as the death penalty was measly in my opinion. Not that I'm bothered by frequent deaths, but when the loading times after a death were 30 seconds or a minute, I'd keep a book on my table just in case. </p>
<p>And the last level? Let me just say this flat out: Take your time, do it right, it's designed to kill you. </p>
<p><strong>Missions</strong><br />
One of the game's strong points to me. There are a few main types of missions (Raids, Defense, Convoys, Couriers, and Heavy Metal). Heavy Metal was my favorite, and a great example of the diversity in the game. The basis is just "Kill X amount of Y EDF," where X is a number between 25 and 150, and Y is a vehicle or soldier. Sounds simple, but every one is different. In one you get a rocket turret, in another a tank, in a third a combat walker. They never get old. The same holds for raids, where you go in to either blow up a building or kill all defenders so they can blow it up. In some missions you'll hit an office building, or maybe a garage, or maybe a warehouse type building. Bottom line is while, yes, you can easily solve them all with one well placed theremobolic rocket, you'll need to adapt to the situation as you reach it. </p>
<p><strong>Overall</strong><br />
Overall I'd recommend the game off of Gamefly or used. I'll probably keep playing through (after beating the game they unlock a harder difficulty, and reopen all the missions to replay), so I'm glad to have my own copy. I can easily see this game becoming repetitive to some, and others getting annoyed at the vehicles and their controls, so maybe don't buy it right off.</p>
<p>There's a lot I didn't touch on for brevity's sake, and I need sleep. Salvage that you blow stuff up to get to upgrade your gear for instance. But then, some needs to be left up to the reader to find out. </p>
<p>Oh, and if you're looking for a multiplayer game, keep looking. I've spent a full two minutes in the lobby queue without enough people to start a game. </p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2010/05/23/communist-sci-fi-gta/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ray Casting in Scheme</title>
		<link>http://thesnarky.com/2010/02/23/ray-casting-in-scheme/</link>
		<comments>http://thesnarky.com/2010/02/23/ray-casting-in-scheme/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 04:50:26 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scheme]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=424</guid>
		<description><![CDATA[My last post was about getting started picking up Scheme again for use in the 7 Day Roguelike contest. Of note I mentioned that I had decided on using Gambit as I could nicely tie Scheme and C libraries together, which I wanted so that I could use ncurses to do all my terminal control [...]]]></description>
			<content:encoded><![CDATA[<p>My<a href="http://thesnarky.com/2010/02/23/library-7drl-import-rnrs/"> last post</a> was about getting started picking up Scheme again for use in the <a href="http://groups.google.com/group/rec.games.roguelike.development/browse_thread/thread/96fae2f059d0b2b2/88349386000aaa8b?lnk=raot">7 Day Roguelike contest</a>. Of note I mentioned that I had decided on using <a href="http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page">Gambit</a> as I could nicely tie Scheme and C libraries together, which I wanted so that I could use <a href="http://en.wikipedia.org/wiki/Ncurses">ncurses</a> to do all my terminal control (output and reading user input). </p>
<p>I got ncurses working, and managed to get a simple little walk around demo going. However I wanted something a bit deeper than just having the entire map visible from the start, so I poked back at some test code <a href="http://push.cx/">Harkins</a> wrote last year for Ruby (when I had aspirations of learning another language), and read up on <a href="http://http://roguebasin.roguelikedevelopment.org/index.php?title=Main_Page">Rogue Basin</a> for various examples. In the end I stole Harkin's map, and went with the pseudo code Elig created <a href="http://roguebasin.roguelikedevelopment.org/index.php?title=Eligloscode">here</a>.</p>
<p>Without further ado, the code busted apart into a few sections. (Full version can be found <a href="http://pastebin.com/WBDsz8Re">here</a>).</p>
<pre class="scheme">&nbsp;
<span style="color: #808080; font-style: italic;">;;Scheme ray casting/FOV demo</span>
<span style="color: #808080; font-style: italic;">;;Adapted from pseudo code found at</span>
<span style="color: #808080; font-style: italic;">;;http://roguebasin.roguelikedevelopment.org/index.php?title=Eligloscode</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Prep work for 7DLR 2010 (to brush back up on my Scheme)</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Global defines</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> char-x <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;x coordinate for the fake character</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> char-y <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;y coordinate for the fake character</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> VIEW-RADIUS <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;View radius for FOV demo</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;List of tiles we don't want to walk through (Walls and water)</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> IMPASSABLE-TILES <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">list</span> #\# #\~<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #808080; font-style: italic;">;;List of tiles that will break the ray casting (walls)</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> OPAQUE-TILES <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">list</span> #\#<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> 
&nbsp;
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> test-env <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">list</span>
                    <span style="color: #ff0000;">&quot;###################&quot;</span>
                    <span style="color: #ff0000;">&quot;#...#.............#&quot;</span>
                    <span style="color: #ff0000;">&quot;#...#...#~~~~~....#&quot;</span>
                    <span style="color: #ff0000;">&quot;#.......#~~~~~....#&quot;</span>
                    <span style="color: #ff0000;">&quot;###################&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>First I set up some variables to work with.</p>
<pre class="scheme">&nbsp;
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span style="color: #808080; font-style: italic;">;;Functions to create the environment;;</span>
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to create our working environment given an array of strings such as test-env</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> create-env
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env<span style="color: #66cc66;">&#41;</span>
            '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> <span style="color: #66cc66;">&#40;</span>create-env-row <span style="color: #66cc66;">&#40;</span>string-&gt;list <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>create-env <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function that helps create-env by creating a given row</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> create-env-row
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-row<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env-row<span style="color: #66cc66;">&#41;</span>
            '<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cons</span> <span style="color: #66cc66;">&#40;</span>create-env-cell <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env-row<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>create-env-row <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env-row<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to create a given env cell, helps create-env-row</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> create-env-cell
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-cell<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">list</span> env-cell #f<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>Next I define some functions to get a map (which is really a list of strings) to something we can work with (nested lists that act like a two dimensional array).</p>
<pre class="scheme">&nbsp;
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span style="color: #808080; font-style: italic;">;;Functions to display the environment;;</span>
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to write the env</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> write-env
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>write-env-help env <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function that does the brunt of the env write</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> write-env-help
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env x y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env<span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">newline</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                <span style="color: #66cc66;">&#40;</span>write-env-row <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env<span style="color: #66cc66;">&#41;</span> x y<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>write-env-help <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env<span style="color: #66cc66;">&#41;</span> x <span style="color: #66cc66;">&#40;</span>+ y <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function that writes a given row of the env</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> write-env-row
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-row x y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env-row<span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">newline</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                <span style="color: #66cc66;">&#40;</span>write-env-cell <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env-row<span style="color: #66cc66;">&#41;</span> x y<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>write-env-row <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env-row<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>+ x <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function that writes out a given cell of the env</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> write-env-cell
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-cell x y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>char <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env-cell<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;The symbol we'll possibly display</span>
              <span style="color: #808080; font-style: italic;">;;The boolean bit of the env cell that holds if its visible or not</span>
              <span style="color: #66cc66;">&#40;</span>visible <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cadr</span> env-cell<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> visible <span style="color: #808080; font-style: italic;">;;If this cell was marked to be seen</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span>= x char-x<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>= y char-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;Check if its where the character is</span>
                    <span style="color: #66cc66;">&#40;</span>print <span style="color: #ff0000;">&quot;@&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;If so, lets show an @ symbol</span>
                    <span style="color: #66cc66;">&#40;</span>print char<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;Else show whatever character should be displayed</span>
                <span style="color: #66cc66;">&#40;</span>print <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;If this cell wasn't marked to be shown, just put a space</span>
            <span style="color: #66cc66;">&#40;</span>print <span style="color: #ff0000;">&quot; &quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;Put a space after it for pretty printing</span>
&nbsp;</pre>
<p>Naturally you need some way to nicely see what's going on in your environment. That's what these functions do.</p>
<pre class="scheme">&nbsp;
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span style="color: #808080; font-style: italic;">;;Functions for the FOV demo;;</span>
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to update the FOV as a whole</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> update-fov
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env char-x char-y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>update-fov-help env char-x char-y <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function that does the actual work of updating the FOV</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> update-fov-help
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env char-x char-y x y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                <span style="color: #66cc66;">&#40;</span>update-fov-row <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env<span style="color: #66cc66;">&#41;</span> char-x char-y x y<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>update-fov-help <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env<span style="color: #66cc66;">&#41;</span> char-x char-y x <span style="color: #66cc66;">&#40;</span>+ y <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function that updates the FOV for a given row</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> update-fov-row
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-row char-x char-y x y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env-row<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                <span style="color: #66cc66;">&#40;</span>update-fov-cell <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env-row<span style="color: #66cc66;">&#41;</span> char-x char-y x y<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>update-fov-row <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env-row<span style="color: #66cc66;">&#41;</span> char-x char-y <span style="color: #66cc66;">&#40;</span>+ x <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function that does the real work to update a given cell's FOV</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> update-fov-cell
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-cell char-x char-y x y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>set-cell-visible env-cell #f<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;Set visible to false</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span>* <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>dx <span style="color: #66cc66;">&#40;</span>- x char-x<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
               <span style="color: #66cc66;">&#40;</span>dy <span style="color: #66cc66;">&#40;</span>- y char-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
               <span style="color: #808080; font-style: italic;">;;Get the distance between the character and the cell</span>
               <span style="color: #66cc66;">&#40;</span>distance <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">sqrt</span> <span style="color: #66cc66;">&#40;</span>+ <span style="color: #66cc66;">&#40;</span>* dx dx<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>* dy dy<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>&lt; distance VIEW-RADIUS<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;If we're within out viewing radius</span>
                <span style="color: #66cc66;">&#40;</span>set-cell-visible env-cell #t<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;set the cell to be shown</span>
&nbsp;</pre>
<p>Finally we get to the good stuff. This code is for the Field of View demo, which just shows everything within the sight radius. What it does, basically, is loops through every cell on the map, sets it to invisible (aka sets the cdr of the env-cell to be #f), and then checks to see how far from the player it is. If its within our view-radius, it then flips the visibility to true. Slow for big maps, but simple to implement.</p>
<pre class="scheme">&nbsp;
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span style="color: #808080; font-style: italic;">;;Function for the Ray casting demo;;</span>
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to clear the entire env</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> clear-cells
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                <span style="color: #66cc66;">&#40;</span>clear-cells-row <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>clear-cells <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function that clears a row of the env</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> clear-cells-row
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-row<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env-row<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                <span style="color: #66cc66;">&#40;</span>clear-cells-cell <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env-row<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>clear-cells-row <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env-row<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to clear a cell in the env</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> clear-cells-cell
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-cell<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>set-cell-visible env-cell #f<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to do the ray-cast</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> cast-rays
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env char-x char-y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>clear-cells env<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;Clear everything first</span>
        <span style="color: #66cc66;">&#40;</span>cast-rays-help env char-x char-y <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to do the real work of casting some rays</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> cast-rays-help
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env char-x char-y i<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>&lt;= i <span style="color: #cc66cc;">360</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>x <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cos</span> <span style="color: #66cc66;">&#40;</span>* i <span style="color: #cc66cc;">0.01745</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                  <span style="color: #66cc66;">&#40;</span>y <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">sin</span> <span style="color: #66cc66;">&#40;</span>* i <span style="color: #cc66cc;">0.01745</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                  <span style="color: #66cc66;">&#40;</span>trace-ray env char-x char-y x y <span style="color: #66cc66;">&#40;</span>+ char-x .<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>+ char-y .<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
                  <span style="color: #66cc66;">&#40;</span>cast-rays-help env char-x char-y <span style="color: #66cc66;">&#40;</span>+ i <span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to trace the specific ray to its end</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> trace-ray
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env char-x char-y x y dx dy i<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span>&gt; i VIEW-RADIUS<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span>* <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>cell-x <span style="color: #66cc66;">&#40;</span>round dx<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                   <span style="color: #66cc66;">&#40;</span>cell-y <span style="color: #66cc66;">&#40;</span>round dy<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                   <span style="color: #66cc66;">&#40;</span>cell <span style="color: #66cc66;">&#40;</span>get-cell env cell-x cell-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> cell
                    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                        <span style="color: #66cc66;">&#40;</span>set-cell-visible cell #t<span style="color: #66cc66;">&#41;</span>
                        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>cell-opaque? cell<span style="color: #66cc66;">&#41;</span>
                            <span style="color: #66cc66;">&#40;</span>trace-ray env char-x char-y x y <span style="color: #66cc66;">&#40;</span>+ dx x<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>+ dy y<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>+ i <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>The first three functions simply clear all the cells on the map. Unlike FOV our work functions aren't visiting every cell (we hope) and so we have to go through ahead of time and clear them out.</p>
<p>The rest of the functions do the ray casting. Starting at the character's position, it draws a line (trace-ray) out in a given direction. If it gets either past the view radius, or to a cell considered opaque, it doesn't recur. Otherwise it calls itself and continues stepping out. Trace-ray is called once per every 16 degrees around the circle. Its not entirely accurate, but its a lot faster than using 1 as the increment and drawing 360 rays. </p>
<pre class="scheme">&nbsp;
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
<span style="color: #808080; font-style: italic;">;;Random helper functions;;</span>
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to get a given cell</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> get-cell
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env x y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>get-cell-help env x y <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function does most of the real work to get a given cell</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> get-cell-help
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env new-x new-y y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>= y new-y<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>get-cell-x <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env<span style="color: #66cc66;">&#41;</span> new-x new-y <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>get-cell-help <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env<span style="color: #66cc66;">&#41;</span> new-x new-y <span style="color: #66cc66;">&#40;</span>+ y <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            #f<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Final helper to get a given cell</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> get-cell-x
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env-row new-x new-y x<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">null?</span> env-row<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>= x new-x<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> env-row<span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span>get-cell-x <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">cdr</span> env-row<span style="color: #66cc66;">&#41;</span> new-x new-y <span style="color: #66cc66;">&#40;</span>+ x <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            #f<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to tell if a cell is passable</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> cell-passable?
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span>
         <span style="color: #808080; font-style: italic;">;;Check to see if symbol is in our list of impassable tiles</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">member</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> cell<span style="color: #66cc66;">&#41;</span> IMPASSABLE-TILES<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> 
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to tell if a cell is opaque</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> cell-opaque?
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>cell<span style="color: #66cc66;">&#41;</span>
        <span style="color: #808080; font-style: italic;">;;Check to see if symbol is in our list of opaque tiles</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">member</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">car</span> cell<span style="color: #66cc66;">&#41;</span> OPAQUE-TILES<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> 
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to 'move' our 'character' to another cell</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> move-to
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env x y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>cell-passable? <span style="color: #66cc66;">&#40;</span>get-cell env x y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;Check to make sure they can move there</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set!</span> char-x x<span style="color: #66cc66;">&#41;</span> <span style="color: #808080; font-style: italic;">;;'Move' them by changing our global vars</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set!</span> char-y y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Function to set a given cell's visibility to the given boolean</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> set-cell-visible
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>cell bool<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>set-<span style="color: #b1b100;">cdr</span>! cell <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">list</span> bool<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>These functions simply help the above code look prettier. The first make the environment which is really just a list (in true Scheme form) behave more like a two dimensional array. Cell-passable? and opaque? check to see if a cell can be traveled into or seen through. Move-to moves the character, and set-cell-visible helps quickly toggle a cell's visibility.</p>
<pre class="scheme">&nbsp;
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;</span>
<span style="color: #808080; font-style: italic;">;;Test code;;</span>
<span style="color: #808080; font-style: italic;">;;;;;;;;;;;;;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Setup the environment</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> our-env <span style="color: #66cc66;">&#40;</span>create-env test-env<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Run the fov-demo</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> fov-demo
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>print <span style="color: #ff0000;">&quot;FOV demo, use h, j, k, and l to move, q to quit<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>update-fov our-env char-x char-y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>write-env our-env<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> read-loop <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>x <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">read-char</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">or</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">char=?</span> x #\q<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">char=?</span> x #\<span style="color: #b1b100;">newline</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">case</span> x
                        <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\<span style="color: #b1b100;">l</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>new-x <span style="color: #66cc66;">&#40;</span>+ char-x <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                     <span style="color: #66cc66;">&#40;</span>new-y char-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                    <span style="color: #66cc66;">&#40;</span>move-to our-env new-x new-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
                        <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\k<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>new-x char-x<span style="color: #66cc66;">&#41;</span>
                                     <span style="color: #66cc66;">&#40;</span>new-y <span style="color: #66cc66;">&#40;</span>- char-y <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                    <span style="color: #66cc66;">&#40;</span>move-to our-env new-x new-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
                        <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\j<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>new-x char-x<span style="color: #66cc66;">&#41;</span>
                                     <span style="color: #66cc66;">&#40;</span>new-y <span style="color: #66cc66;">&#40;</span>+ char-y <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                    <span style="color: #66cc66;">&#40;</span>move-to our-env new-x new-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
                        <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\h<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>new-x <span style="color: #66cc66;">&#40;</span>- char-x <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                     <span style="color: #66cc66;">&#40;</span>new-y char-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                    <span style="color: #66cc66;">&#40;</span>move-to our-env new-x new-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span>update-fov our-env char-x char-y<span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span>write-env our-env<span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span>read-loop <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">read-char</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">case</span> x
                    <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\q<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>print <span style="color: #ff0000;">&quot;--End of FOV Demo--<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
                    <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\<span style="color: #b1b100;">newline</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>read-loop <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">read-char</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Run the ray-casting-demo</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> ray-casting-demo
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span>env<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>print <span style="color: #ff0000;">&quot;Ray casting demo, use h, j, k, and l to move, q to quit<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>cast-rays our-env char-x char-y<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>write-env our-env<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> read-loop <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>x <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">read-char</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
            <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">or</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">char=?</span> x #\q<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">char=?</span> x #\<span style="color: #b1b100;">newline</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">begin</span>
                    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">case</span> x
                        <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\<span style="color: #b1b100;">l</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>new-x <span style="color: #66cc66;">&#40;</span>+ char-x <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                     <span style="color: #66cc66;">&#40;</span>new-y char-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                    <span style="color: #66cc66;">&#40;</span>move-to our-env new-x new-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
                        <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\k<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>new-x char-x<span style="color: #66cc66;">&#41;</span>
                                     <span style="color: #66cc66;">&#40;</span>new-y <span style="color: #66cc66;">&#40;</span>- char-y <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                    <span style="color: #66cc66;">&#40;</span>move-to our-env new-x new-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
                        <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\j<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>new-x char-x<span style="color: #66cc66;">&#41;</span>
                                     <span style="color: #66cc66;">&#40;</span>new-y <span style="color: #66cc66;">&#40;</span>+ char-y <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                    <span style="color: #66cc66;">&#40;</span>move-to our-env new-x new-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
                        <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\h<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>new-x <span style="color: #66cc66;">&#40;</span>- char-x <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                     <span style="color: #66cc66;">&#40;</span>new-y char-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                                    <span style="color: #66cc66;">&#40;</span>move-to our-env new-x new-y<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span>cast-rays our-env char-x char-y<span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span>write-env our-env<span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span>read-loop <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">read-char</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">case</span> x <span style="color: #808080; font-style: italic;">;;Enter or q was pressed</span>
                    <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\q<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>print <span style="color: #ff0000;">&quot;--End of Ray casting demo--<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> <span style="color: #808080; font-style: italic;">;;If q, lets quit</span>
                    <span style="color: #808080; font-style: italic;">;;If enter just read the next char, it happens</span>
                    <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>#\<span style="color: #b1b100;">newline</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span>read-loop <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">read-char</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> 
&nbsp;
<span style="color: #808080; font-style: italic;">;;Run our demos</span>
<span style="color: #66cc66;">&#40;</span>fov-demo our-env<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#40;</span>ray-casting-demo our-env<span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>And finally the test code. Both of these loops behave the same, they use typical roguelike controls to move up (k), down (j), left (h), and right (l), as well as (q) to quit. You'll notice I also had to catch enter or read-char would spit out the map twice. At the end we call both of these functions so we can show off both types, back to back.</p>
<p>So there you have it, simple ray casting done in Scheme. I'll note that its not exceptionally fast, in fact for my test map the FOV demo was far quicker, but by degrading the accuracy and reducing the number of rays drawn the speed gets back up to something decent. I suspect that may also have to do with drawing it all out to the terminal, and will see what happens when I plug this into my ncurses code at a later point.</p>
<p>Hope that's commented well enough in the code. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2010/02/23/ray-casting-in-scheme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>(library 7DRL (import (rnrs))</title>
		<link>http://thesnarky.com/2010/02/23/library-7drl-import-rnrs/</link>
		<comments>http://thesnarky.com/2010/02/23/library-7drl-import-rnrs/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 23:40:09 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scheme]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=413</guid>
		<description><![CDATA[7DRL Some friends were discussing the upcoming 7 Day Roguelike contest and I thought it'd be a fun thing to do after completing a browser based game in a month contest just a week back. However, I wanted to use something besides something besides the PHP I've been using for so very long, and somehow [...]]]></description>
			<content:encoded><![CDATA[<p><strong>7DRL</strong></p>
<p>Some friends were discussing the upcoming <a href="http://groups.google.com/group/rec.games.roguelike.development/browse_thread/thread/96fae2f059d0b2b2/88349386000aaa8b?lnk=raot">7 Day Roguelike contest </a> and I thought it'd be a fun thing to do after completing a <a href="http://community.bbgamezone.net/index.php/topic,2612.0.html">browser based game in a month contest</a> just a week back. However, I wanted to use something besides something besides the PHP I've been using for so very long, and somehow in the same IRC channel <a href="http://www.r6rs.org/">Scheme</a> came up.</p>
<p>Scheme is a LISP language that I learned back in college and very quickly grew a nice love/hate relationship. I love seeing the beauty of recursion expressed so easily, and I just hate to see so many parenthesis all over the place. Seriously they make your eyes bleed. But the idea hit me that it'd be fun to try to do the roguelike in Scheme, and I decided to enter. I most likely won't finish, and I'm not too happy with the idea I have, but it'll be fun nonetheless.</p>
<p><strong>Flavors</strong></p>
<p>To that end, I've been playing in Scheme for the past week to familiarize myself with a language I haven't touched in a few years and which has had some nice advances since that time. First job was getting it installed on Ubuntu. I'd recommend playing with various flavors and seeing what you like best. I tried <a href="http://www.gnu.org/software/mit-scheme/">Mit-Scheme</a>, <a href="http://scheme.com/">Chez Scheme</a>, <a href="http://www.plt-scheme.org/">PLT Scheme</a> (Dr Scheme), <a href="http://tinyscheme.sourceforge.net/home.html">Tiny Scheme</a>, and <a href="http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page">Gambit</a>. These can all be installed under Linux (fairly) easily, and all have upsides and downsides. </p>
<ul>
<li>MIT Scheme - I had used this a tad during school, but sadly they're not supporting R6RS, and don't have a full implementation of R5RS, so its essentially useless.</li>
<li>Chez Scheme - What my school used primarily. Has a copy of the <a href="http://www.amazon.com/Scheme-Programming-Language-4th/dp/026251298X/ref=sr_1_1?ie=UTF8&s=books&qid=1266964867&sr=8-1">Scheme Programming Language Version 4</a> free <a href="http://scheme.com/tspl4/">on their site</a> which is a big plus. They support all three major OS's and include an RPM/instructions for Debian installation.</li>
<li>PLT Scheme - The other product we used at school, it comes as a Scheme IDE with the ability to select from a variety of language subsets. The Ubuntu 9.04 package isn't up to date, but the package available on their site includes R6RS, so grab their install script and forgo synaptic. Big plus of being a fully featured IDE.</li>
<li>Tinyscheme - From the command line I actually liked this flavor the best. Sadly its a subset of the R5RS standard so it won't do everything you need, but for small proof-of-concept or test code, its nice and fast. I know it'd defeat the purpose, but I wish there was an R6RS version.</li>
<li>Gambit Scheme - This is a flavor I only came across this past week, had no prior experience with it. I love it. Again the version in the 9.04 Ubuntu repos is a bit old, so grab the newest version (4.6 as of now) <a href="http://www.iro.umontreal.ca/~gambit/download/gambit/v4.6/source/gambc-v4_6_0.tgz">here</a>. If you just want to use Gambit as an interpreter/REPL you're good to go. If you want to use it to spit out C code as well, you may need to make sure your gambit.h file is in the right location.</li>
</ul>
<p><strong>Gambit</strong></p>
<p>Yes, I said spit out C, as Gambit-C compiles your Scheme nicely into C files that gcc will then happily compile for you along with real C to use both languages. This is going to play greatly into my 7DRL as I wanted to use the NCurses library to handle my screen output and to I can easily include that now. An example of Hello World in Gambit Scheme with NCurses:</p>
<pre class="scheme">&nbsp;
<span style="color: #808080; font-style: italic;">;;Hello World example for Gambit/NCurses</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Include our headers</span>
<span style="color: #66cc66;">&#40;</span>c-declare <span style="color: #ff0000;">&quot;#include &lt;ncurses.h&gt;&quot;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Define the function</span>
<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">define</span> hello-world
    <span style="color: #808080; font-style: italic;">;;C lambda performs c commands, this is a basic ncurses</span>
    <span style="color: #808080; font-style: italic;">;;example that inits the screen, prints our string, waits</span>
    <span style="color: #808080; font-style: italic;">;;for input so it stays on the screen, and then kills the window</span>
    <span style="color: #66cc66;">&#40;</span>c-<span style="color: #b1b100;">lambda</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> int <span style="color: #ff0000;">&quot;initscr(); printw(<span style="color: #000099; font-weight: bold;">\&quot;</span>Hello World<span style="color: #000099; font-weight: bold;">\&quot;</span>); refresh(); getch(); endwin();&quot;</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">;;Gotta remember to call it!</span>
<span style="color: #66cc66;">&#40;</span>hello-world<span style="color: #66cc66;">&#41;</span>
&nbsp;</pre>
<p>Now link, compile, and run it:</p>
<pre>
snarky@Reaper$ gsc -link ncurses.scm
snarky@Reaper$ gcc ncurses_.c ncurses.c -lgambc -lncurses -o ncurses
snarky@Reaper$ ./ncurses
Hello World
</pre>
<p>(Of course, the above output is slightly tweaked as I'm opting not to take a screenshot of a terminal empty save for one string)</p>
<p>It should be noted that once you start including C in your scheme you can no longer use the Gambit Scheme Interpreter to test your code, so I'd recommend breaking those bits out into other files if possible. </p>
<p>There are some other great additions within the Gambit system, such as the ability to have optional arguments in your functions, keyed variables passed to functions, and some random extensions like vector-copy, as well as, obviously, in-lining C in your Scheme. I highly recommend checking our their <a href="http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html">manual</a> if you're at all interested. </p>
<p><strong>Gotchas</strong></p>
<p>I did get bit by a few things in Gambit, that I feel I should clarify. Even after reading through the manual, I missed that the compiler is spitting out linked files, not actual executables. To make sure you're getting an executable out of it make sure you do something akin to:</p>
<pre>
snarky@Reaper$ gsc -link file.scm
snarky@Reaper$ gcc file_.c file.c -lgambc
</pre>
<p>I very quickly just made a make file to handle it to simply forget about what steps go into it.</p>
<p>The big thing that bit me, however, was when I got out of the nice usual functions and into some higher syntax, specifically define-syntax. Gambit has a bunch of functionality turned off by default and requires that you turn it all on to use it. However I didn't feel like the documentation beat that into my head enough, so here's what you have to do:</p>
<p>For the interpreter:</p>
<pre>
snarky@Reaper$ gsi -:s
</pre>
<p>And for the compiler:</p>
<pre>
snarky@Reaper$ gsc -:s -link file.scm

OR

snarky@Reaper$ gsc -link -e '(load "/usr/local/Gambit-C/lib/syntax-case.scm")' file.scm
</pre>
<p>The top example turns a whole bunch of syntactic sugar on, while the bottom I believe just turns on some of the syntax. I could be wrong there.</p>
<p>I'm quite looking forward to playing with Gambit more and getting to know Scheme as I used to. Hopefully someone else can find a new sadistic language out of this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2010/02/23/library-7drl-import-rnrs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Game Review: Metal Gear Solid 4</title>
		<link>http://thesnarky.com/2009/01/06/game-review-metal-gear-solid-4/</link>
		<comments>http://thesnarky.com/2009/01/06/game-review-metal-gear-solid-4/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 03:41:44 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Game Review]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=269</guid>
		<description><![CDATA[Another game review coming at you, took about a week off for the holidays and worked in some PS3 time. Game: Metal Gear Solid 4 Developer: Kojima Productions System: PS3 Difficulty: Solid Normal (3rd highest of 5) Background Metal Gear Solid 4 is set in a bleak future where war is a driving force for [...]]]></description>
			<content:encoded><![CDATA[<p>Another game review coming at you, took about a week off for the holidays and worked in some PS3 time.</p>
<p>Game: <a href="http://ps3.ign.com/objects/714/714044.html">Metal Gear Solid 4</a><br />
Developer: <a href="http://www.konami.jp/kojima_pro/">Kojima Productions</a><br />
System: PS3<br />
Difficulty: Solid Normal (3rd highest of 5)</p>
<p><strong>Background</strong><br />
Metal Gear Solid 4 is set in a bleak future where war is a driving force for the world economy. Instead of standing armies, countries turn to Private Military Companies (only referred to as PMCs) to fight their wars, and the game portrays these wars as being purely for business sake. The soldiers are all kept in control by nanomachines running throughout their body, and every piece of equipment is 'tagged' to respond only if an authorized user is using it.</p>
<p>Full review below the cut.</p>
<p><span id="more-269"></span></p>
<p><strong>Graphics</strong><br />
By far the strongest suit of the game, the graphics are gorgeous. While not 'life-like' due to a slight anime feel, there are some sunset scenes that are just breath taking. The weapons look good, the way the characters move with their weapons looks even better: Very fluid, tactical motions. </p>
<p>The landscapes were breathtaking in some places. One level is a winter area, and during the course of the mission the snow intensifies and backs off. At some points you can't see a bad guy until you're on top them (and vice versa *grin*), and at others you can see clear across the map. Its very well done and sticks in my mind as perhaps the best level in terms of the graphics.</p>
<p><a href="http://www.videogamenews.org/wp-content/uploads/metal-gear-solid-4.jpg"><img alt="" src="http://www.videogamenews.org/wp-content/uploads/metal-gear-solid-4.jpg" title="MSG4 screen 1" class="alignnone" width="620" height="349" /></a></p>
<p>There are some slight annoyances when the camera just won't pan the right way for you to see around a corner, but I've never seen a game that was perfect with regard to camera controls. I didn't find any clipping problems either, even when eating grenades that I didn't see coming. </p>
<p><strong>Difficulty</strong><br />
The difficulty presented felt right. I really liked that there's two different 'medium' settings, as 'easy'/'medium'/'hard' a lot of times runs into medium being too easy, and hard being too hard (for a first play through). Solid Normal took me the right amount of time for a game, and gave me challenges, but very few places where the challenges were to the point of being frustrating. I'd recommend any experienced gamer start on Solid Normal. </p>
<p>Naked Normal is what my roommate started on, and it appears to be a good "I'm not a newbie" difficulty. You can get away with being fairly unstealthy, yet you can still die if you're very uncareful. I have a feeling the 'easy' setting (I don't know the name since I never bothered to look) will be easy for just about everyone, and that's never fun.</p>
<p>I also like how well the difficulty scales up. I just took a shot at the hardest (that I know of) difficulty (level 5, forget the name) and wow. It appears they scale up not just the damage, but how well the enemies perceive you. I died a few times in the first section, granted I was trying an end run past an APC for fun! There's enough difference between levels to make you want to play all of them (except 'easy') not just skip between.</p>
<p><strong>Gameplay</strong><br />
This isn't a tactical shooter, and to approach it as such will result in some frustration. To appreciate the gameplay you must get into character and get your Ninja on. I enjoyed this much as I did back in <a href="http://thesnarky.com/2008/04/07/assassins-creed/">Assassin's Creed</a>, but thought that it was also stifling in a few places.  </p>
<p>First off the good bits: When you're stealthing around, the game feels right. Its easy to tell how noisy you're being, which way the wind's going (make sure there's no guards down wind if you're going to smoke), and how concealed you are. Once you get on a good roll slinking through a village everything's great. You can distract guards by knocking on walls, get them to poke their heads around corners, and all manner of fun tricks before giving a good hip throw and putting them down. </p>
<p>You don't need any fancy tricks to get by, but if you want to learn them, just go to 'Briefing' under the pause menu and they'll show them all to you. I found this very helpful, and the tricks do increase the gameplay. Rather than put a guard to sleep with your tranq gun, you can just distract him to leave position and walk past. Bingo, no body to have to hide. </p>
<p>The bad part comes after you're discovered and the guards are alerted. Your maximum movement speed stays the same, and there's no sprint. To me this is an issue, a big one, because it severely impacts the player's ability to get away once an alert goes out, thus forcing him to fight his way through at least some number of guards. As you kill more, the alert refreshes (unless you kill all the guards in the area) and more keep popping. I got very frustrated a few times on bigger maps where you couldn't hope to fight your way through the guards because too many would be still coming, and you just have to run. I'm sorry, saunter. In my mind Snake is the best of the best, and as such would know how to run, and to not include that detracts from the immersion.</p>
<p>Now, by doing this they make you play stealthy, and I can easily see how over powered the player would be if he could run through most levels (and there were a few I just high-tailed it through, shooting only when the guards had closed in) and shoot willy-nilly.</p>
<p>The really bad part is that some bits are forced to be slow. I don't mean stealthy slow, I mean you have to crawl on your hands and knees because that's the only thing available from all your commands. You have to fight in slow-motion for a few minutes. These parts are maddening.</p>
<p>The worst is a bit traveling through a ship, at first you're just stumbling along, and then, and I couldn't believe this, you fall to your knees. At this point you have to press the triangle button. You fall again. Now you have to crawl, for what feels like a few minutes, spamming the triangle button. This is singly the worst part of the game, and a HORRIBLE decision. I'm young and in decent shape, and not only my thumb, but my wrist, and my arm were sore after that part. It blows my mind that someone thought this was a good idea. Due to how close to the end this part is, I probably won't replay it, but consider the game 'beat' at that point.</p>
<p><strong>Combat</strong><br />
The combat system is decent and it does effectively capture both tactical firefights and stealth operations. However I found that without customizing the main weapons you use, the combat system is very hard to use. That's on purpose, but I've met people who simply never realized they could customize weapons in the game. Believe me, without a fore-grip on a few of the guns, you won't be able to get more than 3 rounds on target before you have to stop firing and this makes the combat system very frustrating. </p>
<p>Now once you do customize the guns, they get fun. I really liked that they took modern guns that are very adaptable and let you put real-life attachments on them. For instance, my M4 in the game ended up with a laser, red-dot sight, fore-grip, and suppressors, allowing me to: Fire at enemies without allowing them to get a good bead on my position; Go full auto and stay on target (for the most part); See what I'm shooting at, and have a nice red-dot scope to look through in FPS mode. The default M4 has a hit-area about the size of a shotgun blast so its very hard to tell exactly what you're aiming at, jumps all over when shooting, and makes you use the iron sights (much smaller picture). </p>
<p>Customizing the guns made the game seem unique to my play style, as I could keep my M4 for silent engagements, a Mk. 17 for when the guards are already alerted, and an XM8 for the underslung grenade launcher in case I faced waves of robots. I was still experimenting on the bets mix by the time the game ended and could easily have kept playing around with it. </p>
<p>The silent combat is fairly straight forward, simply hitting the attack button while near your opponent, but it gets fun with moves like holdin the guy you grabbed as a shield, or using an injector to put them to sleep. Unfortunately I felt that the stealth combat was just... easy. If I got near someone, even a group of guards, I could take them out unarmed.</p>
<p>It should be noted that the boss fights are very fun. There's 5 unique bosses, although I honestly found the first and the last to be much harder than the others. Your style of combat will chance for each boss, and they do feel like true 'boss' fights, much harder than the other encounters in the game. I don't want to spoil any of them so I won't go into any more detail.</p>
<p><strong>Cutscenes</strong><br />
My gripe. This game has a reported 90 minute cutscene, and overall I'd guess easily over 24 hours of 'movie'. The upside is that they let you pause the movies or skip them. The downside, and this is a major oversight, is I've yet to find a way to watch those movies once I've skipped them! To include that much cinematography and essentially force you to watch it if you want the plot info is just wrong. (Please, if I'm just being dumb and can't find it, someone tell me where it is). The cutscenes are gorgeous, but they're also long, unnecessarily so it feels like. There's a few that I saw on my roommate's game that included almost random dialog. Good dialog, but to me it felt 'extra', and that it could have been taken out.</p>
<p>The length overall is also just mind-bloggling. There were whole levels with one save point in them, and then I saved three times for the cut-scenes (once before, once during, once after)!</p>
<p>I didn't watch a single cut-scene other than the ones on my roommate's game, and the final one. It turns out I didn't even see HALF the final one, I walked away when the credits started rolling, came downstairs a while later and there was talking again! It blew my mind!</p>
<p>The upside here is that there's only one case where they give you vital information (I dunno, maybe they give you tips to help on the bosses?) in the cut scenes. Thankfully that one is very short, and in the middle of a level.</p>
<p><strong>Story</strong><br />
Wouldn't know, see above.</p>
<p>Ok, I know some of the story,  and that bit seemed ok. Howeve, while they say this game stands on its own, I think you have to know former MSG lore to understand a lot of it. I've never played the previous MSGs, so I felt a bit lost in a few places as my roommate exclaimed: "That's so-and-so!"</p>
<p>Story is important for me deciding I really like a game or not, and sadly in this case I just can't speak to it. While I could have sat through all the videos, I wasn't about to spend unknown amounts of time during fixed amounts of play time watching, rather than playing. If I have an hour for the PS3, I want that hour to be mostly gameplay.</p>
<p>I won't count against MGS4 in the story category, because it was my choice to skip the cutscenes, however many games have managed to drive the story without such heavy cutscenes and only using the cutscenes is definitely a bad choice on the part of the developers.</p>
<p><strong>Political Undertones</strong><br />
These weren't undertones so much as slap-you-in-the-face-tones. From the very first cutscene/newbie zone it was evident what path the writers were going down, though to be honest its the obvious choice for Hollywood/games nowadays. The developers paint a picture of a future where war runs everything, an insinuate that using PMCs at all is a horrendous choice that will lead down the path to the MSG4 future. </p>
<p>My feelings on that idea aside, I would have been ok with it as an undertone, I could see this in much of the story I did get to see and I don't play my games to be preached to. For me, video games are a nice escape, a make believe place much like when I read and in this place I like to get away from the real issues I get to see every day. Could I have seen this coming before I bought the game? Maybe, and that's why I never got Army of Two, however this was a present and I didn't do any research before I got it. </p>
<p>Will the political dabblings affect my score for the game? No, because gamers can make up their own minds about what's right and what's wrong, and I know many agree with the way PMCs/the government are portrayed in the game.</p>
<p><strong>Down Time</strong><br />
This game does recreate one bit of the military very effectively, hurry up and wait. Thanks to the gorgeous graphics in cutscenes and phone calls, as well as just being a freaking big game, there's a lot of loading. For starters, you have to install the game in 5 portions. The upside is it has a "small" disk footprint, only about 4GB. The big downside is every act must be installed. This takes 3 minutes each time, and if you're on one act, and a friend's on another, you'll have to install it each time you start up. </p>
<p>There's also nice loading before every cutscene and phone call. Not severe, but noticeable, especially when so much of the game is cutscenes already. </p>
<p><strong>Multiplayer</strong><br />
Yes, there is multiplayer, Metal Gear Online. I decided to install it (another install) and test it out, only to find that I'd have to create two more IDs, besides my Playstation ID, to play! I can't see a good reason for that to be the case, so I won't waste my time on this, and instead keep on keeping on in <a href="http://www.us.playstation.com/PS3/Games/Resistance_2">Resistance 2</a>. </p>
<p><strong>Replayability</strong><br />
This looks like it has decent to good replay value. There were more than one bits where I thought "You know, I'll bet I could do that without tipping off any guards" and actually wanted to go back and replay that little bit to get better.</p>
<p>Besides the fun of certain missions (there's one that had me howling in laughter and glee) it also appears to have decent replayability for single player. If what the game says is true, you get back the gear you had at the end of the mission when you would get your initial gear at the beginning. I've not yet had a chance to test this out, but if true it'll be what's required to get through the harder difficulties.</p>
<p><strong>Scoring</strong><br />
Many, many, many critics gave this game very good scores, 95% and higher, and while I can see where they get that number, I think its inflated value.</p>
<p>Remember, my scale goes from a 0 ("Are you KIDDING ME?!?!") to 5 ("Literally nothing could be changed."), and I'm not basing this on any franchise coolness.</p>
<p><strong>Graphics</strong>: 5/5 - Hands down, excellent. If you don't have a high-def, take the PS3 over to a friend's, your eyes will thank you.</p>
<p><strong>Difficulty</strong>: 4/5 - Well planned out. </p>
<p><strong>Gameplay</strong>: 3.5/5 - When you can stay stealthy its a great game. Once you turn tactical Snake is found lacking. As for the triangle mashing and slow-motion gameplay, I could have done without.</p>
<p><strong>Combat</strong>: 4/5 - Gun customization really takes the combat system somewhere fun. I'd like to see a bit more work done to control of the unarmed combat, it felt like flailing in some cases. It'd also be nice to make the guard's hand to hand have more counters.</p>
<p><strong>Cut Scenes</strong>: 2.5/5 - No gamer should have to watch more video than have game time, period. If this was, say, an interactive DVD it'd be great, but with only 19 hours of gameplay on the second hardest difficulty, and easily over 20 hours of video it is simply too much. Gorgeous, but too much.</p>
<p><strong>Story</strong>: Unrated.</p>
<p><strong>Politics</strong>: Unrated.</p>
<p><strong>Multiplayer</strong>: Unrated due to nonsense requirements.</p>
<p><strong>Replayability</strong>: A tentative 3/5. If you really can get your gear in harder difficulties, this would be a HUGE boon. I'd be much more likely to replay through on the highest difficulty if I had the guns I set up in the 3rd highest difficulty still with me. However, the thought of reinstalling each act all the time makes me want to go play something else.</p>
<p><strong>Down Time</strong>: 2/5 - I can forgive loading before and after cutscenes, even if it takes 10-20 seconds. To need to install 5 times, and separately for each act really impacts my desire to go back and play through other acts again.</p>
<p><strong>Overall</strong>: 3.5/5 (70%) - Not only is this about the score I wanted to give it after putting the game down, its what my above scores work out to be! How's that for a good call?!</p>
<p><strong>Conclusion</strong><br />
This was a fun game, I'll say that first off, and a good game. I really enjoyed it the first time through, and it felt unique to me. I found I could just keep writing about the game, there's so much to talk about, which is good. However there are a few decisions the developers should not have made: Requiring button mashing at an unbelievable rate; Cutscenes taking up my time; Too much loading. These detract from the game in a very noticeable way, and this is why I feel the other game reviews are inflated. I don't see how a good, unbiased, game reviewer could overlook these.</p>
<p>Bottom line: Get this game if you want a movie with a game inside of it. Otherwise, be prepared to hurry up and wait for the fun to start!</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2009/01/06/game-review-metal-gear-solid-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fallout 3 Hacking Minigame</title>
		<link>http://thesnarky.com/2008/12/20/fallout-3-hacking-minigame/</link>
		<comments>http://thesnarky.com/2008/12/20/fallout-3-hacking-minigame/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 23:17:50 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Game Review]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=261</guid>
		<description><![CDATA[Yesterday I posted a long write up of my thoughts on Fallout 3. In my haste to get that written and get off to bed, I forgot one of the main points I wanted to talk about, although in retrospect I think that it deserves its own post anyhow. The Hacking Minigame Scattered across the [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I posted a long write up of <a href="http://thesnarky.com/2008/12/19/fallout-3/">my thoughts on Fallout 3</a>. In my haste to get that written and get off to bed, I forgot one of the main points I wanted to talk about, although in retrospect I think that it deserves its own post anyhow.</p>
<p><strong>The Hacking Minigame</strong><br />
Scattered across the Wastes, whether in museums, house, or random places that just happen to have turrets nearby, you'll stumble across old computer terminals. These may be useless systems that just contain a random citizen's poetry about the current situation, or control the turret system you're about to walk into, or do anything in between. Some of the terminals are just open, these are almost always of the useless 'poetry' variety. Most, however, are password protected which gives you two ways to get inside of them. Ok, possibly three if there's a "D - none of the above" choice, Such as just blowing up the turret you want stopped. </p>
<p>The easiest way to get in is searching the surrounding area for a password. Yes, just like in real life, the denizens of the Wastes write down their password, and stick it in their desk (or in their pocket, or corpse...). I chuckled a little bit the first time I found one of these in a desk. </p>
<p>The normal way to break in to the terminal is the hacking minigame. I've seen a few of these over time, ranging from simple "Guess the password" Flash games, to <a href="http://www.hellboundhackers.org/">HBH</a> and <a href="http://www.hackthissite.org/">Hack This Site</a>, and this was probably the simplest one that captures the feel of real hacking. </p>
<p>When you open up a locked terminal, you'll see a screen like the following:</p>
<p><a href="http://planetmedia.gamespy.com/wiki/planetfallout.gamespy.com/default/uploads/3/36/Fallout33234221.jpg"><img src="http://planetmedia.gamespy.com/wiki/planetfallout.gamespy.com/default/uploads/3/36/Fallout33234221.jpg" alt="" /></a></p>
<p>At the top you see 'Attempts Left', this starts at 4 most of the time, and counts down. If you ever use all your attempts, the computer is locked down, and unless you have a special skill you're out for good. </p>
<p>Below that is a bunch of plaintext and garbage. This is supposedly a recovered password file, and its up to you to figure out what's the correct password. You do this like Mastermind, you pick a plaintext string, and it'll tell you how many letters are correct, and in the correct spot. If the password was Grapes, and I clicked on Kitten I'd get back 1/6. Statistically this becomes very hard once you get up to hard terminals that have 8 characters and a bunch of choices. The way to make it easier is to look through the garbage for hints. Anytime you find matching braces, parenthesis, or brackets, you select the first one and it'll either remove a dud string, or replenish your allowance. Unlike the plaintext words, you must mouse over the first character in one of these garbage strings to see the whole thing highlighted. On my old TV this was a lesson in squinting and frustration, trying to pick out the parens from braces. </p>
<p>Once you correctly input the password, the computer is forever open to you (and you get 44 experience, regardless of level!).</p>
<p><strong>The Reality</strong><br />
The reason I liked this minigame, is its darn close to reality. Not in the actual skills used, but through the sifting through of a bunch of garbage, trying to figure out what's valuable and what's just another corrupted file. You have to sit there, be patient, and keep trying. In some cases you have to cancel your attempt because you're about to lock the system, and start all over again. Sure, when script kiddies can just release a botnet these factors are mitigated, but at the heart of it all, it comes down to noticing the little things (oh, look, an old Apache install), having to piece things together (Hmm, they plugged all the holes in Apache, but I noticed there's .php pages, maybe mod_php is old), and hoping you're going after a user that's careless enough to leave their password laying on the desk. </p>
<p>And of course, there's always the ability to bypass getting into the system, and simply pick the lock on the safe, or destroy a turret or two and forget about the system.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2008/12/20/fallout-3-hacking-minigame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fallout 3</title>
		<link>http://thesnarky.com/2008/12/19/fallout-3/</link>
		<comments>http://thesnarky.com/2008/12/19/fallout-3/#comments</comments>
		<pubDate>Sat, 20 Dec 2008 04:14:40 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Game Review]]></category>
		<category><![CDATA[Games]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=253</guid>
		<description><![CDATA[I picked Fallout 3 up the night before I had surgery with the thought that I'll have tons of time to myself to plug through an RPG. We (a friend that was helping me out at the time and I) logged a good amount of play time, if I can find a way to find [...]]]></description>
			<content:encoded><![CDATA[<p>I picked <a href="http://fallout.bethsoft.com/eng/home/home.php?fbid=tynGuGBd77d">Fallout 3</a> up the night before I had surgery with the thought that I'll have tons of time to myself to plug through an RPG. We (a friend that was helping me out at the time and I) logged a good amount of play time, if I can find a way to find out exactly how much I'll edit the post to reflect that, during the next week while I was off from work. Having just hit two possible endings tonight, I felt it was time for a review.</p>
<p>Note: I will keep this as spoiler free as possible, however if you really don't want to learn anything, walk away now. I will give basic geographical/plot background information, and some limited meta information about endings, nothing about the endings themselves. </p>
<p><span id="more-253"></span></p>
<p><strong>The Setting</strong><br />
The background of Fallout 3 (FO3 from here on out) is set in the DC area, in 2277, 200 years after nuclear war ravaged our country, and the world. However it is not a pure futuristic setting, the story takes life as it was in the 1950s, and says "What if this is how we stayed". So you have a juxtaposition of 1950s technology and culture with the knowledge that you're hundreds of years in the future. In some places those differences are obvious, maybe a computer file dated in the future, but the computer is just a terminal connected to something the size of a room. </p>
<p>Everyone that has survived has done it one of two ways. The nicest is they were in Vaults at the time of the attack, bomb shelters designed to be communities. This is where you come from, Vault 101. Those not lucky enough to be in Vaults, or those who left after the attacks lived in the wild, or ad hoc communities together. If you're lucky, these 'wild' people you interact with are human. </p>
<p>As far as the physical setting goes, I felt they nailed DC. Having grown up in this area I know it fairly well, and there were many times wandering around the Wastes when I'd stumble across a place I knew, or a street I actually recognized. Its cool. More than being recognizable, its different enough to be the future. There's, for instance, buildings all the way up to where the Cherry Blossoms should be, and an aircraft carrier that came into port. </p>
<p>As far as graphics go, they're what you'd expect from Bethesda. On the high-def TV I just got they're downright gorgeous for sweeping landscapes. If you stand on the steps of the Capital around Sunset, and look south to the Washington Monument, it's pretty. On the other hand, wandering around the Wastes at midnight and realizing you're in the middle of a minefield, just as scary as the previous scene was beautiful. But no matter what you look at its missing that exactness, something just feels off,since the landscapes are just so big and the GPUs are just so finite. </p>
<p><strong>Initial Reactions</strong><br />
I liked the start of the game a lot. The character creation is pretty decent, tied in with the story. From the get go, you're making decisions that affect your character, which is something I like. While you are somewhat protected for the first bit, you can set the tone for your character already... there's no specific 'newbie time' where you're just learning controls and that's it. Actually, I suppose there is, but it gets drawn out through this time when you can affect your character. </p>
<p>I did feel just a bit overwhelmed stepping out of the Vault initially, when I caught a glimpse of how big the Wastes are. </p>
<p><strong>The Grind</strong><br />
However, once we got into a grind, mainly doing side quests or just exploring to steal as much as we could and sell back in town, I felt a bit bored. The quests themselves are pretty good, the usual "Run around and do X, Y, and Z," types (I won't enumerate the full types of the quests, just so no one feels cheated) but with good writing, some humor, and a freaking HUGE area to explore. </p>
<p>Honestly, the worst part was filling up my inventory every 20-30 minutes. In a well populated area this would happen more like every 10 minutes. Even with a follower (Yer the man, Cheron!), which I believe more than doubles your capacity, this would happen to us. When it happened, we'd have to get out of combat, back out of whatever dungeon or building we were in to get back to the Wastes, fast travel back to a town and sell the stuff off. This worked decently well in the beginning, but by the end I was bringing in a good 4,000 caps (the currency is bottle caps) per run, and unable to sell it all in one town. In fact, I'd go between three towns and barely clear my inventory. Even then I was stopping by my house and dropping a lot of parts off. This started to wear on me the last few days I was playing and I started just not clearing my corpses, nor searching for items that weren't obvious while I was exploring. </p>
<p><strong>The End</strong><br />
<del datetime="2008-12-20T03:17:00+00:00">So I got to an ending tonight. I say 'an' because like all good RPGs, there's more than one. FO3 has, according to the developers <a href="http://fallout3.wordpress.com/2008/03/24/fallout-3-endings-an-update/">over 240 endings</a> (I'm not responsible for spoilers from following that link. Take my word for it if you don't want to know). This is possible because of how they do the ending, which I really liked. I also found at least one other choice just before the ending that is sort of another way to end it... I created about 5 saved games just from recognizing the spots where I'd have a game-deciding choice and saving just before I did, will go back and replay them all the other way sometime next week. </p>
<p>The one question I have about the endings is if you can keep playing after getting to it. The ending I chose resulted in seeing the Main Menu again, so I'm very interested to know if I can keep playing after a better choice, or if we've got another Fable on our hands. </p>
<p>EDIT: I've googled around, and it looks like there's going to be a downloadable pack that will allow you to play after the main quest is done. So make sure you have good saves if you think you're anywhere near the end!</del></p>
<p><strong>Balthazar</strong><br />
I went a different route for my character than I normally do (Snarky). This guy was Balthazar, who I aligned heavily with one town where my house was, and played every other interaction to my benefit. If this required being nice, I was nice, and if it required ruthlessness, I did that as well. In most cases I would help out those who needed it, then clean out their houses while they're out celebrating. </p>
<p>The two noble causes in Balthazar's life are his father and his country. Anytime anyone spoke poorly of my father, they were dealt with immediately, and swiftly. In the grander scheme, any time I could work a "for the good of the nation" into a quest, I'd do it. Anything designed to better the lives of the American citizens was carried out, though in a few cases that requires some heavy thinking to sort out who really wanted what for whom. </p>
<p><strong>The Morals</strong><br />
And that brings me to the morals in this game. One interesting thing is that anytime you steal, even if you're not caught, you lose Karma. This means that by the end of the game, even though I only had 5 pick pockets, my Karma was the lowest possible level. People were almost spitting on me in the streets. If you want to play a good, or neutral, character, you'll either have to never steal, or make sure you pick up every possible 'helping' quest there is. </p>
<p>Beyond this obvious moral lesson, the ending of the game raises excellent moral questions. To a certain degree I saw them coming throughout the game, but I was actually struggling with my ending because I really wasn't sure if I was on the "Good guys" side. While I dislike games that preach on certain points (the favorite right now is privatized warfare... I'm looking at you Metal Gear Solid 4) and use it as a political platform, I still enjoyed the mental exercise these endings required. </p>
<p><strong>The Scoring</strong><br />
So, how would I rate this game?</p>
<p><em>Graphics</em>: 4/5. Clearly above par, but due to system constraints they're not going to look lifelike. </p>
<p><em>Plot</em>: 5/5. I enjoyed it, I really did. Especially towards the end if you work on just playing the main story line its great. </p>
<p><em>Gameplay</em>: 4/5. The controls are ok, but certain things, like the fast weapon switch, just don't feel very snappy. Of course, I was able to pick the controller up the first time and know where everything was, points to them for not changing something that's not broken. Gameplay throughout the game is very linear in difficulty, there's no new tricks to pick up after the start (that I can remember). </p>
<p>Repetitiveness: 3/5. As I mentioned above, the game can get good and repetitive. Go to X, clear out whatever you find, go sell. My problem with non-linear games is I get lost just trying to discover everything and bring everything out, someone more focused might not find this an issue.</p>
<p><em>Ending</em>: 5/5. Why rate the ending? Because this is why you played the game! To have a game (*coughFablecough*) be exceptionally good gameplay, and then have a very anti-climatic ending ruins any fun you may have had. Conversely, a mediocre game with an excellent ending will leave you thinking the world of it. This one was well done, enough to make up for the repetitiveness around the middle. </p>
<p><em>RPG</em>: 5/5. Its a good, solid RPG. Simple enough to pick right up and have an idea where you want your character to go, but complex enough that you could replay 5 or 6 times with unique builds easily. Googling for Fallout Characters should show you some examples of what people have made, everything from a Freddie Krugar specializing in Melee weapons, to paladins who refuse to use firearms, to pyromaniacs bent on making everything explode. I initially gave this a 4, but changed my mind because I can't think of the last RPG I enjoyed to this extent. </p>
<p><em>Stability</em>: 3/5. Maybe my biggest complaint. I believe I hung my PS3 a good three or four times in FO3. While this has happened with other games, it might have been once in Resistance 2, to happen multiple times to a game is just wrong. I had to do hard reboots but flipping the power switch in back for at least two of these hangs. This irks me because the other 8ish games I've owned haven't given me problems (other than R2 once... maybe), and I feel that since everyone's on the same platform, it should be easy to test for these things ahead of time. That said, I've logged a good amount of time in FO3 straight, and heat may have been a factor, I'm unsure. Also, the glitches weren't reproducible, so they could be things that legitimately were missed by QA. </p>
<p><em>Overall</em>: 4/5. While it might start to drag in the center, pushing on to the ending is more than worth it. Its missing the 5 here because I feel a 5 should leave me feeling "Nothing could possibly be changed here", and there's a few things that could be changed in FO3. The stability is the other major issues preventing a 5.</p>
<p><strong>All in All</strong><br />
If you have a PS3, and you enjoy RPGs, buy it. Maybe do GameFly if you're unsure, but I feel like this will be a keeper, and I'll play through another character (going to *try* for a pure good character, probably have to make him/her really naive to pull that off, but oh well) next summerish. </p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2008/12/19/fallout-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Doom and Gloom&#8230; but mostly Gloom</title>
		<link>http://thesnarky.com/2008/11/29/doom-and-gloom-but-mostly-gloom/</link>
		<comments>http://thesnarky.com/2008/11/29/doom-and-gloom-but-mostly-gloom/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 17:37:21 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Game Review]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Interests]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=246</guid>
		<description><![CDATA[I've been laid up for two weeks now due to my own stupidity. Ok, my own stupidity coupled with a 400 pound motorcycle and a extra 3 inches I wanted her in the corner. Ok, my own stupidity, Kari, a corner, and my father and I cracking jokes about hernias (he'd had two by then, [...]]]></description>
			<content:encoded><![CDATA[<p>I've been laid up for two weeks now due to my own stupidity. Ok, my own stupidity coupled with a 400 pound motorcycle and a extra 3 inches I wanted her in the corner. Ok, my own stupidity, Kari, a corner, and my father and I cracking jokes about hernias (he'd had two by then, I'd had one). So of course, Karma being the fickle mistress she is, she graced me with another hernia (I'm ahead of my father who didn't get his FIRST until my age!). The hernia itself didn't hurt much, it just felt uncomfortable enough while sitting up straight that I took that week off of work. </p>
<p>My surgery was scheduled for this past Tuesday, but I had a friend coming in last weekend for a concert and gaming. What's a boy to do? I took the noble way out, and holed up all weekend with the PS3, new Magic (the Gathering) decks, and a new (to me) game called <a href="http://www.atlas-games.com/product_tables/AG1250.php">Gloom</a> in order to feel as good as possible for the concert. I have to say, this game is a winner. </p>
<p>Gloom is made by <a href="http://www.atlas-games.com/index.php">Atlas Games</a>, a company that makes some fun and compact games, such as <a href="http://www.atlas-games.com/lunchmoney/index.php">Lunch Money</a> that are easily portable, and yet very engrossing. What intrigued me as I was reading the back of the box in a good local game store were the card design and feel of the game.</p>
<p>The cards are clear. That's right, clear. The image on the back of the box shows this:</p>
<p><img src="http://www.atlas-games.com/images/gloomsamp.jpg" alt="" /><br />
(feel free to ignore the creepy clown, he's but one of 20 characters)</p>
<p>Every character has a portrait in the center, and some flavor text in various places (name, title, flavor). Each Modifier (What's that?! More later) card has flavor text (name, flavor text), modifiers in one or more of three locations (all on the left), optional rules, and an optional story icon. In the sample picture above, the top top card is an untimely death, but the Modifier card under it has a -10 modifier in the middle spot, see it? It also has a bat as the story icon (this is just a generic 'beast'). </p>
<p>Basically the game revolves around stacking Modifiers on top of Characters (you control a whole family, the winner is whichever family has the lowest self-worth). Because the cards are clear you'll see Modifiers or story icons from all the cards below unless you play a card that has something in the same spot. The goal is to eventually kill off your Characters using Untimely Death cards when the have the lowest self-worth possible, hence the name, Gloom. </p>
<p>The fun part is the feel of the game. Knowing just the above the game seems, well, depressing, but it is simply hysterical. Yes, you can play just by tossing cards around like you might in Magic, but the whole point of the game is to tell the sad story of a certain family. Think of it like a good Poe story, if Poe was Dave Berry. In the rules it encourages you to tell more of the story as you play Modifiers and Untimely Deaths, kind of like the old campfire game of everyone adding a sentence to a story, since you can play cards on anyone's Characters. The fun bit here is the usual 'punish' on another player of hurting their character is flipped on its head. So you'll hear "Angel was unhappy since she got beat up by bums, but then she met the man of her dreams and got blessed by the church." "Nooooooo! Why?! I didn't do ANYTHING to you!". </p>
<p>The stories get fun. A friend who's holed up with me since his car is in the shop and has been for weeks was playing purely based on building good story lines. It doesn't get wins but I was dieing laughing at bits of it. For example (card names in <em>italics</em>):</p>
<blockquote><p>Player 1 (owner of Grogar): "<em>Grogar</em>, the half alive Teddy Bear, went on a trip last week. He went to see his family in Africa, but forgot to bring his water purification tablets. Ever since he's been <em>distressed by dysentery</em>." (-25 total Modifier, -15 on top, and -10 in the middle).</p>
<p>Player 2: "<em>Grogar</em> was horribly distress by this disease, especially when he heard it affected his whole family back home as well. However, when his much-removed uncle, Jimmy, finally succombed to the disease, he left <em>Grogar</em> the family land, all of Egypt! <em>Grogar</em> really <em>landed a legacy</em>." (+15 total modifier, +15 in the center... which wipes out the -10 from above).</p>
<p>Player 3: "After <em>Grogar</em> landed his legacy. he became the talk of the town! A cute young teddy bear named Jenny introduced herself, and not three months later they were <em>wondrously well wed</em>!" (+20 total modifier, 0 on top which wipes out the -15 from Player 1's card, +20 on bottom). </p></blockquote>
<p>Now in one turn Grogar has gone from being worth -25 (a decent score, all 5 members being worth that is -100 total. My wins usually come around -110 to -130) to +35, a rotten score. Thankfully there's very very few ways to kill off a Character while they have positive self worth, but it'll still take a few turns for Grogar to go back to getting points for his player. More importantly, we now know Grogar has land in Africa, and a newly wed wife, which lets us play an abundance of negative cards and stay within the story!</p>
<p>Overall, my two friends and I have really enjoyed this game. We played 4-5 games last weekend, and I've done 2-3 since then, way more than we played with the Magic decks we all bought. The games can take a while, the three player games lasted about an hour apiece using all five Characters in the families. I'd have to rate it a 4/5 for myself.</p>
<p>Why does it warrant a 4/5? </p>
<ul>
<li>It is unique, its not a rip-off of another idea (aka another CCG, or based off a computer game or movie).</li>
<li>I still get a kick out of the clear cards, they look and feel darn cool. The humor is to die for (pun intended).</li>
<li>The box is small, easily tossed into a bag, mayhaps even a purse (I don't own one, so I wouldn't know) to have if you're planning on waiting somewhere, or for a picnic.</li>
<li>Its a smaller game company, I really like supporting companies like <a href="http://www.sjgames.com/">SJ Games</a>, Atlas, etc over mass-producing places like Hasbro. The games feel more unique, and usually have a bit more 'flair'.</li>
</ul>
<p>So why not a 5/5?</p>
<ul>
<li>After a few games we could tell what card the opponent would play just by listening to the story, a few more cards would be very welcome. There are add-on packs, and I may pick them up just to get a little more randomness.</li>
<li>With even a 3 player game we got through the deck one and a half times before the end of the first game, so its something you can expect to happen.</li>
<li>It comes in a box, not a tin. This is very common, and I dislike it. See box rant below.</li>
<li>I feel a 5/5 is for games that make me sit back and think "Wow, am I lucky I experienced that. nothing better could be done." You know, like the movie Torque.</li>
</ul>
<p>Box Rant:<br />
Recently I've become very irked at games that are packaged in cardboard boxes, not tins. For a big game, this makes a bit of sense, such as Munchkin. Big box, can be made of study cardboard, in two parts like a normal box + top. However, for small games that are <a href="http://www.sjgames.com/chezgeek/">Chez Geek</a> sized (and Gloom is the same size) or smaller, where the box is one cardboard box with flaps that need to close over the cards, this is not a good solution. It works fine when the cards are in their shrink wrap, but after one game they're a tad bigger, and the flaps never close correctly. They'll get bent, or let cards slide out, or not fit the rules, its just not a good solution, its a hack. Hacks, while clever, aren't right for long term solutions. </p>
<p>The real solution here is tins. Make a tin the same size as that cardboard box and it'll hold its shape. It'll hold the cards. It'll snap closed so you're absolutely sure no cards are falling out in your backpack. Tins work. I'm sure they're not used because of a price issue, but I'm always more inclined to buy a tined game than a boxed one. My hack to fix their hack is ziplock bags. All of my game cards, for all of my games, live in plastic ziplock bags. I know they're not coming out.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2008/11/29/doom-and-gloom-but-mostly-gloom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thieves Tavern &#8211; Where all the cool kids play</title>
		<link>http://thesnarky.com/2008/06/28/thieves-tavern-where-all-the-cool-kids-play/</link>
		<comments>http://thesnarky.com/2008/06/28/thieves-tavern-where-all-the-cool-kids-play/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 19:03:09 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Interests]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Three Planets Software]]></category>

		<guid isPermaLink="false">http://thesnarky.com/?p=207</guid>
		<description><![CDATA[For about two weeks now I've been working on a PHP version of the game Mafia. If you don't know it, mayhaps you know the name Werewolf, or Assassin (not Assassin's Creed, like I had some people guess.... there's no way I could port that to PHP). If you're still in the dark, check the [...]]]></description>
			<content:encoded><![CDATA[<p>For about two weeks now I've been working on a PHP version of the game Mafia. If you don't know it, mayhaps you know the name Werewolf, or Assassin (not Assassin's Creed, like I had some people guess.... there's no way I could port that to PHP). If you're still in the dark, check the <a href="http://en.wikipedia.org/wiki/Mafia_Game">Wikipedia</a> page, or <a href="http://mafiascum.net">MafiaScum</a>, one of the best forums for it. <a href="http://push.cx">Harkins</a> and I wrote it into <a href="http://mud.simud.org/">Simud</a> a year or two back, and I've wanted to see an automated version on the Internet for a while now (read: Not needing forum software, or a human moderator). The closest I could find is an email list, which of course I can't find now that I want a link, and frankly doesn't fit my description of 'browser based'. </p>
<p>So what I'm creating is a PHP/AJAX based version of the game, where players can create games of (so far) between 5 and 8 players. Upon creating the game, a random set of roles (random in terms of which roleset, NOT in terms of a hodge podge of random roles that could be very unfair) is doled out, and it goes immediately into the night phase. Each phase will last 24 hours, if everyone does their actions sooner, it'll end, but if you don't ready yourself before the time is up you'll forfeit your action. Game ends based on the roleset... typically once there's only town, or bad guys left, but in terms of Silent Killers it gets more interesting, but will be checked for after every kill, and after every lynching. Chat will allow for anyone to read it, and once the game is over all messages become public.</p>
<p>Unfortunately work has slowed down a bit since buying my motorcycle a week ago, but I'm still hoping to have a closed beta up in a short(ish) amount of time. I actually could put one up already, but am hoping to have a much higher degree of a product before the beta than I usually do. </p>
<p>The site will go live at <a href="http://thievestavern.com">Thieves Tavern</a>, a site I got a long time ago for a gaming clan that is appropriately named, I think. Once it goes up, I'll put out a call for about 10-16 closed beta players, and then probably a week later another open invitation for open beta players. once it seems both stable, and a good recreation of the game, based on the opinion of all players, it'll become a public game. </p>
<p>You can follow the development either through <a href="http://twitter.com/thievestavern">Twitter</a>, or in the #thievestavern room on irc.freenode.net, thanks to <a href="https://github.com">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2008/06/28/thieves-tavern-where-all-the-cool-kids-play/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Assassin&#8217;s Creed</title>
		<link>http://thesnarky.com/2008/04/07/assassins-creed/</link>
		<comments>http://thesnarky.com/2008/04/07/assassins-creed/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 23:59:36 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Game Review]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[PS3]]></category>

		<guid isPermaLink="false">http://thesnarky.com/2008/04/07/assassins-creed/</guid>
		<description><![CDATA[A few weeks back I acquired a PS3 (another post on that is in the works), and nabbed Assassin's Creed as my Single Player game for a while. From the previews I was expecting a game with decent open-ended game play, decent graphics, and some good fighting. Boy were my expectations blown out of the water...]]></description>
			<content:encoded><![CDATA[<p>A few weeks back I acquired a PS3 (another post on that is in the works), and nabbed Assassin's Creed as my Single Player game for a while. From the previews I was expecting a game with decent open-ended game play, decent graphics, and some good fighting. Boy were my expectations blown out of the water.</p>
<p><strong>Plot:</strong> I won't spoil the surprise, somehow it remained one for me even after reading a few reviews. The basic plot ties into the Third Crusade, with Saladin fighting King Richard (more or less). The historical context here is that assassins rose into being during this time as a means of fighting back, with the word assassin coming from the Arabic "hashashin", meaning, well... hashish addicts. Specifically a Muslim sect during the Crusades that may have controlled their assassins with drugs and promises of heaven. Others that don't want to acknowledge possible negative connotations of the word claim it to have come from the leader's name "Hassan" (where Hassansin would be a follower of Hassan). In any case neither word is used in Arabic for assassin any more, so I don't think it should have any charged feelings either way. </p>
<p>The only reason I point out the etymological root of the word is because at one point your character is told that the Crusaders "Control their killers with magic herbs" and had to laugh. In most other respects, however, the designers did an amazing job with the plot.</p>
<p>The game does attempt to address some religious and political ideas but, with one exception, its nothing excessively in your face. The exception somewhat ruins the plot, so I'll hold my tongue further.</p>
<p>4/5</p>
<p><strong>Cut scenes:</strong> I enjoyed each and every cut scene in the game, and boy are there a lot! Around the first 45 minutes I started getting bored until I realized I could control the camera and minimal assassin movement which means that you can be your own director! Walk in, announce a kill, and during the ensuing conversation pretend you're in the Godfather. Another great touch is being able to change camera angles on the more important scripted 'boss' conversations, where you can get close ups of the guy speaking, or the innocent victim he's about to kill. Really gives it a good cinematic feel.</p>
<p>All I could ask for is, well, an option to skip them just in case they do get a bit long.</p>
<p>4/5</p>
<p><strong>Graphics:</strong> I absolutely loved the graphics in the game. Assassin's Creed has clearly upped the ante for games in the coming year, giving both superb sweeping vistas and decent indoor areas (though indoors wasn't emphasized). The first time I climbed the Citadel in Acre and looked out over the city it hit me just how much work went into this game. It actually reminded me of my time in Tunisia, captured quite nicely in my TV. Running around Jerusalam gave me the same feel, while standing on the Dome of the Rock. Add to that the nice little particle graphics they add in when you find flags, or save citizens, and you'll be wowed no matter what game ya come from.</p>
<p>The combat graphics aren't great as well. When your character performs a kill combo or a reversal it jumps into a cinematic mode and shows one of a dozen (maybe more) moves being performed. As late as the 7th assassination (of 9) I was seeing new moves. </p>
<p>I came into the game assuming the cut scenes I'd seen weren't in game footage, but was greatly surprised to see the whole game looks that way! </p>
<p>5/5</p>
<p><strong>Gameplay:</strong> I'll start by saying I really liked the control system. The first five minutes of button bashing made me think I'd make a mistake purchasing the game, but after familiarization (the tutorial is required, but extremely helpful) the controls felt natural. What they boil down to is the four buttons on the 'shape' pad. Triangle controls your head, Circle your open hand, Square your weapon hand, and X your feet. So in the context of walking, Circle is a gentle push to move people out of your way, Square shanks someone, and X makes you blend into the crowd and go unnoticed. When you move into conspicuous mode, those turn into a tackle, uber-shank, and sprint, respectively. </p>
<p>Once you get used to those controls, it makes it pretty easily to do exactly what you want to, such as slink along a rooftop, drop down into a group of guards assaulting a citizen, and shank two of them before they realize what's going on. Along those lines, the combat is very fun. Its fairly easy once you get down all the moves, but by the time you do that a fight can easily pull 10 guards at a time. While its easy to win, if you miss a break and let them get around you its also easy to lose. The combat feels very fluid, and using the short sword gives you a very nice whirling dervish look. </p>
<p>As far as replaying the game goes, I just "hurriedly" (took me a good week and a half doing it hurriedly) played through a lot of this game and yet still have a lot to go back and do. For one, each area has flags hidden in it, hundreds of them, and I've got, oh 50 total. Another fun thing to find is a large number of Templars that you need to kill. Finally, if you didn't do full investigations the first time, you need to go back and actually complete all the annoying flag finding missions for informers. Also its just darn fun running through Jerusalem and seeing how many guards I can get on me. Its like making my own action movie. </p>
<p>5/5</p>
<p><strong>Openendedness (oh yes, that's a word... now):</strong> On the one hand you're forced to follow an approximate order of assassinations. However that's a very small hand, as most assassinations let you chose which city to do first. More than that, you can jump between cities if you like, and do the investigations as you want (each investigation being 3 of 6 missions consisting of pickpocketing, interrogations, eavesdropping, or informer assignments). I never once felt like I was forced into a path to chose, nor felt the game 'stop'. After an initial 10-15 second loading period, the entire city was at my disposal and by the end that equals a large area. I could run all over the city I was working in and only have to stop when 50 guards kill me--- erm, when I decide to. </p>
<p>There, again, is an exception that might be a plot ruiner, but at the end of the game I forgave all of it.</p>
<p>4/5</p>
<p><strong>Ending:</strong> I loved this ending. At one point this afternoon I jumped up and said in a not so calm voice "Heck yea!" It was an appropriate ending, it fir the period well, and man are the fights leading up to it epic. I said before that knowing all the fighting moves makes fights 'easy', and for the most part this held true. Of course with the numbers you're up against, its darn easy to die quickly as well if you let them start landing blows. And with the final boss fight I died at least three times before getting him, and the fourth was darn close. And then, just before the credits, a lovely plot twist that actually had me come back and do some scenery watching for 10 minutes.</p>
<p>4/5</p>
<p>In the end, this is a game I recommend for anyone that enjoys a little sword play. Its only Single Player, but it does that so well I have to forgive it. You won't be disappointed with this game, even at $50. </p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2008/04/07/assassins-creed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dungeon Runners Website on Linux</title>
		<link>http://thesnarky.com/2007/12/23/dungeon-runners-website-on-linux/</link>
		<comments>http://thesnarky.com/2007/12/23/dungeon-runners-website-on-linux/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 21:53:54 +0000</pubDate>
		<dc:creator>Snarky</dc:creator>
				<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://thesnarky.com/2007/12/23/dungeon-runners-website-on-linux/</guid>
		<description><![CDATA[For those that use Linux, read my post yesterday, and decided to check out the website for <a href="http://dungeonrunners.com/">Dungeon Runners</a>, I apologize. I should have pointed out that their site is very, very unusable on Linux (ok, to be exact, I haven't gotten it to work with any version of Ubuntu, and Firefox). That changed today when I cooked up a small <a href="https://addons.mozilla.org/en-US/firefox/addon/748">GreaseMonkey</a> script which hides their Flash "movie" that plays in the background. Its not really a movie, its actually just a static image, but its loaded as a Flash movie. Anyways, its quite easy, go install GreaseMonkey, then the following script:


<pre lang="javascript">
// ==UserScript==
// @name           Dungeon Runners Linux Compliant
// @namespace      http://thesnarky.com
// @description    This removes the flash "movie" which blocks the main site for Dungeon Runners
// @include        http://dungeonrunners.com/*
// @include        http://boards.dungeonrunners.com/*
// ==/UserScript==

var objects = document.getElementsByTagName("object");
for(i=0; i<objects.length; i++) {
	var flash = objects[i];
	if(flash.getAttribute("id") == "bg_chars") {
		flash.style.display='none';
	}
}
</pre>

Can download it by clicking here: <a href="http://thesnarky.com/wp-admin/dungeonrunnerslinuxniceuser.js">http://thesnarky.com/wp-admin/dungeonrunnerslinuxniceuser.js</a>

This finds the one Flash object named bg_chars (which is the offender in this case) and tells him to go quietly sit in the corner. And such, all is right in the world, I don't need to boot into Windows to troll the forums (just to play the game).]]></description>
			<content:encoded><![CDATA[<p>For those that use Linux, read my post yesterday, and decided to check out the website for <a href="http://dungeonrunners.com/">Dungeon Runners</a>, I apologize. I should have pointed out that their site is very, very unusable on Linux (ok, to be exact, I haven't gotten it to work with any version of Ubuntu, and Firefox). That changed today when I cooked up a small <a href="https://addons.mozilla.org/en-US/firefox/addon/748">GreaseMonkey</a> script which hides their Flash "movie" that plays in the background. Its not really a movie, its actually just a static image, but its loaded as a Flash movie. Anyways, its quite easy, go install GreaseMonkey, then the following script:</p>
<pre class="javascript">&nbsp;
<span style="color: #009900; font-style: italic;">// ==UserScript==</span>
<span style="color: #009900; font-style: italic;">// @name           Dungeon Runners Linux Compliant</span>
<span style="color: #009900; font-style: italic;">// @namespace      http://thesnarky.com</span>
<span style="color: #009900; font-style: italic;">// @description    This removes the flash &quot;movie&quot; which blocks the</span>
<span style="color: #009900; font-style: italic;">//                      main site for Dungeon Runners</span>
<span style="color: #009900; font-style: italic;">// @include        http://dungeonrunners.com/*</span>
<span style="color: #009900; font-style: italic;">// @include        http://boards.dungeonrunners.com/*</span>
<span style="color: #009900; font-style: italic;">// ==/UserScript==</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> objects = document.<span style="color: #006600;">getElementsByTagName</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;object&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">&#40;</span>i=<span style="color: #CC0000;">0</span>; i&lt;objects.<span style="color: #006600;">length</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #003366; font-weight: bold;">var</span> flash = objects<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>flash.<span style="color: #006600;">getAttribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #3366CC;">&quot;bg_chars&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		flash.<span style="color: #006600;">style</span>.<span style="color: #006600;">display</span>=<span style="color: #3366CC;">'none'</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>Can download it by clicking here: <a href="http://thesnarky.com/wp-content/uploads/2007/12/dungeonrunnerslinuxniceuser.js">Script</a></p>
<p>This finds the one Flash object named bg_chars (which is the offender in this case) and tells him to go quietly sit in the corner. And such, all is right in the world, I don't need to boot into Windows to troll the forums (just to play the game).</p>
]]></content:encoded>
			<wfw:commentRss>http://thesnarky.com/2007/12/23/dungeon-runners-website-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
