cadence: An ECS-based 2D game framework

[ bsd3, game, game-engine, library, program ] [ Propose Tags ] [ Report a vulnerability ]

Modules

  • Cadence
    • Cadence.Draw
    • Cadence.Font
    • Cadence.Systems
    • Cadence.Texture
    • Cadence.Types

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies aeson (>=2.1.2.1 && <2.3), apecs (>=0.9.6 && <0.10), base (>=4.7 && <5), bytestring (>=0.11.5 && <0.12), cadence, containers (>=0.6.7 && <0.7), linear (>=1.22 && <1.24), random (>=1.2.1.3 && <1.4), random-shuffle (>=0.0.4 && <0.1), sdl2 (>=2.5.5 && <2.6), sdl2-image (>=2.1.0 && <2.2), sdl2-ttf (>=2.1.3 && <2.2), template-haskell (>=2.20.0 && <2.21), text (>=2.0.2 && <2.1), vector (>=0.13.1 && <0.14) [details]
License BSD-3-Clause
Copyright 2026 Nicholas Mason-Apps
Author Nicholas Mason-Apps
Maintainer nicholas.masonapps1@gmail.com
Uploaded by nicholasmasonapps at 2026-04-05T13:26:48Z
Category Game, Game Engine
Home page https://github.com/NicholasMason-Apps/cadence#readme
Bug tracker https://github.com/NicholasMason-Apps/cadence/issues
Source repo head: git clone https://github.com/NicholasMason-Apps/cadence
Executables noughts-and-crosses, hungeon
Downloads 0 total (0 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 2026-04-05 [all 2 reports]

Readme for cadence-0.1.0.0

[back to package description]

Cadence

cadence is a video game framework built on-top Apecs and SDL, providing tools to allow people to get up and running easily with apecs and sdl2 for 2D game development in Haskell. More specifically, the package provides tools to minimise the boilerplate of SDL, and allow users to cleanly do rendering using a Type system. Additionally, since under the hood the package uses sdl2, users are able to freely control the window, renderer, etc. through utilising sdl2's API.

High-Level Overview

Below is a high-level overview of what cadence currently provides:

  • Built-in rendering - through using a Type system and apecs Component system, users are able to avoid manually doing rendering calls in SDL by calling a single function to do it for them, allowing for layered rendering, camera manipulation, and more. This rendering is also optimised, such as employing frustum culling.
  • Automated frame handling and running of game loop - cadence exposes a run function which handles frame deltas, exact time deltas, and more to accurately run your game loop to the desired frame rate, with frame-independent time deltas.
  • Automated animation handling - textures simply need to be specified as an Animation, and cadence will handle the progressing of animations through sprite sheets for you, as well as the displaying of them during the rendering pipeline.
  • Streamlined asset loading - textures and fonts can be loaded easily into corresponding maps, making use of the flyweight pattern for optimised memory usage, and reducing errors on your end.

Below are links to help people get familiar with the package and what it provides, as well as Apecs and SDL:

Examples

Two examples are currently bundled with Cadence. To run them, clone the repository and execute either of the following:

  • stack run noughts-and-crosses
  • stack run hungeon