A simple game built with Odin to teach my kids to use the keyboard. Boulders fall from the top of the screen and you destroy them by typing the letters shown in your ammo bank to load your cannon, then firing. The cannon always auto-aims at the current boulder — the goal is typing speed and accuracy, not aiming. You have 3 lives; a boulder that reaches the bottom costs one.
Cannon and boulder art is pixel art you can redraw yourself (or let your kids draw!) from the Settings menu — see "Customize Art" below.
Requires the Odin compiler on your PATH.
.\build.ps1 # build KeyboardCannon.exe
.\build.ps1 -Run # build and launch immediately
or directly:
odin build src -out:KeyboardCannon.exe -subsystem:windows -resource:icon.rc
.\KeyboardCannon.exe
Settings Menu
UP/DOWN— select a rowLEFT/RIGHT— change the selected settingENTER/SPACE— start playing, or open the selected row's screen
Playing
- Type the highlighted letter in the ammo bank to load it into the cannon
SPACE— fire once enough letters are loadedESC— pause (Resume / Quit to Menu)
Name Entry
- Type your name,
ENTERto save,ESCto skip
Customize Art (pixel editor, reached from Settings)
LEFT/RIGHT/TAB— switch between editing the Cannon and the Boulder- Click a palette swatch to select a color (the first swatch is the eraser)
- Left-click/drag on the canvas to paint, right-click/drag to erase
- On-screen buttons (or
C/R/Enter/Esc): Clear, Reset to Default, Save & Back, Cancel
src/— game source, onepackage mainsplit across files by concern:main.odin(init + loop),types.odin(shared data),theme.odin(palette/typography),background.odin(sky + clouds),gameplay.odin(Playing screen logic),render.odin(Playing screen drawing),menu.odin(Settings/Name Entry drawing),sprites.odin(pixel art data + default art),sprite_editor.odin(the in-game pixel editor),audio.odin(procedural sound effects),highscores.odin(score persistence)assets/RobotoMono-Bold.ttf— UI font, embedded into the exe at compile time (not needed alongside the built exe)assets/default_cannon.png— the built-in default cannon art, also embedded into the exe at compile timeassets/sprites/— saved custom cannon/boulder art (created the first time you save in the editor; overrides the embedded default when present, but isn't required)design/— source art not needed to build or run the game (e.g. the original SVG the default cannon art and exe icon were derived from)icon.ico/icon.rc— the exe's file/taskbar icon, embedded at build time via-resource:highscores.txt— local high-score file (not tracked in git)
Licensed under PolyForm Noncommercial 1.0.0 — free to play, modify, and share for any noncommercial purpose. Selling this game or using it commercially is not permitted without permission from the author.