Need help optimizing this

just realized this really needs optimization, i made another program and it got even laggier, anyone have any solutions or suggestions?

if you need the other build im working on tell me and ill send the json

its probably because its drawing a imagepad in a forever loop
but thats the only way so that things dont overlap
it has to redraw

guess which part is slowest, and try removing that to see if it stops lagging. if it's the same, move onto the next script.
when you find which script is causing the lag, remove half of it and see if it's still lagging, try the other half.
keep going down in halfs until you get to a part that can't be divided up much, and start thinking about it

every script that does window stuff seems to slow the project down noticably. i don't think you should be creating imagepads every frame.

you don't need imagepads to make windows, you can just make a rectangular costume like i did with spritz, and i'm guessing there's a way to clear the imagepad that doesn't recreate it.
only draw and clear what you need to, i can already think of ways in spritz that i do more drawing than necessary.

is spritz another library

wait ive seen this before

hmmm ill try to find a way to redraw without putting the window in a forever loop

all the scisnap blocks are custom blocks, you can edit them and take them apart. i'd reccomend doing it too, since they often have stuff you don't need.

i just forgot lol

im gonna see if i can optimize it by making a fork of imagepad

actually i have a idea
im gonna move the create a imagepad out of the forever and put a filled rect block in the forever and add what i want at the end
essentially redrawing
but im gonna rewrite it again
ill let you know if this works

it works
but another problem is i want everything in one sprite so its easier but i dont know how to make clones that are different than other clones

im making the title bar a clone and that works but i want to make buttons be a clone

just tell a clone what it is or what it's supposed to do when you create it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.