The Rats Nest




so did everyone who watched looney tunes as a kid go through a period where they wondered what the fuck anvils were for or were other kids way hipper to the blacksmith’s trade than i was?

I always assumed they were for crushing your enemies

but I assume that about a lot of things

(Source: queendirectory)

Mar 7



A few weeks ago, my phone started having problems. It was relatively minor; the 3.5mm audio jack stopped working and I’ve had to carry around an old MP3 player since. It was a minor annoyance, but it made me realize something. The smartphone I depend on to not get lost, to keep track of…

Mar 4

lethargy and a complete lack of motivation really suck

Mar 2

Unity support for Sublime Text

How I managed this can be found here

This has auto-complete for any and all C#/Unity methods/variables, and optionally for any code you write and compile.

Mar 1

I should probably start tagging my posts. You know, for that whole exposure thing…

I learned something today…

Animating things (and getting things positioned where you want them) using the old OpenGL fixed pipeline is an utter pain in the ass.

One of the things we’re trying to do in Electrodynamics (a Minecraft mod I’m currently working on along with some others) is make blocks that, while they fit the general blocky theme, also have some impressive visuals in terms of animations.

While this is all well and good, being forced to use the old fixed pipeline of OpenGL 2 (?) and below is actually quite difficult at times, and I can see why people appreciate the new way of doing things.

For those who don’t know, OpenGL used to handle things in a very fixed way. You did a lot of your manipulation using actual lines of code.


GL11.glTranslated(x, y, z);


// Essentially this sets the pivot point for the next rotation
GL11.glTranslated(0.0625F * 2, 0, 1 - (0.0625F / 2));

GL11.glRotated(-tileBasicKiln.currentAngle, 0, 1, 0);

// We then reverse that translation to keep the actual render at the proper point
GL11.glTranslated(-(0.0625F * 2), 0, -1 + (0.0625F / 2));



Nowadays, it’s a lot more versatile, if complicated at first (these are my opinions, others would disagree with me. cough Alexis cough).

My point is, actually getting rendering to do what you want it to is a pain in the ass. Since we wanted to do fancy animations, I’ve had to figure out how to do those at the most basic level, and the example code above shows some of that (in this case, the animation of a door swinging open). It takes a lot of time and tweaking values by small amounts to get things as perfect as possible.

Still, in the end it’s quite worth it.

Enabling code blocks on tumblr


Just so to make things easier for a lot of developers trying to get code blocks working on tumblr:

public string Celebration()
{ return "yey, simple code blocks on tumblr!";

Number 1: Append this to your CSS:

pre { padding: 15px; background: #333; color: #fff; border: 1px solid #222;

Testing Twitter integration

Have a bunny

Experimenting with random level generation in Unity

You can now play with this!

Inspired by supermeerkat’s post about his cave generator (found here), I wanted to see what all I could pull off. I started out by researching various procedural generation algorithms, and eventually settled on one aptly called “Drunken Walking”.

The concept itself is quite simple. Given a starting set of coordinates, you move that point in a random cardinal direction each cycle (or walk, as I’ve come to reference it as). This has the effect of giving you a random path, but one that’s always connected. The downside however is you generally don’t get anything more advanced than random blobs. That’s when you bring in the concept of biases.

The bias concept is also quite simple. Given a random chance, the direction the point is moved is based on certain criteria instead of a random direction. The code I’ve written includes three of these. A corridor bias, which increases the chance of the point to move in the same direction, one that influences the point to move towards the center of the grid, and once that influences it back towards the origin coordinates.

I also went ahead and added two more things that may not generally be associated with this particular algorithm. One is cave smoothing, which simply scans through the entire grid and turns any small gaps into part of the surrounding cave, and the ability to prevent going back to already visited cells.

If you’re interested in any of this, I’ve linked both the generation script, and a script for rendering it inside Unity, below.


Handles the actual map generation, and is completely separate from Unity


Handles rendering the map generated via the script above


A simple GUI controller for generating maps whilst in-game