A game of pushing and pulling crates through a labirynth, entrant to Github Game-off 2012
CoffeeScript Python
Pull request Compare This branch is 28 commits ahead, 3 commits behind github:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gfx
maps
Makefile
README.md
controls.coffee
crate.coffee
globals.coffee
help.coffee
index.html
insert_map.py
load.coffee
main.coffee
player.coffee
pullable.coffee
pullableCrate.coffee
slide.coffee
target.coffee
wall.coffee

README.md

The game

Hello! Meet こぼさん. That's Japanese for Mr. Kobo. Mr. Kobo works as 倉庫番, Japanese for warehouse keeper, and needs your help with organizing his warehouse!

Pushing

This job traditionally consists of pushing huge crates around the place. Mr. Kobo is quite strong, he can tirelessly push crates bigger than himself! Unfortunately, he is not strong enough to push two of them at the same time.

To push a crate, simply move with arrows or wsad into its position and it will be moved in the same direction.

Pulling

In the last couple years a new type of crate has been developed and is gaining on popularity. It has tiny handles on each side, so this new kind of crate can also be pulled!

To pull a crate, you first need to stand next to it. Then, you can press a shift key and try to move into its position. Mr. Kobo will catch the handle, as in the picture. Then, still keeping shift, you can pull the crate by walking into opposite direction. Once you release the shift key you can move as normal.

Goal

Mr. Kobo's goal is to place all the crates in the appropriate places. Each of them first marked by a red x, until a crate is put on it and it changes to a green v. There is a handy counter in the first line of the screen, showing you how many of the crates have been put in target places. Once all of them are there, you can proceed to the next level.

Due to increasing economical pressure, which some may call a crisis, the warehouse forces efficiency standards on its employees. In the first line of game screen you can see a step counter and a limit. If you exceed the limit, the level will be restarted. Note that every step is counted, even if no crate is pushed nor pulled.

The technicalities

The game is written in a few hundred lines of CoffeScript. A few images were drawn in Inkscape. Images are stiched into a sprite sheet using montage, a part of ImageMagick. You need all of these programs installed to compile the game. Compilation process is governed by a makefile, if you have GNU Make simply issue the make command.

The game is written using Crafty.js framework, with a light touch of JQuery. A version of both will be downloaded automatically during compilation, provided you have either curl or wget installed. Otherwise, you can simply put the files jquery.js and crafty.js in the main directory.