| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I can test to see if #42 is fixed tonight, and more generally test this rewrite. Sounds good though! |
Sorry, something went wrong.
There was a problem hiding this comment.
Looking good, it's been a while I don't read Lua code haha
I think you could run your code through a prettifier to get consistent indentation / style.
If the canvas functionality is still working then the API change from : to . shouldn't make too much of a difference, if properly documented. Nice! I'm happy to see this library still being used and adapted to modern use cases. :-)
Sorry, something went wrong.
| "mouse-input" | ||
| --[[ | ||
| "canvases-shaders", | ||
| "stencil" |
There was a problem hiding this comment.
Are the other examples not working? The more the merrier :-)
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, they should work, so I'll try to fix them up. I think I left them commented out because they used shaders, and I don't know if LOVE 0.10 shaders are compatible with LOVE 11. I'll try them out and let you know if they work okay.
Sorry, something went wrong.
|
#42 is still a problem, FPS is unchanged from before when canvas == trues. However as canvas is set to false by default now it's not as much of a problem. |
Sorry, something went wrong.
|
To get my game running using this all I had to do was swap 'push:' with 'push.', add love.window.setMode, modify push.setupScreen and change mouseX == nil to mouseX == false, as push.toGame returns false now when mouse pressed outside in bezel area of window. |
Sorry, something went wrong.
Hmm, weird. Are canvases usually slow on Android? If this is a LOVE issue I don't think I can work around this. |
Sorry, something went wrong.
I don't have much experiences with canvases but I just tried creating a project with 4 of them, rendering a 1920x1080 image to each and then drawing the canvases and FPS was locked at 60. Compare that to drawing just one 1920x1080 image using push.lua and canvas = true (3 canvases are created according to love.graphics.stats()) where FPS is 23. Test device is P20 Lite. |
Sorry, something went wrong.
|
@FormularSumo Okay, so I've been thinking about ways to solve this, I believe what's causing this is the shader handling code. I feel like the best solution would be to scrap the shader handling code entirely and let devs handle shaders since shaders will apply within the canvas anyway. This would probably fix the slowdown issue since the canvas feature would be reduced to simply rendering to a canvas instead of handling shaders for each frame. However, this would remove a known feature of push and I don't want to do that without @Ulydev's consent. Another solution would be to refactor the shader code, but in order to optimize it the shader feature might need to be entirely reworked API-wise. |
Sorry, something went wrong.
Is this a good thing? When I see push.function(), I expect that push doesn't have any internal state whereas push:function() does. However, usually I'd also see modules let users create their state object: local push = require("push")() -- parens to trigger __call metamethod or fn that creates
That would follow what kikito wrote up about stateless modules.
That sounds great!
That sounds really interesting. I guess it maintains crisp pixels? |
Sorry, something went wrong.
If you're talking about internal variables push uses for operation, yeah, it still has them. They are no longer exposed to the user within the push table though, internal variables are now local to push's functions. Other than the fact that this change makes using : instead of . unnecessary, most libraries seem to be using ., including LÖVE's own modules, so I thought it would be neat for push to follow the same convention.
Yeah 😀 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
New PR: #46
Over the past few days, I spent some time rewriting and optimizing push, and present a potential v1.0 update:
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.