New Game Source Code: Star Pusher (Sokoban clone)

Here's a Sokoban ("box pusher") clone called Star Pusher. I've used the graphics from the Planet Cute collection. You'll need Python (2 or 3) and Pygame installed to run it. Just download and unzip the files to the same directory. It comes with 201 levels from David W. Skinner.

Download the source code and graphics.

(UPDATE: I've updated the code so that it works on Linux. It was due to a \r\n newline issue. I've tested the game in Ubuntu and it works.)

The source code is designed to be readable so that new programmers can understand and modify it without much effort.

4 thoughts on “New Game Source Code: Star Pusher (Sokoban clone)

  1. I had to convert the starPusherLevels.txt file to UNIX line endings before the program would run (in vim, type ":set ff=unix" and then write the file). It complained like this otherwise:

    Traceback (most recent call last):
    File "", line 692, in
    File "", line 149, in main
    levels = readLevelsFile('starPusherLevels.txt')
    File "", line 447, in readLevelsFile
    assert startx != None and starty != None, 'Level %s (around line %s) in %s is missing a "@" or "+" to mark the start point.' % (levelNum+1, lineNum, relativePathToThisScript(filename))
    AssertionError: Level 1 (around line 24) in /tmp/starpusher/starPusherLevels.txt is missing a "@" or "+" to mark the start point.

    NOTE FROM AL: I've corrected to code so the newline issue doesn't happen on Unix.

  2. That's what I figured. The only thing I can find that works with python 3 is cx_Freeze which seems to work fine for the most part. I just can't seem to figure out how to get the game to open up without a console opening as well. Actually I did but it also causes some kind of error after I close the game.

Leave a Reply

Your email address will not be published. Required fields are marked *