All Projects → ivanperez-keera → Haskanoid

ivanperez-keera / Haskanoid

Licence: other
A breakout game in Haskell using SDL and FRP, with Wiimote and Kinect support.

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Haskanoid

Anese
Another NES Emulator - written for fun & learning - first implementation of wideNES
Stars: ✭ 323 (+33.47%)
Mutual labels:  sdl2, sdl
Phaser Tilemap Plus
Tilemap animations, physics, events and custom property enhancements for Tiled JSON map files
Stars: ✭ 44 (-81.82%)
Mutual labels:  collision, physics
Doomretro
The classic, refined DOOM source port. For Windows PC.
Stars: ✭ 349 (+44.21%)
Mutual labels:  sdl2, sdl
Yampa
Functional Reactive Programming domain-specific language embedded in Haskell, for programming efficient hybrid (mixed discrete-time and continuous-time) systems.
Stars: ✭ 294 (+21.49%)
Mutual labels:  frp, sdl
Xray 16
Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. Join OpenXRay! ;)
Stars: ✭ 1,806 (+646.28%)
Mutual labels:  sdl2, sdl
Glportal
🎮 Open Source teleportation based first person puzzle-platformer
Stars: ✭ 297 (+22.73%)
Mutual labels:  sdl, physics
Fortran Sdl2
Fortran 2008 interface bindings to SDL 2.0
Stars: ✭ 18 (-92.56%)
Mutual labels:  sdl2, sdl
zero-graphics
Application framework based on OpenGL ES 2.0. Runs on desktop machines, Android phones and the web
Stars: ✭ 72 (-70.25%)
Mutual labels:  sdl, sdl2
Supertux
SuperTux source code
Stars: ✭ 1,120 (+362.81%)
Mutual labels:  sdl2, sdl
Sdl kitchensink
A Simple SDL2 / FFmpeg library for audio/video playback written in C99
Stars: ✭ 53 (-78.1%)
Mutual labels:  sdl2, sdl
Vado
A demo web browser engine written in Haskell
Stars: ✭ 265 (+9.5%)
Mutual labels:  sdl2, sdl
Div Games Studio
Complete cross platform games development package, originally for DOS but now available on modern platforms.
Stars: ✭ 168 (-30.58%)
Mutual labels:  sdl2, sdl
EnttPong
Built for EnTT, at the request of the developer as a demo.
Stars: ✭ 51 (-78.93%)
Mutual labels:  sdl, sdl2
Pygame
pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.
Stars: ✭ 4,164 (+1620.66%)
Mutual labels:  sdl2, sdl
SDL.zig
A shallow wrapper around SDL that provides object API and error handling
Stars: ✭ 102 (-57.85%)
Mutual labels:  sdl, sdl2
Libsdl2pp
C++11 bindings/wrapper for SDL2
Stars: ✭ 385 (+59.09%)
Mutual labels:  sdl2, sdl
faur
⚒️✨ My personal C games framework. 2D graphics, sound, inputs, states, ECS, and misc utils for data, files, math, memory, strings, time, and more. Builds for Linux, Windows, Web, and embedded devices.
Stars: ✭ 55 (-77.27%)
Mutual labels:  sdl, sdl2
BonEngineSharp
A simple and fun SDL-based game engine in C#.
Stars: ✭ 16 (-93.39%)
Mutual labels:  sdl, sdl2
Chocolate Doom
Chocolate Doom is a Doom source port that is minimalist and historically accurate.
Stars: ✭ 1,052 (+334.71%)
Mutual labels:  sdl2, sdl
Ffmpeg Video Player
An FFmpeg and SDL Tutorial.
Stars: ✭ 149 (-38.43%)
Mutual labels:  sdl2, sdl

Version on Hackage Flattr this git repo

This is a Haskell breakout game implemented using the Functional Reactive Programming library Yampa.

Haskanoid Video

The game has been created for educational purposes, but tries to feature a substantial amount of the complexity often found in real arcade games. In particular:
  • SDL 1.2 graphics and sound.

  • Multiple input devices (keyboard, mouse, Wiimote infrared, Kinect).

  • Differentiated subsystems for physics/collisions, input, rendering/multimedia, logic, etc.

A version of this game using SDL2 has been made available by Keera Studios for free on Google Play for Android. There is a bug that makes the app not close or save the game when you exit it. I know how to solve it, I just haven't found the time to push that change. Please, report other bugs of that Android app here. You can follow the progress of the port for Android on facebook and twitter.

Haskanoid on Android

We would like to call on Haskell programmers, game developers and anyone with an interest in Functional Reactive Programming and/or Game Programming to review the code, ask for clarification when the code is not clear enough, and help us improve the game, and the state of FRP/Yampa programming as well.

This game was used to present a Declarative Game Programming tutorial at PPDP 14 (see http://keera.co.uk/blog/2014/09/24/game-programming-videos-code/ for details). Slides are linked from that website.

Installation

The game is available on hackage. All the media resources are included with the distribution (see LICENCE for redistribution terms). You can install it with*:

$ cabal update
$ cabal sandbox init
$ cabal install haskanoid
$ ./.cabal-sandbox/bin/haskanoid

If you want to explore the code and possibly make changes, do the following:

$ cabal update
$ cabal unpack haskanoid            # or git clone http://github.com/ivanperez-keera/haskanoid
$ cd haskanoid-*                    # Game resources are here
$ cabal sandbox init
$ cabal install
$ ./dist/build/haskanoid/haskanoid

To play it with the wiimote, you need to run the program with the special arguments +RTS -V0. See http://github.com/ivanperez-keera/hcwiid for an explanation.

*Additional notes:

  • Users of GHC 7.8 need to run additional steps. See issue #2 for instructions.

  • MacOSX users (or anyone without a wiimote) might want to disable wiimote and kinect support. You can do so with the cabal flags wiimote and kinect, by running cabal install --flags="-kinect -wiimote".

  • To use of the above installation instructions (with disabled wiimote and kinect support, see bullet point above) you need the following packages:

    On debian/ubuntu, you can install them with:

    $ sudo apt-get install ghc cabal-install
    $ sudo apt-get install libsdl1.2-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev
    
  • To enable wiimote and kinect support you also need the following packages:

    • CWiid (wiimote)
    • freenect (kinect)

    On debian/ubuntu, you can install them with, respectively:

    $ sudo apt-get install libcwiid-dev
    $ sudo apt-get install freenect
    

Documentation

To try and make things as clear as possible, the code includes a much haddock documentation and comments as we could reasonably fit. You can compile those with:

$ cabal unpack haskanoid     ## Or git clone this-repo
$ cd haskanoid-*
$ cabal sandbox init
$ cabal install --only-dependencies
$ cabal configure && cabal haddock --executables --internal

Related projects

Hands-on

In the hands-on file you find ideas to improve haskanoid while focussing on (game) programming related areas that you might want to dive in deeper. The areas are: functional (reactive) programming, performance, human-computer interaction and input/output, and game design.

Educators

If you find this game attractive and would like to use it to teach functional programming or other subjects, we'd be very happy to know about it. We can provide extra material that you can show to students (videos, screenshots, etc.).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].