I am making a game with sooo much pixels and the pixels are cuttable, I use 1 pixel one by one to make them cuttable, for example there are 4 pixels(1x1 size) in 1x4 pixels, if I make it 1 pixel but 1x4 size, this time there will be 4 pixel something to detect when the cutting tool touches it, no? (the cutting tool cannot cut 1x4 pixels at once, it cuts one by one, it can cut many pixels at the same time (onTouched event))
If I use Region3 instead of pixels for the hitbox, for example, if there are 3 thousand pixels, I think 3 thousand region3 will be required and this will strain the code… If the code can handle 3 thousand region3 or even more, then, for example, I could handle 1x4 pixels with 1 part instead of 4 part.
My main goal is not to tire the physics engine, while testing the game, there is a momentary lag or freezing during cutting and character summoning, the reason is because there are many pixels, but there is not much I can do? At least as far as I know.
Remember, many pixels are cut at the same time for 1 second. thousand pixels are created at once while the character is being added!
some gif about it: (Yes, the game is not original, but I am thinking of changing it or playing the game only among friends.)
https://gyazo.com/080f8b8bd22462ba3ec4120fed1b4f98
(There may have been a little more fps drop because I was recording gif.)
Hey, I’m still working on the bugs.
in short:
What I want: (just 1 pixel for 1 part and so much hitbox without onTouched and no fps drops)
What I am using: (512 pixel for 1 part and so much hitbox with onTouched, low fps)
After Cut (Result): (I want the same result in both)
What I want: use less pixel, Hitbox count must not change, let the results be the same, no fps drops and high fps (pixels are generally moving because from character)
Another problem that comes to my mind: If we use a part with 1x3 size without too many pixels and use region3, how will the script respond if 2 players try to cut the 2 end pixels at the same time?
(Sorry for writing so long!)