Skip to content

Releases: ebeneliason/acetate

v1.2.0

19 Jul 05:42
Compare
Choose a tag to compare

Fixes & Features

  • Better out-of-the-box support for apps which set custom draw offsets, so that debug drawing remains properly aligned with your sprites.
  • Optionally cache the draw offset for your sprites (if the new default logic is insufficient) by calling self:cacheDrawOffset() from within your sprite's draw function.

v1.1.0

05 Apr 05:57
Compare
Choose a tag to compare

Features

  • Hold SHIFT while cycling through sprites to constrain focus to sprites of the same class as the currently focused sprite.
  • Press L to lock focus to the class of the currently focused sprite (just as above, without needing to hold SHIFT).

See the updated README for additional details.

v1.0.0

29 Mar 23:07
Compare
Choose a tag to compare

1.0 Release

Acetate is now 1.0! This is symbolic only. This repository will adhere to semantic versioning going forward, but the 1.0 release is not actually a breaking change.

Features

  • A new customOverridesDefaults setting can be set to true to prevent built-in debug drawing from being performed for any sprites which implement custom debugDraw() functions.
  • Sprite debug strings are now provided via the debugString() function. This will be called on your sprite each frame, allowing you to provide an updated string containing any properties of your sprite. You can include substitution patterns, passing true as a second return argument to indicate that substitutions are needed. This approach supersedes the use of debugString and debugStringFormat members, although they are still supported as before.
  • Debug string substitutions are now included for independent relative horizontal ($rx) and vertical ($ry) center values.
  • It's now possible to check for acetate.initialized to confirm proper initialization before accessing its members. This can be helpful to avoid crashes on device when calling acetate functions outside of specific contexts.

Fixes

  • Several erroneous debug string substitutions have been corrected
  • Improved troubleshooting
  • More comprehensive unit tests
  • Remove extraneous print statement

Full Changelog: v0.2.0...v1.0

v0.2.0

20 Apr 00:49
Compare
Choose a tag to compare

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.

v0.1.1

12 Apr 23:33
Compare
Choose a tag to compare

Features

  • Automate installation of fonts when using toybox.py.
  • Various README improvements

Full Changelog: v0.1.0...v0.1.1