Skip to content

drobnik/valhalla-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

valhalla-engine Build Status

Purely functional 2D game framework sprinkled with some ugly IORefs

This is the implementation of 2D tile-based game engine in Haskell done as a part of my Bachelor Thesis "Implementing 2D Game Engine in Haskell". Game events and engine loop are implemented using the concept of monads and mutable IORef references.


Note: Many fatures are missing and project should be treated as a proof-of-concept instead of fully operating library.


The created library delivers ready-to-use components such as:

  • Rendering module with simpe RenderCommand pipeline (greatly inspired by HGE2D)

  • Simple, naïve maps and assets loading

  • Simple keyboard handling

  • Window and Content Manager

  • Collision detection

The project was developed using stack tool and GHC 7.10.3 compiler. [TODO: Check against other versions].
Rendering pipeline and graphics components are programmed using SDL2 Haskell bindings.

Requirements

Linux

Before jumping straight for stack install (if you have one already), make sure you have libsdl2 on board:

$ sudo apt-get install libsdl2

Or you may want to compile it yourself.

Windows

There are some issues with stack configuration on Windows but if you want, you can give it a try.
Additionally, you may need this.

Installation

  1. Get the sources
git clone https://github.com/drobnik/valhalla-engine
cd valhalla-engine
  1. Install the depedencies
stack install --dependencies-only
  1. Build the project
stack build
  1. Enjoy

Running

If you want to see sample game* graphics and movement, type:

stack exec valhalla-engine-exe

* - the game logic and collisions are turned off for now, sorry about that.

Screen

'Valhalla in less than 5 minutes' tour

[TODO]

About

2D tile-based game engine written in Haskell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published