Code Monkey home page Code Monkey logo

sokoban's Introduction

Sokoban Haskell Live Coding

Code from my haskell live coding session of the game Sokoban in haskell.

The challenge was Ruby Quiz #5 - Sokoban.

You can watch the live coding video and many more at Haskell Uncut

You can find Windows executables in the Download Section. Latest binary (could be historic)

How to Play

Cursor keys move the worker

'r' reloads the level

'n' skips to the next level

'q' quits the game

Status

In the first session I implemented a simple console based visualization without any bells and whistles.

In the second session I implemented a rudimentary GUI version based on GTK2HS with snazzy sprites.

Attribution

Haskell code in the root directory is licensed as MIT License. Other resources and images have license information in their respective directories.

Sprites: "Danc's Miraculously Flexible Game Prototyping Tiles" art by Daniel Cook ( Lostgarden.com )

Install on Linux / Ubuntu:

sudo apt-get install libghc-cairo-dev libghc-gtk-dev
sudo apt-get install [cairo and gtk development libraries]
ghc --make SokobanGUI

Install on Windows:

Install "GTK All-in-one bundle" (http://www.gtk.org/download/win32.php)
Unzip (for example to "C:\gtk")
Add "C:\gtk\bin" to System Path
Open a new console
Execute "gtk-demo" on console to check if it worked

Install "Haskell Platform" (http://www.haskell.org/platform)
cabal update
cabal install gtk2hs-buildtools
cabal install gtk (this will take quite a while)
cabal --make SokobanGUI
(If necessary copy zlib1.dll from GTK folder into Sokoban folder)

sokoban's People

Contributors

codinguncut avatar

Watchers

Chen Junming avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.