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.
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
- run
Cabal build - run
cabal run -- Haskell-Demoscene.cabal +RTS -N8to run with default parameters. - alternatively, run
make runto build and run with default resolution and a random palette.
- run
make docker-buildto build the docker image, then grab some coffee, go for a walk or whatever, it's gonna take a while. - run
make docker-runto run the project within docker.
Note that docker can be very unstable with GUI software, it may not work as expected on different systems