Skip to content

v1.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 02 Jul 14:46
Immutable release. Only release title and notes can be modified.
cfa4eb7

Usagi v1.2.0 is a release with a lot of bug fixes and a few nice features that
handle some of the more often requested capabilities. The highlights being
the engine and its exports now work on Intel Macs, new sfx functions for
more robust playback behavior, better window sizing behavior, and
an optional alpha parameter for most gfx drawing calls for shapes,
sprites, and text.

Get the latest by running usagi update or downloading below. Don't forget
to run usagi refresh in your project(s) to get the latest docs and ancillary
engine files.

Features:

  • macOS builds are now a universal binary (Apple Silicon + Intel), so the engine
    and exported games run on both without a separate download. Published as
    usagi-<ver>-macos.tar.gz (with a macos-aarch64 alias so usagi update
    from older arm-Mac builds keeps working). See
    #9
  • sfx.stop(name) stops every playing voice of a sound effect, sfx.stop_all()
    stops all of them, and sfx.is_playing(name) reports whether any voice of a
    sound is playing. See the sound example. See
    #31
  • The pause menu's top view now shows a confirm/back input hint labeled for
    whatever the player last used (keyboard keys or gamepad buttons). Hidden on
    games shorter than the default 320x180 resolution, where space is tight; see
    #49
  • Running the usagi binary with no arguments (double-clicking it or launching
    a .desktop file) now opens a launcher window; drop a main.lua or project
    folder onto it to start usagi dev on that path; see
    #24
  • input.mouse_over() returns true when the cursor is over the drawn game area,
    false when it's outside the window or over the letterbox bars; see
    #41
  • Every gfx drawing call now takes an optional trailing alpha (opacity in
    0..1); omit it for opaque. Covers the shape primitives (rect, rect_fill,
    rect_ex, circ, circ_fill, circ_ex, line, line_ex, tri,
    tri_fill, px) plus text, spr, and sspr. See the shapes example.
    See #53
  • usagi init now creates empty sfx/, music/, and data/ dirs so new
    projects show where sound and save files go; see
    #32
  • usagi.IS_RELEASE, the inverse of usagi.IS_DEV, for gating release-only
    code more readably; see
    #37
  • Backspace acts as a cancel button in the Pause menu; see
    #48
  • _config now has initial_fullscreen to launch the game fullscreen by
    default, until a player toggles fullscreen and their choice is saved; see
    #34
  • Reworked window scaling so pixel art stays crisp on high-DPI and
    fractional-scaling displays instead of tearing or squashing pixels. Usagi now
    turns off the OS high-DPI mode and scales the game in real pixels, which is
    what makes integer scaling land on whole pixels; before, the OS scaled our
    already integer-scaled frame again by a fractional factor, so the pixels came
    out uneven. The starting window size is now picked relative to the display
    (the largest integer scale that fills about two-thirds of it) rather than a
    fixed 2x, so low-res games no longer open in a tiny window, and a game bigger
    than the display opens maximized rather than hanging. Usagi also logs a
    one-line display summary on boot to make future scaling reports easier to
    debug. See #62,
    #47,
    #34, and
    #36

Fixes:

  • Warn at load when sprites.png exceeds a safe texture dimension (8192px per
    axis). Oversized sheets get clamped by the GPU and render sprites past the
    limit as black squares; the warning explains the cause and the grid-layout
    fix; see #22
  • usagi loveify now refuses when the destination is inside the source project
    instead of recursing until it errors; see
    #14
  • Reseting/clearing save data on web now works; see
    #61
  • Pause menu rectangle outlines properly render top-right corner on some GPUs
    with fractional scaling; see
    #60
  • Alpha values now properly render; see
    #51
  • Don't register gamepad input when window is not focused; see
    #28
  • Tear down the entire Lua VM on game reset (a.k.a. hard reload) so there aren't
    lingering variables/changes; this better matches dev expectations; see
    #44
  • Close pause menu when resetting with hotkey (e.g., Ctrl+R); see
    #65
  • Set 0.1s max on dt so that there aren't weird gaps when resuming a game
    after OS pause (browser tab not focused, computer wakes from sleep, etc.); see
    #63
  • Pause audio in web builds when tab isn't visible, fixing choppy playback in
    that scenario; see #63
  • Don't crash when attempting to reading a file that doesn't exist; see
    #30
  • The GIF recorder does not run for games higher res than 720 as it degrades
    performance majorly; an info message is logged
  • Linux ARM (Raspberry Pi) builds now use OpenGL ES 2.0 so they boot on Pi
    driver stacks that only expose GLES; desktop GL 3.3 could fail there with
    GLXBadFBConfig. Linux ARM builds now use _es.fs (GLSL 100) shader
    variants, same as web; see
    #38