Nile Online

Post by: on October 26th, 2010 | Filed Under Game Review, Games

A year ago (roughly) a few friends were talking about another browser-based game (BBG). I asked which it was, and they pointed me at Nile Online. So began a year (roughly) long experiment.

Initial Feelings
At the start I was just looking for a new BBG as I'd ended whatever it was I was playing before. I didn't have an exceptional amount of time for games, so my PS3 wasn't being used that much. A BBG I could play before and after work, just poke in now and then.

The initial appeal for me was (in my opinion) Nile's unique focus. It's somewhat collaborative, based on trading between cities located along the Nile river in Egypt (although you can play without trading) and entirely focused on entombing yourself in the nicest tomb on the Nile. That's it, you're playing to try to kill off your character. That sounded like fun, and a solid end condition compared to the RPGs I normally play.

The first month or so was mainly just a race building up my initial infrastructure. You need to be producing clay, reeds, and wheat so that you can produce bricks, baskets, and bread. Initial building upgrades are on the order of minutes to an hour, so you're just sitting there upgrading and planning. At this point I was just gunning for entombment.

Challenges
One friend was playing based on the One City Challenge, completing the game while building only one (of a possible four) cities. The advantages to multiple cities is you can be creating up to four natural resources for goods, to do it on one city means you have to rely a LOT more on trading and smart worker management.

I did not go that route, as I wanted to finish the game in a decent amount of time. However, as the months wore on, friends started dying off and I realized I was still pressing on. Sometime around the third month my goal switched to being the lowest possible rank when I died off. And that's how I played for the next 8 months.

Strategy
My strategy stayed mostly the same for the game, I had two key changes, however. Initially I was simply trying to bulk up my main city center so I could entomb myself (have to max out one city center to level 22). The other cities, as I founded them, were founded to support my build speed, and ship goods back to the capital to be sold/used in the build process. If you're smart about producing the other luxury goods needed you can keep your capital upgrading constantly without much buying at the market.

This worked for a while, I was constantly dropping ranks and the city center was well on its way to being ready to entomb me. However, when the time came to pull the trigger, I wanted to drop just a few more levels and realized I wasn't sure the best way. That's when I recognized that the average level of your structures in the city is a solid determining factor for rank. So I had a level 22 city center and really low other buildings, which was really hurting my rank.

Therefore, the first change I made was to next focus on building all my buildings up simultaneously. This really sped up my rank dropping, I'd frequently lose 20 or so every update. In fact, it worked awesomely until around rank 200. I probably spent two months trying to get from 200 down below 100. Why? Because of the other caveat to ranking, "average rank of buildings and total resources on hand."

*THWAP*

So while I had four fairly done cities, I couldn't get anywhere on rankings because my stockpiles were empty! This was my second tactic shift, going from a race to build, to a race to build and squirrel away. I kept upgrading anything that I could, but also started buying massive amounts of anything I didn't produce natively. I maxed out my bread (used as currency) production in every city and simply bought all the time. This helped a lot, although ranking up was still slow as I had to spend bread to get other goods, and I'd spend some time building my stores back up before I could gain any ground in the rankings.

Conclusion
Finally I reached my (new) goal: Entomb myself under level 100. Specifically, I made it to 99 after 68 'years' in game. I could have done that better if I'd focused more on stockpiling the entire game, but hey, live and learn. Fun game, worth a peek if you only want to devote a few minutes spread out through the day.

Comments (No responses yet)

Communist Sci-Fi GTA

Post by: on May 23rd, 2010 | Filed Under Game Review, Games, PS3

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 about wasting that money, especially when the online media made it look fairly yummy.

The Premise
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.

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.

The Game
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.

Controls
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!

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.

Physics
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.

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.

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.

Overall, the physics were fun, and I'd say the quirks actually added to the fun, rather than detracting from it.

Environment
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 :( .

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.

Plot
The plot was kind of a typical Sci-Fi deal... you have colonists, oppressive military, easily predictable twists, but enjoyable overall.

Combat
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.

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.

And the last level? Let me just say this flat out: Take your time, do it right, it's designed to kill you.

Missions
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.

Overall
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.

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.

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.

Comments (2 responses so far)

Ray Casting in Scheme

Post by: on February 23rd, 2010 | Filed Under Games, Programming, Scheme

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 (output and reading user input).

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 Harkins wrote last year for Ruby (when I had aspirations of learning another language), and read up on Rogue Basin for various examples. In the end I stole Harkin's map, and went with the pseudo code Elig created here.

Without further ado, the code busted apart into a few sections. (Full version can be found here).

 
;;Scheme ray casting/FOV demo
;;Adapted from pseudo code found at
;;http://roguebasin.roguelikedevelopment.org/index.php?title=Eligloscode
 
;;Prep work for 7DLR 2010 (to brush back up on my Scheme)
 
;;Global defines
(define char-x 1) ;;x coordinate for the fake character
(define char-y 1) ;;y coordinate for the fake character
(define VIEW-RADIUS 3) ;;View radius for FOV demo
 
;;List of tiles we don't want to walk through (Walls and water)
(define IMPASSABLE-TILES (list #\# #\~))
;;List of tiles that will break the ray casting (walls)
(define OPAQUE-TILES (list #\#)) 
 
(define test-env (list
                    "###################"
                    "#...#.............#"
                    "#...#...#~~~~~....#"
                    "#.......#~~~~~....#"
                    "###################"))
 

First I set up some variables to work with.

 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Functions to create the environment;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
;;Function to create our working environment given an array of strings such as test-env
(define create-env
    (lambda (env)
        (if (null? env)
            '()
            (cons (create-env-row (string->list (car env))) (create-env (cdr env))))))
 
;;Function that helps create-env by creating a given row
(define create-env-row
    (lambda (env-row)
        (if (null? env-row)
            '()
            (cons (create-env-cell (car env-row)) (create-env-row (cdr env-row))))))
 
;;Function to create a given env cell, helps create-env-row
(define create-env-cell
    (lambda (env-cell)
        (list env-cell #f)))
 

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).

 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Functions to display the environment;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
;;Function to write the env
(define write-env
    (lambda (env)
        (write-env-help env 0 0)))
 
;;Function that does the brunt of the env write
(define write-env-help
    (lambda (env x y)
        (if (null? env)
            (newline)
            (begin
                (write-env-row (car env) x y)
                (write-env-help (cdr env) x (+ y 1))))))
 
;;Function that writes a given row of the env
(define write-env-row
    (lambda (env-row x y)
        (if (null? env-row)
            (newline)
            (begin
                (write-env-cell (car env-row) x y)
                (write-env-row (cdr env-row) (+ x 1) y)))))
 
;;Function that writes out a given cell of the env
(define write-env-cell
    (lambda (env-cell x y)
        (let ((char (car env-cell)) ;;The symbol we'll possibly display
              ;;The boolean bit of the env cell that holds if its visible or not
              (visible (cadr env-cell)))
            (if visible ;;If this cell was marked to be seen
                (if (and (= x char-x) (= y char-y)) ;;Check if its where the character is
                    (print "@") ;;If so, lets show an @ symbol
                    (print char)) ;;Else show whatever character should be displayed
                (print " ")) ;;If this cell wasn't marked to be shown, just put a space
            (print " ")))) ;;Put a space after it for pretty printing
 

Naturally you need some way to nicely see what's going on in your environment. That's what these functions do.

 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Functions for the FOV demo;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
;;Function to update the FOV as a whole
(define update-fov
    (lambda (env char-x char-y)
        (update-fov-help env char-x char-y 0 0)))
 
;;Function that does the actual work of updating the FOV
(define update-fov-help
    (lambda (env char-x char-y x y)
        (if (not (null? env))
            (begin
                (update-fov-row (car env) char-x char-y x y)
                (update-fov-help (cdr env) char-x char-y x (+ y 1))))))
 
;;Function that updates the FOV for a given row
(define update-fov-row
    (lambda (env-row char-x char-y x y)
        (if (not (null? env-row))
            (begin
                (update-fov-cell (car env-row) char-x char-y x y)
                (update-fov-row (cdr env-row) char-x char-y (+ x 1) y)))))
 
;;Function that does the real work to update a given cell's FOV
(define update-fov-cell
    (lambda (env-cell char-x char-y x y)
        (set-cell-visible env-cell #f) ;;Set visible to false
        (let* ((dx (- x char-x))
               (dy (- y char-y))
               ;;Get the distance between the character and the cell
               (distance (sqrt (+ (* dx dx) (* dy dy)))))
            (if (< distance VIEW-RADIUS) ;;If we're within out viewing radius
                (set-cell-visible env-cell #t))))) ;;set the cell to be shown
 

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.

 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Function for the Ray casting demo;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
;;Function to clear the entire env
(define clear-cells
    (lambda (env)
        (if (not (null? env))
            (begin
                (clear-cells-row (car env))
                (clear-cells (cdr env))))))
 
;;Function that clears a row of the env
(define clear-cells-row
    (lambda (env-row)
        (if (not (null? env-row))
            (begin
                (clear-cells-cell (car env-row))
                (clear-cells-row (cdr env-row))))))
 
;;Function to clear a cell in the env
(define clear-cells-cell
    (lambda (env-cell)
        (set-cell-visible env-cell #f)))
 
;;Function to do the ray-cast
(define cast-rays
    (lambda (env char-x char-y)
        (clear-cells env) ;;Clear everything first
        (cast-rays-help env char-x char-y 0)))
 
;;Function to do the real work of casting some rays
(define cast-rays-help
    (lambda (env char-x char-y i)
        (if (<= i 360)
            (let ((x (cos (* i 0.01745)))
                  (y (sin (* i 0.01745))))
                  (trace-ray env char-x char-y x y (+ char-x .0) (+ char-y .0) 0)
                  (cast-rays-help env char-x char-y (+ i 16))))))
 
;;Function to trace the specific ray to its end
(define trace-ray
    (lambda (env char-x char-y x y dx dy i)
        (if (not (> i VIEW-RADIUS))
            (let* ((cell-x (round dx))
                   (cell-y (round dy))
                   (cell (get-cell env cell-x cell-y)))
                (if cell
                    (begin
                        (set-cell-visible cell #t)
                        (if (cell-opaque? cell)
                            (trace-ray env char-x char-y x y (+ dx x) (+ dy y) (+ i 1)))))))))
 

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.

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.

 
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Random helper functions;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
;;Function to get a given cell
(define get-cell
    (lambda (env x y)
        (get-cell-help env x y 0)))
 
;;Function does most of the real work to get a given cell
(define get-cell-help
    (lambda (env new-x new-y y)
        (if (not (null? env))
            (if (= y new-y)
                (get-cell-x (car env) new-x new-y 0)
                (get-cell-help (cdr env) new-x new-y (+ y 1)))
            #f)))
 
;;Final helper to get a given cell
(define get-cell-x
    (lambda (env-row new-x new-y x)
        (if (not (null? env-row))
            (if (= x new-x)
                (car env-row)
                (get-cell-x (cdr env-row) new-x new-y (+ x 1)))
            #f)))
 
;;Function to tell if a cell is passable
(define cell-passable?
    (lambda (cell)
         ;;Check to see if symbol is in our list of impassable tiles
        (not (member (car cell) IMPASSABLE-TILES)))) 
 
;;Function to tell if a cell is opaque
(define cell-opaque?
    (lambda (cell)
        ;;Check to see if symbol is in our list of opaque tiles
        (not (member (car cell) OPAQUE-TILES)))) 
 
;;Function to 'move' our 'character' to another cell
(define move-to
    (lambda (env x y)
        (if (cell-passable? (get-cell env x y)) ;;Check to make sure they can move there
            (begin
                (set! char-x x) ;;'Move' them by changing our global vars
                (set! char-y y)))))
 
;;Function to set a given cell's visibility to the given boolean
(define set-cell-visible
    (lambda (cell bool)
        (set-cdr! cell (list bool))))
 

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.

 
;;;;;;;;;;;;;
;;Test code;;
;;;;;;;;;;;;;
 
;;Setup the environment
(define our-env (create-env test-env))
 
;;Run the fov-demo
(define fov-demo
    (lambda (env)
        (print "FOV demo, use h, j, k, and l to move, q to quit\n")
        (update-fov our-env char-x char-y)
        (write-env our-env)
        (let read-loop ((x (read-char)))
            (if (not (or (char=? x #\q) (char=? x #\newline)))
                (begin
                    (case x
                        [(#\l) (let ((new-x (+ char-x 1))
                                     (new-y char-y))
                                    (move-to our-env new-x new-y))]
                        [(#\k) (let ((new-x char-x)
                                     (new-y (- char-y 1)))
                                    (move-to our-env new-x new-y))]
                        [(#\j) (let ((new-x char-x)
                                     (new-y (+ char-y 1)))
                                    (move-to our-env new-x new-y))]
                        [(#\h) (let ((new-x (- char-x 1))
                                     (new-y char-y))
                                    (move-to our-env new-x new-y))])
                    (update-fov our-env char-x char-y)
                    (write-env our-env)
                    (read-loop (read-char)))
                (case x
                    [(#\q) (print "--End of FOV Demo--\n")]
                    [(#\newline) (read-loop (read-char))])))))
 
;;Run the ray-casting-demo
(define ray-casting-demo
    (lambda (env)
        (print "Ray casting demo, use h, j, k, and l to move, q to quit\n")
        (cast-rays our-env char-x char-y)
        (write-env our-env)
        (let read-loop ((x (read-char)))
            (if (not (or (char=? x #\q) (char=? x #\newline)))
                (begin
                    (case x
                        [(#\l) (let ((new-x (+ char-x 1))
                                     (new-y char-y))
                                    (move-to our-env new-x new-y))]
                        [(#\k) (let ((new-x char-x)
                                     (new-y (- char-y 1)))
                                    (move-to our-env new-x new-y))]
                        [(#\j) (let ((new-x char-x)
                                     (new-y (+ char-y 1)))
                                    (move-to our-env new-x new-y))]
                        [(#\h) (let ((new-x (- char-x 1))
                                     (new-y char-y))
                                    (move-to our-env new-x new-y))])
                    (cast-rays our-env char-x char-y)
                    (write-env our-env)
                    (read-loop (read-char)))
                (case x ;;Enter or q was pressed
                    [(#\q) (print "--End of Ray casting demo--\n")] ;;If q, lets quit
                    ;;If enter just read the next char, it happens
                    [(#\newline) (read-loop (read-char))]))))) 
 
;;Run our demos
(fov-demo our-env)
(ray-casting-demo our-env)
 

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.

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.

Hope that's commented well enough in the code. Enjoy!

Comments (No responses yet)

(library 7DRL (import (rnrs))

Post by: on February 23rd, 2010 | Filed Under Games, Programming, Scheme

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 in the same IRC channel Scheme came up.

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.

Flavors

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 Mit-Scheme, Chez Scheme, PLT Scheme (Dr Scheme), Tiny Scheme, and Gambit. These can all be installed under Linux (fairly) easily, and all have upsides and downsides.

  • 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.
  • Chez Scheme - What my school used primarily. Has a copy of the Scheme Programming Language Version 4 free on their site which is a big plus. They support all three major OS's and include an RPM/instructions for Debian installation.
  • 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.
  • 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.
  • 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) here. 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.

Gambit

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:

 
;;Hello World example for Gambit/NCurses
 
;;Include our headers
(c-declare "#include <ncurses.h>")
 
;;Define the function
(define hello-world
    ;;C lambda performs c commands, this is a basic ncurses
    ;;example that inits the screen, prints our string, waits
    ;;for input so it stays on the screen, and then kills the window
    (c-lambda () int "initscr(); printw(\"Hello World\"); refresh(); getch(); endwin();" ))
 
;;Gotta remember to call it!
(hello-world)
 

Now link, compile, and run it:

snarky@Reaper$ gsc -link ncurses.scm
snarky@Reaper$ gcc ncurses_.c ncurses.c -lgambc -lncurses -o ncurses
snarky@Reaper$ ./ncurses
Hello World

(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)

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.

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 manual if you're at all interested.

Gotchas

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:

snarky@Reaper$ gsc -link file.scm
snarky@Reaper$ gcc file_.c file.c -lgambc

I very quickly just made a make file to handle it to simply forget about what steps go into it.

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:

For the interpreter:

snarky@Reaper$ gsi -:s

And for the compiler:

snarky@Reaper$ gsc -:s -link file.scm

OR

snarky@Reaper$ gsc -link -e '(load "/usr/local/Gambit-C/lib/syntax-case.scm")' file.scm

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.

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.

Comments (One response so far)

Game Review: Metal Gear Solid 4

Post by: on January 6th, 2009 | Filed Under Game Review, Games

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 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.

Full review below the cut.

Read More »

Comments (No responses yet)

Fallout 3 Hacking Minigame

Post by: on December 20th, 2008 | Filed Under Game Review, Games

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 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.

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.

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 HBH and Hack This Site, and this was probably the simplest one that captures the feel of real hacking.

When you open up a locked terminal, you'll see a screen like the following:

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.

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.

Once you correctly input the password, the computer is forever open to you (and you get 44 experience, regardless of level!).

The Reality
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.

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.

Comments (No responses yet)

Fallout 3

Post by: on December 19th, 2008 | Filed Under Game Review, Games

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 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.

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.

Read More »

Comments (One response so far)

Doom and Gloom… but mostly Gloom

Post by: on November 29th, 2008 | Filed Under Game Review, Games, Interests

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.

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 Gloom in order to feel as good as possible for the concert. I have to say, this game is a winner.

Gloom is made by Atlas Games, a company that makes some fun and compact games, such as Lunch Money 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.

The cards are clear. That's right, clear. The image on the back of the box shows this:


(feel free to ignore the creepy clown, he's but one of 20 characters)

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').

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.

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!".

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 italics):

Player 1 (owner of Grogar): "Grogar, 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 distressed by dysentery." (-25 total Modifier, -15 on top, and -10 in the middle).

Player 2: "Grogar 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 Grogar the family land, all of Egypt! Grogar really landed a legacy." (+15 total modifier, +15 in the center... which wipes out the -10 from above).

Player 3: "After Grogar 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 wondrously well wed!" (+20 total modifier, 0 on top which wipes out the -15 from Player 1's card, +20 on bottom).

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!

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.

Why does it warrant a 4/5?

  • It is unique, its not a rip-off of another idea (aka another CCG, or based off a computer game or movie).
  • I still get a kick out of the clear cards, they look and feel darn cool. The humor is to die for (pun intended).
  • 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.
  • Its a smaller game company, I really like supporting companies like SJ Games, Atlas, etc over mass-producing places like Hasbro. The games feel more unique, and usually have a bit more 'flair'.

So why not a 5/5?

  • 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.
  • 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.
  • It comes in a box, not a tin. This is very common, and I dislike it. See box rant below.
  • 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.

Box Rant:
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 Chez Geek 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.

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.

Comments (No responses yet)

Thieves Tavern – Where all the cool kids play

Post by: on June 28th, 2008 | Filed Under Games, Interests, Programming, Three Planets Software

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 Wikipedia page, or MafiaScum, one of the best forums for it. Harkins and I wrote it into Simud 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'.

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.

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.

The site will go live at Thieves Tavern, 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.

You can follow the development either through Twitter, or in the #thievestavern room on irc.freenode.net, thanks to GitHub.

Comments (One response so far)

Assassin’s Creed

Post by: on April 7th, 2008 | Filed Under Game Review, Games, PS3

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.

Plot: 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.

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.

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.

4/5

Cut scenes: 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.

All I could ask for is, well, an option to skip them just in case they do get a bit long.

4/5

Graphics: 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.

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.

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!

5/5

Gameplay: 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.

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.

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.

5/5

Openendedness (oh yes, that's a word... now): 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.

There, again, is an exception that might be a plot ruiner, but at the end of the game I forgave all of it.

4/5

Ending: 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.

4/5

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.

Comments (2 responses so far)