immutaball-core: Immutaball platformer game

[ games, library, program ] [ Propose Tags ] [ Report a vulnerability ]

The Immutaball platformer game is a rewrite of Neverball in Haskell.


[Skip to Readme]

Modules

  • Control
    • Monad
      • Trans
        • Control.Monad.Trans.MaybeM
  • Immutaball
    • Ball
      • Immutaball.Ball.CLI
        • Immutaball.Ball.CLI.Config
      • Immutaball.Ball.Game
      • Immutaball.Ball.LevelSets
      • Immutaball.Ball.Main
      • State
        • Immutaball.Ball.State.Game
        • Immutaball.Ball.State.LevelSelect
        • Immutaball.Ball.State.LevelSets
        • Immutaball.Ball.State.Play
        • Immutaball.Ball.State.Preplay
        • Immutaball.Ball.State.Title
    • Immutaball.Prelude
    • Putt
      • Immutaball.Putt.CLI
        • Immutaball.Putt.CLI.Config
      • Immutaball.Putt.Main
    • Share
      • Immutaball.Share.AutoPar
      • Immutaball.Share.Config
        • Immutaball.Share.Config.Parser
        • Immutaball.Share.Config.Printer
      • Immutaball.Share.Context
        • Immutaball.Share.Context.Config
      • Immutaball.Share.Controller
      • Immutaball.Share.GLManager
        • Immutaball.Share.GLManager.Config
        • Immutaball.Share.GLManager.Types
      • Immutaball.Share.GUI
      • Immutaball.Share.ImmutaballIO
        • Immutaball.Share.ImmutaballIO.BasicIO
        • Immutaball.Share.ImmutaballIO.DirectoryIO
        • Immutaball.Share.ImmutaballIO.GLIO
        • Immutaball.Share.ImmutaballIO.SDLIO
      • Immutaball.Share.Level
        • Immutaball.Share.Level.Analysis
          • Immutaball.Share.Level.Analysis.LowLevel
        • Immutaball.Share.Level.Attributes
        • Immutaball.Share.Level.Base
        • Immutaball.Share.Level.Parser
        • Immutaball.Share.Level.Render
        • Immutaball.Share.Level.Utils
      • Immutaball.Share.Math
        • Immutaball.Share.Math.Core
        • Immutaball.Share.Math.X3D
      • Immutaball.Share.SDLManager
        • Immutaball.Share.SDLManager.Config
        • Immutaball.Share.SDLManager.Types
      • Immutaball.Share.State
        • Immutaball.Share.State.Context
      • Immutaball.Share.Utils
      • Immutaball.Share.Video
        • Immutaball.Share.Video.LowLevel
        • Immutaball.Share.Video.Shaders
      • Immutaball.Share.Wire

Flags

Manual Flags

NameDescriptionDefault
add-default-compiler-flags

Add default set of compiler flags.

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.4.1
Dependencies array (>=0.5.8.0 && <0.6), async (>=2.2.5 && <2.3), base (>=4.9 && <9.5), bytestring (>=0.11.0.0 && <0.13), containers (>=0.6.0.1 && <0.8), curl (>=1.3.8 && <1.3.9), directory (>=1.3.8.4 && <1.4), filepath (>=1.4.2.2 && <1.6), gl (>=0.9 && <0.10), i18n (>=0.4.0.0 && <0.5), immutaball-core, JuicyPixels (>=3.3.9 && <3.4), lens (>=5.3.2 && <5.4), libvorbis (>=0.1.0.2 && <0.2), mtl (>=2.2 && <2.4), OpenGL (>=3.0.3.0 && <3.1), parallel (>=3.2.2.0 && <3.3), parsec (>=3.1.17.0 && <3.2), pipes (>=4.3.16 && <4.4), prettyprinter (>=1.7.1 && <1.8), sdl2 (>=2.5.5.0 && <2.6), sdl2-ttf (>=2.1.3 && <2.2), stm (>=2.5.1.0 && <2.6), text (>=2.1 && <2.2), time (>=1.12 && <1.15), transformers (>=0.5.0.0 && <0.7), unbounded-delays (>=0.1.1.1 && <0.2), wires (>0.2.1 && <0.3) [details]
License 0BSD
Copyright 2024, Byron Johnson
Author Byron Johnson
Maintainer bjohnson@nibzdil.org
Category Games
Home page https://nibzdil.org/
Bug tracker https://nibzdil.org/
Source repo head: git clone https://github.com/nibzdil/immutaball
this: git clone https://github.com/nibzdil/immutaball(tag v0.1.0.4.1-hackage)
Uploaded by ByronJohnson at 2025-04-10T14:09:37Z
Distributions
Executables immutaputt, immutaball
Downloads 2 total (2 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2025-04-11 [all 2 reports]

Readme for immutaball-core-0.1.0.4.1

[back to package description]

Prototype

Currently this project only implements basic parts of the game: minimal GUI, basic physics, and a renderer. Much of the game is currently unimplemented (audio, goals, moving bodies, gameplay mechanics, a more efficient physics implementation), but this project still serves as a useful example of a purely functional FRP application.

Currently the physics does not apply BSP partitioning but brute force checks collisions with every body in the level each frame. Larger levels can't handle this, but many of the levels in the first three level sets are playable.

Immutaball

Immutaball is a rewrite of Neverball in Haskell. It is useful for gaming and studying a purely functional FRP application. It does not use IO except for interfacing with external dependencies and ‘base’/‘haskell2010’ IO primitives like writing to a file (including concurrent evaluation).

Screenshots and demo

screenshot: readme-screenshot0-v0.1.0.1.png

Demo video: https://byronjohnson.net/immutaball/immutaball-v0.1.0.1-demo.html

Build notes

wires 0.2.1

As of 2024-09-27, the latest wires dependency, v0.2.1, is a little out of date. Simply building a new local version e.g. v0.2.1.0.1, with updated dependency upper bounds with a new semialign dependency with the following changes is sufficient to build wires.

Thus this package depends on wires > v0.2.1.

To ensure that wires has consistent dependencies with this package, I recommend you copy the build-deps from this package and append them to your local wires source package, and then manually install the local wires source package by running ‘cabal install --lib’ inside your git clone (this adds to the user cabal store and updates e.g. ~/.ghc/x86_64-linux-9.4.2/environments/default), with the changes mentioned, including increasing the upper bounds of ‘wires’'s existing dependencies (see ‘New Dependencies’). Otherwise when building this package, local packages such as your locally install ‘wires’ would be fixed to the dependencies chosen when you built it, which may be incompatible with this package's dependencies.

Old build tips:

(You may build it with ‘cabal install --lib --package-env=./package-env.txt’, looking for the package-db path inside ./package-env.txt afterwards, and then building immutaball with e.g. ‘cabal build --package-db=~/.local/state/cabal/store/ghc-9.4.2/package.db’)

(You may also consider manually installing all deps with ‘cabal install --lib dep’ before building old deps like wires, to help it pick recent versions of dependencies, without later failing to choose newer dependencies because wires was earlier built with older dependencies and must be re-built. Alternatively, comment out ‘wires’ from the .cabal file, run cabal build so it builds the dependencies except for ‘wires’, and then uncomment ‘wires’.)

(Finally, adding a ‘text >= 2.1.1 && < 2.2’ version to ‘wires’ before installing it with ‘cabal install --lib’ inside the git clone may help cabal build this package. Additionally, you can even copy this package's dependencies and append them to wires' dependencies to ensure the dependencies are consistent.)

Semialign change

In Control/Wires/Internal.hs, replace

instance Align Event where
    nil = NotNow

with

instance Align Event where
    nil = NotNow
instance Semialign Event where

Utils change

In Control/Wires/Utils.hs, replace

import Data.These

with

import Data.These.Combinators

New dependencies

base >= 4.8 && < 5,
deepseq >= 1.4.0 && < 1.7,
mtl >= 2.0 && < 5.7,
profunctors >= 5.0 && < 5.7,
semigroupoids >= 5.0 && < 6.1,
these >= 0.7.0 && < 1.3,
semialign >= 1.3.1 && < 1.4

Usage example

(cd -- "${HOME}/git/neverball" && make -j7)  # build neverball
cabal run --package-db="${HOME}/.local/state/cabal/store/ghc-9.13.20240927/package.db" immutaball -- -d ~/git/neverball/data