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 GameSo 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.conffile or-- key = valuefrontmatter
comments at the top ofmain.lua, instead of a_config()function.
Frontmatter wins overusagi.conf, which wins over the now-deprecated
_config().usagi initcreates ausagi.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.textandgfx.text_exno longer need to be strings,
sogfx.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