Skip to content

v1.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Aug 23:54
· 7 commits to main since this release
Immutable release. Only release title and notes can be modified.
9fbc4a6

Usagi v1.3.0 fixes some annoying bugs with window sizing and scaling and
extreme memory usage by sfx. It includes a couple of nice features too,
like player setting for rotating the game. Devs can configure GIF
record length if they want longer ones.

▶ Watch a video overview of this release!

But the big change is how config works. The _config function that
returns the table of options still works, but it is now deprecated.
The new way is to create usagi.conf file:

name = My Game
game_id = some.unique.id.brettmakesgames.com
pixel_perfect = true

You can also just use magic comments at the top of your game's Lua
file, like:

-- name = My Game

So long as it's the first line of the file. This is useful for single-file
games and devtools within an Usagi game.

The motivation for the new way to configure Usagi games is that
the _config table could lead to footguns where usagi.GAME_W
and similar configurable values could be called before that
_config value is applied, leading to incorrect values. I think it's
better to separate the config from the game and not have this
be a problem at all.

Also, by having it be an external file or simple key = value in comments,
it's easier to parse by external tools and scripts. Win-win.

Thank you for the great community contributions in this release by
Achie, Goldenlion, Stew H, and Denis C!

Features:

  • Configure games with a usagi.conf file or -- key = value frontmatter
    comments at the top of main.lua, instead of a _config() function.
    Frontmatter wins over usagi.conf, which wins over the now-deprecated
    _config(). usagi init creates a usagi.conf. See
    #55
  • Config option for gif_length (seconds) to support recording longer (or
    shorter) gifs. See #98
  • Game rotation setting in 90deg increments via the Pause menu's Settings; see
    #79
  • Warn when requiring files with different casing on the disk, as it can lead to
    issues on different file-systems; see
    #81
  • The first arg for gfx.text and gfx.text_ex no longer need to be strings,
    so gfx.text(10, 4, 4, gfx.COLOR_BLACK) renders 10 rather than erroring,
    making for a more convenient API; if it fails to convert, it defaults to empty
    string; see #99

Fixes:

  • Nudge window size a little when launching so it's not too tiny when close to
    an integer scale; see #82
  • Upstream fixes from sola-raylib relating to gamepad mappings and incorrect
    gamepad device identification; see
    #3 &
    #4
  • Optimize sound effect memory usage (~4x less RAM usage); see
    #95