Hey, view this gif https://gyazo.com/8fca2df3b50ed369017ddd1ff3ec963a
As you can see, from the gif, when I scroll my FPS drops heavily.
So what I need help is to make it so that the GUI which the scrolling frame is on are only visible while the rest are invisible. How can I achieve this?
PR_0B
(十 盛大)
May 20, 2023, 9:07pm
#2
Here’s a solution for handling the visibility issue:
You don’t have to iterate through all the frames every time the canvas position changes. You can calculate exactly which frames are going to be visible just from knowing the canvas position and size and such.
Imagine that the frames are in a grid like this:
[image]
So the upper left frame has coordinate (0, 0), the one to the right of that (1, 0), and the bottom right in the image has coordinate (2, 3). The Y coordinate just keeps going as you go down in the list.
Now imagine that we number…