Silkworm Game written in Haskell
Author: Duane Johnson
2
May
The semester is over, my final project was a success (at least in that I passed the class) and it’s time now to release the game I made for Graphics 455: Silkworm!
This is my first full application in Haskell. The process has been an enlarging experience–I’ve come to really enjoy the mental work that goes into thinking about a program in a functional way. I highly recommend the challenge to other software engineers.
It’s built to work on Mac OS X, but it uses cross-platform libraries so it should be fairly easy to port to other platforms. The
source code is here and below are some screenshots:
See and download the full gallery on posterous
Posted via email from Duane’s Quick Posts
Filed under: Uncategorized
8 Responses for "Silkworm Game written in Haskell"
Hi Duane,
That’s really cool.
Can you put it on hackage?
Martijn.
@Martijn: Thanks! With Don Stewart’s help, I’m going to get it ready for hackage as well. Stay posted
Seems pretty nice.
However, I’m having problems to run it. After installing the dependencies (OpenGL, pngloader, parsec and another one I can’t remember), I tried to run it and just after the window was created, I received the error:
SilkwormGame: ~/…/Silkworm/background.png: openBinaryFile: does not exist (No such file or directory)
Then I did:
cp Resources/background.png ./
Tried to run again and:
SilkwormGame: silkworm.obj: openFile: does not exist (No such file or directory)
And now I’m stuck. Any idea?
@Fernando: Which operating system are you running on? I’ve only tested in Mac OS X, which has the interesting quality of using the application’s “Resources” directory as the “current working directory”. I’m betting that this is where you are running into trouble. If you’re on a Mac, try “make run” at the command line… it should wrap the game up into a Mac “Application” with the directories in the right spots.
If not on Mac, then we can continue to try new things to get it working as long as you’re willing…
Pretty cool stuff. I am running Leopard and for some reason the background png doesn’t load right. Otherwise, it’s pretty neat.
On a “normal” Unix:
mv main.hs Main.hs
make
cd Resources
../SilkwormGame
Interesting. Please make a library out of that graphics and physics stuff.
This may come a little too late; I just learned of ur game.
To run it on Linux you need to:
tar -xzf Silkworm.tgz
cd Silkworm
mv main.hs Main.hs
make
cp Resources/background.png .
cp Resources/dirt-texture.png .
cp Resources/silkworm.obj .
./SilkwormGame
The game menu has a glitch, however: when restarting a game (after getting cought in one of those pits XD ) all text in the menu is replaced by the not-so-appealing textured-box…
The app itself is very impressive btw.
Leave a reply