A downloadable tool for Windows, macOS, and Linux

Download NowName your own price

A fast 2D game engine for rapid prototyping.

Usagi is a 2D pixel art game engine for exploring ideas quickly. It embraces constraints so that you can focus on your game. Games are coded with Lua and  can be exported with a single command for Linux, macOS, Windows, and web. All code and assets are live reloaded as they change in your running game.

Usagi comes with some helpful dev tools like a Jukebox, Tile Picker, and Save Inspector. You bring your own text editor, sprite editor, sound effects, and music.

The engine is only v0.2.0, meaning it's missing some key features, is likely to have bugs, and the API will change.

Usagi is free and open source software.

Features / Bugs

Usagi embraces constraints so you can focus on exploring ideas rather than worrying about asset pipelines , screen sizes, and project organization.

  • 320x180 resolution with scaling
  • Live reload of code and assets during development
  • Cross-platform export with a single command to Linux, macOS, Windows, and web
  • One spritesheet only — sprites.png
  • 16x16 tiles by default with ability to render custom sizes
  • Basic shape primitives
  • No custom fonts
  • Bring your own text editor, sprite editor, and map editor
  • Small API
  • Alpha channel sprites
  • Pico-8 color palette constants

Get Started

Download the engine below for your operating system, unzip it, and start making your game.

Then in Terminal or Power Shell run: 

usagi init hello_usagi

This creates a new project.

You can then start your game in dev mode with:

usagi dev hello_usagi

Make changes to the code and the running game will live update.

Then export your game for Linux, macOS, Windows, and web with:

usagi export hello_usagi

Key Lua APIs

Usagi aims to have a simple, easy to memorize API. The API is inspired by Pico-8 but is more descriptive and relies less on magic numbers. Here's an example of a simple game:

local MSG = "Hello, Usagi!"
function _config()
  return { title = "Hello, Usagi!" }
end
function _init()
  text_w, text_h = usagi.measure_text(MSG)
  x = 40
  y = 30
  vx = 120
  vy = 60
end
function _update(dt)
  x = x + vx * dt
  y = y + vy * dt
  if x < 0 then
    x = 0
    vx = -vx
  elseif x + text_w > usagi.GAME_W then
    x = usagi.GAME_W - text_w
    vx = -vx
  end
  if y < 0 then
    y = 0
    vy = -vy
  elseif y + text_h > usagi.GAME_H then
    y = usagi.GAME_H - text_h
    vy = -vy
  end
  local cx, cy, r = 100, 50, 20
  local speed = 2 -- radians / sec
  local angle = usagi.elapsed * speed
  sx = cx + math.cos(angle) * r
  sy = cy + math.sin(angle) * r
end
function _draw(dt)
  gfx.clear(gfx.COLOR_BLACK)
  local padding = 10
  gfx.text(MSG, padding, padding, gfx.COLOR_WHITE)
  if usagi.IS_DEV then
    local txt = "DEV mode!"
    gfx.text(txt, usagi.GAME_W - usagi.measure_text(txt) - padding, padding, gfx.COLOR_PINK)
  end
  gfx.spr(1, x, y)
  gfx.spr(2, sx, sy)
end

Visit the Usagi website or read USAGI.md in your initializaed project to get the full docs.

Learn More

Credits

Usagi is made by Brett Chalupa and project contributors. The engine's font is datagoblin's Monogram (CC0).

(Un)license

Usagi's source code is dedicated to the public domain. You can see the full details in UNLICENSE.

Download

Download NowName your own price

Click download now to get access to the following files:

usagi-0.3.0-windows-x86_64.zip 2.2 MB
usagi-0.3.0-macos-aarch64.tar.gz 2.2 MB
usagi-0.3.0-linux-x86_64.tar.gz 2.5 MB

Leave a comment

Log in with itch.io to leave a comment.