Category Archives: Uncategorized - Page 2


Moving to WordPress for CMS/blog software instead of editing my own HTML. Let’s see if I pay more attention to it now. I just wasn’t updating the old way, not for lack of content, but because of a laziness threshold that needed to be surpassed whenever manually updating things.

I thought it’d be painful to port over my old content, but so far that’s not the case. I can backdate things without touching the database. I’m also trying to restrain myself from hacking the code to bits, like I did with the IMmerge website. Embrace the built-in features… *deep breath*

I have to say, the dynamically PHP-generated pages load noticeably slower than static HTML. Maybe it’s the server.

2010 WTF Game of the Year

I have named the 2010 WTF game of the year. It includes cars and zombies.

Robot Wants Fishy – complete map

Complete Map (warning: huge picture 662 KB) for Robot wants Fishy, including all item locations.

Solving Continuity Levels with Dijkstra’s Shortest Path

Continuity (game screen)

(This article was originally posted here.)

Continuity is a new Flash game that I was playing recently. It combines platforming and puzzle in a novel way – your character must jump from platform to platform collecting keys to open a door, but must do so inside mini-levels (squares). The macro-game is essentially an 8-puzzle (8 pieces in a 3×3 square grid), where you shift the puzzle pieces using the one empty space, such that your character can succeed in the mini-levels.

This game is perfectly solvable through logic and working backwards, though for some of the harder levels you need to keep a long memory of steps. In short, I became bored and impatient of solving the puzzles in my head, and decided after ~30 levels, it’d be more interesting to automate it by writing a solver.

I also took this opportunity to get familiar with Python, a language well known for its fast prototyping and easy learning curve. I have only worked in Python once, during a 4-month internship 4 years ago, but otherwise, my main skills are in C and Java. However the syntax required to write good algorithms and data structures in these “classic” languages can get quite long and annoying. So I coded up a Python script to solve the final two levels.

The rest of this post details how to develop the solution. The solution is relatively simple because we can just treat each exit in a square as a point in a directed graph, where each edge in the graph A->B specifies that point B is reachable from point A, and then apply a search algorithm through the graph. I chose Dijkstra’s shortest path algorithm, which runs fast and finds the best (shortest) solution. However, my program did require a lot of manual data entering to specify the paths/exits in each puzzle piece, so it wasn’t fully automatic. Perhaps Python has some magic that could automate this :). Lastly, I skipped solving the 8-puzzle, since it’s not necessary.

Read more »