Skip to content

v0.2.0

Compare
Choose a tag to compare
@ebeneliason ebeneliason released this 20 Apr 00:49
· 9 commits to main since this release

Breaking Changes

This release includes several breaking changes:

  • The acetate namespace is now lowercase, following standard module convention. Anywhere you configured a setting or called an acetate function, you'll need to update your code.
    • Acetate.setFocus(mySprite)acetate.setFocus(mySprite)
    • Acetate.drawCenters = falseacetate.drawCenters = false
    • etc.
  • Acetate must now be manually initialized by calling acetate.init(). Settings can now be overridden by providing a table of settings values when calling init(). See the README for more details.
  • The relative center substitution string, formerly $co, is now specified as $rc.

Features

  • The [p]ause keyboard shortcut now works even when debug mode isn't active. Pausing will implicitly enter debug mode.
  • Focused sprite bounds are now shown in an animated dashed line. (This can be disabled via the animateBoundsForFocus setting.)
  • Added sprite extensions getLocalOrigin and getWorldOrigin which return the top left corner of the sprite in local or world space. Substitution strings for these values are also provided for use in debug strings:
    • $o: local origin coord
    • $ox: local origin x
    • $oy: local origin y
    • $O: world origin coord
    • $Ox: world origin x
    • $Oy: world origin y
  • Debug strings now support an opaqueness substitution. Use $q to output either "OPAQUE" or "TRANSPARENT" indicating whether the sprite is set to be opaque.
  • Added luacheck support. Run luacheck *.lua in the top-level directory.
  • Added unit tests via luaunit.
  • A hint is now printed in the console when acetate is initialized to indicate how to toggle debug mode.

Fixes

  • Both pause and unpause now work properly even when playdate.gameWillPause and playdate.gameWillResume aren't implemented.
  • State is preserved properly even if pause (or unpause) is called multiple times in a row.
  • The setFocus function now respects the focusInvisibleSprites setting.
  • Fixed getWorldCenter, which was actually returning the top left coordinate, not the center point.
  • focusedSprite is no longer included in settings, as this is an implementation detail.