push icon indicating copy to clipboard operation
push copied to clipboard

push v1.0

Open htv04 opened this issue 3 years ago • 1 comments

Original PR: #44

  • Rewrote push to take advantage of local variables and functions instead of including non-API values in its own table. I also made it so that push no longer needs to call itself for functions, so push:function() is now push.function().
  • Simplified and extended push's setupScreen function, it no longer changes LOVE's window settings, but instead adapts to them.
    • New format is now: push.setupScreen(pushWidth, pushHeight, {upscale = ..., canvas = ...})
      • upscale (string): upscale push's resolution to the current window size
        • "normal": fit to the current window size, preserving aspect ratio
        • "pixel-perfect": pixel-perfect scaling using integer scaling (for values ≥1, otherwise uses normal scaling)
        • "stretched": stretch to the current window size
      • canvas (bool): use and upscale canvas set to push's resolution
    • Window width and height can still be overridden using push.resize(width, height).
    • This (technically) fixes #40.
  • push now floors screen offsets internally to avoid drawing the screen in bewteen pixels.
  • push no longer creates a new table every frame when using the canvas setting, fixing #28 (and potentially #42?)
  • Removed push:setBackgroundColor(), since it was essentially just an integrated alias for love.graphics.setBackgroundColor().
  • Removed push:apply(), since it was pretty limited in functionality, only serving as an alias for push:start() and push:finish() (plus, API changes will require devs to change their code anyway).
  • Removed legacy LOVE 0.10 support.
  • Removed Mario assets from repo, because Nintendo (replaced with new LOVE-inspired pixel art).
  • Updated the README to showcase the new API, among other changes.
  • Updated low-res example.
  • Updated mouse-input example.
  • Updated main.lua, commented out unsupported examples for now.

An additional note: I think the canvas API is really cool, but it could use a little cleaning up and tweaks. Its code is mostly untouched in my rewrite, so it should work the same for now.

Also, I wanted to make the screenshot on the README a GIF like the original one, but I wasn't able to record one properly.

NOTE: Everything in this changelog is subject to change, I have made more changes and experimental features that have yet to be uploaded.

htv04 avatar Jul 13 '22 02:07 htv04

For anyone looking at this PR, I apologize for the inactivity. Truth is, I haven't really been in the Love2D development scene in some time; I've mostly been busy with unrelated projects. While I'm grateful I've been given write access to the repository and the opportunity to improve this module for game developers, I don't think I will be working more on this PR any time soon, as there's a lot of work to be done here.

That's not to say I'm not going to work on this PR again, and the next time I work on it, I might start from scratch so I can fine-tune everything. If anyone has any questions or suggestions, feel free to let me know.

htv04 avatar Jul 21 '23 14:07 htv04