Have been playing some Echo Bazaar - a browser game set in an alternate London.
It's pretty simple but like a lot of these things oddly compelling with only a few actions allowed per day. Best of all it appears to be written in ASP.NET MVC using S#harp Architecture, nice to see interesting stuff being done with the framework.
If you play my twitter name is sal1n...
Heroku is a cloud application platform for Ruby in which deployment is simply a git push. I was curious
to see just how straightforward it actually is to use and so decided to re-write salin.org so that I could deploy it on Heroku.
Although the focus seems to be Ruby on Rails applications, Heroku supports all Rack-based ruby web applications. Because of this I decided to re-write the
site using Padrino, a ruby web framework based on Sinatra. The initial reason I went with Padrino was because I had a load of issues with
Rails 3.0 beta but having now tried Padrino out I highly recommend it - development is straightforward with practically no learning curve if
you already know Ruby.
To deploy the site once I had committed it to git: git push heroku master. Yes it really was that straightforward (obviously I had to install
a heroku ruby gem, set the production config and do the database migration...but we're talking a few lines of code). It must be the most painless
web deployment I've ever done, I really can't recommend Heroku enough.
What are you waiting for?..go and try it out yourself.
I was playing around with Ruby using the Gosu graphics library a few weeks ago whilst waiting for our internet connection to be sorted and ended up kocking together a biomorph implementation in about 200 lines of code (and that was me being verbose, gotta love Ruby).
Biomorphs are virtual creatures as described by Richard Dawkins in his book The Blind Watchmaker.
I guess the point is to show how relative complexity can develop from simplicity in surprising ways using a few simple rules.
The Rubymorph script can be found on Github.
Here is a quick example of the sort of thing it can generate:
Lost Colonies of Guernsey (LCoG) is a game similar to VGA Planets written by James Rowe in
Ruby. I’ve written a client in C# using WinForms to play the game and it is now fully
compatible with version 0.2 of LCoG. It has been tested on Windows (.NET 3.5+ and Mono 2.0+),
OS/X (Mono 2.0+) and Ubuntu Linux (Mono 2.0+).
Find the latest builds and source on Github.
Finally a screenshot:
Pretty it isn't:P
Using a BSP Tree to generate a dungeon is surprisingly simple yet effective.
Start with a rectangle and split it recursively until each sub-rectangle is approximately the size you want your
dungeon rooms to be. The splitting operation is:
- • select a split orientation – vertical or horizontal
- • select a random position (x for vertical, y for horizontal)
- • split and apply above to sub-rectangles (recursive)
…and so on. What you are left with is a BSP tree whose leaf nodes you can use as room containers for your
dungeon. This has numerous benefits – the leaf nodes are guaranteed not to overlap and you can guarantee that
all rooms can be connected by recursively traversing the tree backwards and connecting sub-nodes with corridors.
For Sanguine all I need to generate is an ASCII representation which my Map class can parse to instantiate all
of the Locations using a given key. Here is quick screen shot of a generated small map sans corridors:
Next step – corridors and more interesting room shapes.
After being distracted writing a C# client for LCoG I finally had time away (not to mention limited distractions) to
restart development on my roguelike game. I’ve written 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’ll make the source public on GitHub as soon as I’ve completed the latest iteration which should be the first win-able release.
Here is a teaser screen:
Ok, Fallout 3 it’s not:P
I originally intended to do a blog entry for each country we visited but that didn’t pan out due to
my innate lack of blogging skills. Anyway Gina did a much better job of it than I would have (so why reinvent the wheel:) The second idea was to do a haiku for each country but who has the time?!
So here are some things off the top of my head:
Nepal – beautiful country. bad pollution in Kathmandu. very narrow, overcrowded streets. great food. attacked by leeches on 8 hour hike in torrential rain to Annapurna base camp. stunning mountains.
Tibet – way too controlled by China. beautiful in a very desolate way…whereas Nepal is very lush, Tibet is very barren on the whole. found out I suffer from really bad altitude sickness. found this out at 5200m, felt like dying…gutted when I didn’t:P probably the least vegan-friendly place on earth.
India – amazing food. amazingly crowded. the most terrible pollution in Delhi I’ve ever encountered. The old part of Mumbai really seems like an old version of London by a tropical sea. The Taj Mahal really does live up to the hype.
Thailand – really friendly people. lots of tofu! very relaxed culture. muay thai is a lot of fun. shame about all the sex tourists.
Bill Bryson eat your heart out;)
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, 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 of 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).
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.
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:(
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);
}
Interesting article about the sexualisation of advertising with regards to feminism.
Super Sexualise Me PDF