How do I efficiently update an image?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Sky_Render
Prole
Posts: 48
Joined: Fri Jul 05, 2019 2:59 am

Re: How do I efficiently update an image?

Post by Sky_Render »

steVeRoll wrote: Fri Feb 28, 2020 7:12 pm If you want an Image that you can change, a Canvas might be more useful. You can both draw onto a canvas, and draw the canvas onto the screen.
I tried that. It didn't work, because I still could not find a way to not throw the entire massive original image at the system every time it needed an update.
User avatar
steVeRoll
Party member
Posts: 125
Joined: Sun Feb 14, 2016 1:13 pm

Re: How do I efficiently update an image?

Post by steVeRoll »

What effect do you want to achieve exactly? I can't see how using canvases would not work.
Sky_Render
Prole
Posts: 48
Joined: Fri Jul 05, 2019 2:59 am

Re: How do I efficiently update an image?

Post by Sky_Render »

I was using canvases. The moment the source image climbed above about 512x512 pixels, everything slowed to a snail's pace, because the laptop this is running on has an Intel Graphics 520 on-board graphics chip. It's rendering somewhere around 20 layers at a time.
User avatar
steVeRoll
Party member
Posts: 125
Joined: Sun Feb 14, 2016 1:13 pm

Re: How do I efficiently update an image?

Post by steVeRoll »

Again, what effect do you want to achieve? You can probably use some workarounds like using a smaller canvas, or not using them altogether.
Sky_Render
Prole
Posts: 48
Joined: Fri Jul 05, 2019 2:59 am

Re: How do I efficiently update an image?

Post by Sky_Render »

Perhaps someone could actually explain some of these supposedly-real workarounds? Last time I asked about this, I had someone suggest (with no examples or clear explanations of how this is even possible, naturally) that I drop it down to just one render layer and use stencils to deal with various draw layer needs. If there's a better way to render, please, someone just tell me how it actually works instead of laying a bunch of vague suggestions of how some tools theoretically might work for the problem and/or explaining computer hardware to me in a way that does nothing but rephrase the problem in technical terms. Please.
User avatar
steVeRoll
Party member
Posts: 125
Joined: Sun Feb 14, 2016 1:13 pm

Re: How do I efficiently update an image?

Post by steVeRoll »

Yes, we can tell you a better way of doing it, if you tell us what exactly you want to do. So far you just said that you draw a portion of the screen, but I still have no idea where the render layers come in. Just tell us, without talking about the sizes or amount of render layers, what effect you want in your game.
Also, forums aren't really suited for rapid-fire discussions like this. I would rather converse through the Discord server, or irc.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 49 guests