canvas speed
Now in LOVE2D when you just starting maybe you need to use canvas for some pixel operations when drawing. But suddenly the speed of drawing is reduced to snail speed and you wonder what happened.
First check if drawing into canvas happens in love.draw. When yes, put it in love.update. This improves the overall speed.
Second, if you see strange artifacts and are using scaling then do it so the scale number increases as integer not as float. This means floor it down 1,2,3,4… and so on. Not 0, not 0.5, not 5.2 etc this makes the surface look artifact uggly.
And that’s all for the tricks and treats for this short halloween special.
Ok. I add some expertise here. Instead of canvas using when the bluring as nearest/linear filter is not needed you can use an image and imagedata that is then replace function applied to the image thus the pixels are really faster copied than using setPixel in canvas.
LUA game developing for dumbies
Some nice ways of doing the lua game developing .
Status | In development |
Category | Other |
Author | Bastian |
More posts
- roguelike console57 days ago
- android GPS and other sensor for LOVE2D.58 days ago
- screen flickering65 days ago
- doggie game66 days ago
- leeeerpiiiing is haaard67 days ago
- memory and garbage collectingMar 26, 2025
- object inheritanceMar 19, 2025
- exportingMar 08, 2025
- light and shadeMar 07, 2025
Leave a comment
Log in with itch.io to leave a comment.