Still alive

23 Oct


I am still alive and will update this site when I get the chance, probably not until I get to Thailand in late December/early January.


PanRL first ever screenshot!

25 Aug


After being distracted writing a C# client for LCoG I’ve finally had time to restart development on my roguelike game.  I’m writing it in Ruby and instead of using the traditional Ncurses approach for the UI I’ve opted for a tile-based implementation using the fantastic libgosu.

I’ve got the basic framework pretty much complete including field of vision, pathfinding and timing system.  Next step AI for NPC’s.  Here is the first ever screenshot:

PanRL Screenshot

PanRL Screenshot

Ok Fallout 3 it’s not:P


Installing Ruby 1.9 on OS/X 10.5.7

24 Aug


OS/X comes with Ruby 1.8.6 pre-installed which is brilliant but updating it not so straightforward, also anyone attempting a gem update -system will end up with a lovely broken system. To fix this and since Ruby 1.9 is so much faster here’s a short guide on how to clean up your system and end up with single Ruby 1.9 install with gems that update nicely.

First off remove all the old files (I suggest making a note of your existing gems so you can install them again afterward):

sudo rm -r /System/Library/Frameworks/Ruby.framework/
sudo rm -r /Library/Ruby
sudo rm /usr/bin/ruby
sudo rm /usr/bin/gem

Install MacPorts

Brings the greatness of BSD Unix ports to OS/X – MacPorts.

Install Ruby 1.9

sudo port install ruby19 +nosuffix

Et voila

Ruby 1.9 nicely installed via MacPorts.  Ruby 1.9 has RubyGems built in so need to install that separately.  Just gem install your required gems.  My only caveat is that some gems don’t seem to install their dependencies but this is easily solved by explicitly installing them.  Apart from that all should work bar some possibly PATH issues (I had to point TextMate at /opt/local/bin to get the in-editor interpreter working).


Ukemi

4 Aug


Posted verbatim from a post on JudoForum, useful distinction of forward ukemi (mae/zenpo?):

You seem to be confusing the use of a roll to practice a vertical breakfall, and a true-rolling breakfall. For vertical breakfall practice returning to your feet is just kind of an extra bonus that speeds up practice a bit.

You want to fall with your body extended, not balled up. This is the way you typically fall with judo throws which deliver you straight down to the ground (try rolling out of a harai goshi sometime). In this type of fall, to get up you do not tuck your leg underneath or allow your body to curl up. Rather you land in a good, extended ukemi position and then tense up you body and leg and look behind yourself. Your whole body will lurch right up. This sounds a bit goofy, but it prevents the habit of tucking legs, etc. that can be very detrimental when you are taking a vertical fall.

A “true” rolling breakfall, or roll-out (i.e with the leg tucked under to roll up) is more applicable to techniques that project you outwards when thrown, rather than vertically down to the mat. Many (most?) Aikido throwing techniques project uke outwards rather than straight down, so roll-outs are very popular among the Aikido set, and are generally what you see them doing. If you ever work out with an Aikido person you also have to be careful throwing them, because some of them do not really know how to deal with the type of vertical fall that Judo techniques typically deliver. They may not realize the difference, so don’t throw them too hard the first time.

To break the rolling breakfall into its most basic component, we have our students squat with their butts only a few inches off the ground. Put one foot forward, put the hand of the same side as the foot on the mat (palm down) with your fingers facing towards your body. Now do a slow motion roll-drop to your front knee, then bend and touch your shoulder, once your shoulder touches push off with your back feet and roll across your shoulders. You should feel the mat from one shoulder to the other. As you roll over, allow your legs to extend out and land in the side ukemi position.

Neither one of these types of breakfall are absoloutely right or wrong. They are most applicable to different situations. The majority of Judo throws are going to require a vertical-type breakfall. However, on hard surfaces a rolling type breakfall is going to beway easier on your body. The best thing is to know how to do both types and when to do them.


Go

29 Jul


Just started playing Go again, forgot what a mad game it is. Despite knowing how to play I still have no idea how to actually play if that makes sense;)

Been playing a lot against GNU Go using the Goban client on OS/X. Have even played a couple of games online…currently without a victory:(


Distance between 2 points on a torus

22 Jul


Looking for a really handy function to calculate the distance between 2 points on torus (think 2-dimensional grid that wraps around)?

Here is a simple C# implementation:

public static double Distance(Point a, Point b, int size)
{
    int x = Math.Abs(b.X - a.X);
    int y = Math.Abs(b.Y - a.Y);

    int minX = Math.Min(x, (size - x));
    minX *= minX;

    int minY = Math.Min(y, (size - y));
    minY *= minY;

    return Math.Sqrt(minX + minY);
}

Super Sexualise Me

17 Jul


Interesting article about the sexualisation of advertising with regards to feminism.

Super Sexualise Me


Sorting Generic Collections

16 Jul


// handy c# snippet I often use for sorting generic collections
// using generic List of type Foo

list.Sort(delegate(Foo foo1, Foo foo2) {
    return foo1.bar.CompareTo(foo2.bar);});

Short and sweet;)


Recent Posts

Tag Cloud

Meta

Homepage and blog of Steve Andrews from Guernsey

Powered by WordPress

Valid XHTML 1.0 Transitional

Copyright ©2009