NotArme/Haskell-Demoscene

★ 0Forks 0HaskellGitHub ↗Compare

README

Haskell Demoscene

This is a basic implementation of a tiny graphics library, along with a demo art inspired by the demoscene subculture.

The project was made for my college's Type-Driven Development class, I also used this as a way to experiment with different features of Haskell by completely reinventing the wheel at times (i.e. Implementing a lot of linear algebra from scratch instead of using built-in features), which makes it more of a learning experiment rather than an actual stable and feature complete library.

The main executable uses gloss-raster to imitate a fragment shader with haskell code, the current implementation is very badly optimized, and can only run at a reasonable fps with a resolution of around 128x128 px.

Dependencies

The gloss-raster lib and sdl2-mixer lib are used for graphics and audio, which may require the following packages:

libsdl2-dev
libsdl2-mixer-dev
libglu1-mesa-dev
freeglut3-dev

Building and Running

Cabal

  • run Cabal build
  • run cabal run -- Haskell-Demoscene.cabal +RTS -N8 to run with default parameters.
  • alternatively, run make run to build and run with default resolution and a random palette.

Docker

  • run make docker-build to build the docker image, then grab some coffee, go for a walk or whatever, it's gonna take a while.
  • run make docker-run to run the project within docker.

Note that docker can be very unstable with GUI software, it may not work as expected on different systems

Preview:

outputpreview.mp4

Contributors

NotArmegithub-classroom[bot]

Issues