1
0
Fork 0
Odin+mruby game framework inspired by PICO8
  • Odin 86.4%
  • Ruby 7.3%
  • HTML 2.7%
  • Shell 2.1%
  • C 1.5%
Find a file
2026-02-09 17:26:44 -05:00
assets clean transfer to codeberg/magicalhack 2026-01-17 13:47:03 -05:00
bin tweak build 2026-02-09 17:26:44 -05:00
lib/mruby memory leak hunt + nuke experimental 'grid' subsystem 2026-02-02 07:48:10 -05:00
ruby_api memory leak hunt + nuke experimental 'grid' subsystem 2026-02-02 07:48:10 -05:00
source memory leak hunt + nuke experimental 'grid' subsystem 2026-02-02 07:48:10 -05:00
.gitignore the great deshittification 2026-02-01 23:04:45 -05:00
mruby.rb clean transfer to codeberg/magicalhack 2026-01-17 13:47:03 -05:00
odinfmt.json clean transfer to codeberg/magicalhack 2026-01-17 13:47:03 -05:00
ols.json clean transfer to codeberg/magicalhack 2026-01-17 13:47:03 -05:00
README.md remove hard python dependency by rewriting build.py in ruby 2026-01-17 22:28:26 -05:00

MINI9

Here we have a game... ... I want to say 'framework'...? Yes, a game framework. I'd describe it as bigger than pico-size, but not much. And limitations-wise, there certainly are some, but it's more flexible than an 8... see what I'm getting at?

But really what is it?

I really like pico8 but I'm old and I just want to do whatever I want, see? I like limitations but it's just too much. I want to make art in aseprite and just load it up. I absolutely cannot make a decent sound effect or music to save my life in pico8. Also lua is not really my speed; it's fine, but I would rather not.

So here we have a slightly larger, slightly more flexible thing. It's written in Odin and uses Ruby as the game language (actually mruby so no gems/etc).

Note to self: Really need a couple examples.

For now you could just make a directory with a main.rb in it:

def update
  quit if pressed?(:escape)
end

def draw
  rectangle(
    mouse-v2(16),
    v2(32),
    filled: true,
    color: Palette::DEFAULT.blue
  )
end

See below for how to build & run that.

...I realise there needs to be API docs because otherwise it'll be near impossible to go further than this. It's similar to pico8 but not that similar.

More specific details on how to get going.

Install dependencies

  • odin in PATH is required.
  • ruby in PATH is required.
  • mruby is needed, run: bin/setup
  • Emscripten is how the web magic works, also via: bin/setup

I should put up releases in this repo, but for now you need all that to get this going.

Hopefully goes without saying I have no idea if any of this works on Windows and I provide no consideration whatsoever for that case, so sorry.

Build (debug or release)

bin/build debug

Run your game

build/debug/mini9 path/to/mygame

Try it in browser

This handy little script relies on python3 in PATH for the webserver.

bin/dev_web path/to/mygame

Package a 'cart'

build/debug/mini9 package \
  --source path/to/mygame \
  --output .
build/debug/mini9 mygame.rom

Package for web

build/debug/mini9 package --web \
  --source path/to/mygame \
  --output .
# ./mygame contains index.html, etc

Misc

Slopwatch

Did I use an LLM occasionally to help me make sense of the mruby source code, finding obscure references, forum posts, and code snippets etc, to get the bindings working? Yes. Did I vibecode this whole thing resulting in a pile of utter garbage? No. Say no to slop.

Helpful memory watch:

watch -n 0.1 'ps -o pid,vsz,rss,comm -p $(pgrep mini9) 2>/dev/null || echo  "Process not running"'