FunSpIns - a recap of Rob Ashton's lessons - Das Intro
Functional space-invaders series
- FunSpIns - a recap of Rob Ashton's lessons - Das Intro
- FunSpIns - Drawing a Rectangle
- FunSpIns - Moving a Rectangle
- FunSpIns - No attributes, No vectors, A tiny Workflow and more squares
- FunSpIns - State, the World, the Loop
- FunSpIns - The hero must move, the enemies must move smarter.
- FunSpIns - The hero shoots.
- FunSpIns - Collisions, the dead, and a (not so) grateful ending.
So I would be leaving Haskell mainstream. A bit much, and I laid the case to rest, even though the idea is not as absurd as you may think. Then I heard that a Version 2.0 of a libsdl would be coming out, apparently a full blown library to support game development on a number of platforms, and that Haskellians could now update their bindings. Then I also came across a guy who had done a whole series on programming a game with haskell and SDL, (Simple DirectMedia Layer).
Surely, I felt safe enough to get on with the idea, now that I would be able to concentrate on the programming and less on the fringes of getting xyz to run in context a. Yes, I also shower with warm water and prefer to smoke Cohibas. And yes, of course I am not the first guy to use SDL with Haskell, and not the second guy either. Either way, using a different rendering target than envisaged would be a nice motivator to try and get the game logic separated from the rendering. For potential future portability. You know, theoretically speaking.
The necessary incantations, provided you already have Haskell on your Linux, are
sudo apt-get update sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev cabal update cabal install SDL cabal install SDL-image
(cabal is Haskell's package manager)
And with that, we are pretty much ready to tackle the stuff that comes...