imj-game-hamazed: A game with flying numbers and 8-bit color animations.

[ animation, application, bsd3, education, game, graphics, library, program ] [ Propose Tags ]
Change log
Dependencies base (>=4.8 && <4.11), containers (>=, imj‑animation (==0.1.*), imj‑base (==0.1.*), imj‑game‑hamazed, imj‑prelude (==0.1.*), matrix (>=, mtl (>=2.2.1 && <2.3), terminal‑size (>= && <0.3.3), text (==1.2.*), vector (>= && <0.12.1) [details]
License BSD-3-Clause
Copyright 2017 - 2018 Olivier Sohn
Author Olivier Sohn
Category Animation, Game, Graphics, Education, Application
Home page
Bug tracker
Source repo head: git clone
Uploaded by OlivierSohn at Mon Jan 1 10:15:44 UTC 2018
Distributions NixOS:
Executables imj-game-hamazed-exe
Downloads 91 total (8 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

In Hamazed, you are a BattleShip pilot surrounded by flying Numbers.

Your mission is to shoot exactly the Numbers whose sum will equate the current Level 's target number.

The higher the Level (1..12), the more Numbers are flying around (up-to 16). And the smaller the World gets.

Good luck !

[Skip to Readme]


  • Imj
    • Game
      • Imj.Game.Hamazed
        • Imj.Game.Hamazed.Color
        • Imj.Game.Hamazed.Env
        • Imj.Game.Hamazed.Infos
        • Imj.Game.Hamazed.KeysMaps
        • Imj.Game.Hamazed.Level
          • Imj.Game.Hamazed.Level.Types
        • Loop
          • Imj.Game.Hamazed.Loop.Create
          • Imj.Game.Hamazed.Loop.Deadlines
          • Imj.Game.Hamazed.Loop.Event
            • Imj.Game.Hamazed.Loop.Event.Priorities
            • Imj.Game.Hamazed.Loop.Event.Types
          • Imj.Game.Hamazed.Loop.Render
          • Imj.Game.Hamazed.Loop.Run
          • Imj.Game.Hamazed.Loop.Timing
          • Imj.Game.Hamazed.Loop.Update
        • Imj.Game.Hamazed.Parameters
        • Imj.Game.Hamazed.Types
        • Imj.Game.Hamazed.World
          • Imj.Game.Hamazed.World.Create
          • Imj.Game.Hamazed.World.InTerminal
          • Imj.Game.Hamazed.World.Number
          • Imj.Game.Hamazed.World.Render
          • Imj.Game.Hamazed.World.Ship
          • Imj.Game.Hamazed.World.Size
          • Imj.Game.Hamazed.World.Space
            • Imj.Game.Hamazed.World.Space.Types
          • Imj.Game.Hamazed.World.Types



Maintainer's Corner

For package maintainers and hackage trustees

Readme for imj-game-hamazed-

[back to package description]

What is it?

It's a terminal ascii game where you fly a ship through numbers. The goal is to shoot the numbers whose sum will be equal to the level's target. It's easy at the beginning, but higher levels have more and more numbers, and less and less space to navigate through them! The last level is level 12: I never reached it, but I hope somebody will :).


No walls, square world


Random walls, rectangular world



The game can be configured in "world shape" (square, rectangle) and "kind of walls" (none, deterministic, random).

Configuration snapshot

You can define your own keyboard mapping by modifying the 'eventFromKey' function defined here, the default mapping being:

  • ship acceleration : 's' 'e' 'd' 'f'
  • laser shots : 'j' 'i' 'k' 'l'

Supported Platforms / Terminals:

|OS |Support| |---------|-------| |OS X |Yes | |Linux |Yes | |Windows |No (see this) |

Your terminal window should have a dimension of at least {height = 42, width = 146}. If it is too small, the program will fail with the following error message:

From game thread:

Minimum terminal size : Window {height = 42, width = 146}.
Current terminal size : Window {height = 22, width = 165}.
The current terminal size doesn't match the minimum size,
please adjust your terminal size and restart the executable.

Version history

  • 2.1 :
    • New animations :
      • With colors (8-bit)
      • Also between levels
      • Using physics and gravity
      • "Terminal size"-aware
  • 2.0 :
    • World is configurable (square or rectangle, with or without random walls)
    • Explosion animations
    • Optimized rendering (delta rendering)
  • 1.0 :
    • The world is a square. (Note : ship acceleration was 'w' 'a' 's' 'd' at that time)


You can build and run using stack:

stack build --pedantic && stack exec hamazed-exe


Delta rendering

The initial idea for delta rendering is based on code written by Rafael Ibraim