Ok don’t it is rabbit hole with dead end
I prepared 4 copies of game
Each is copy of same game where on each instance i simply just removed more stuff
1 - This one is same as you did get from link in previous post but i just removed health behavior from stone and i am using Is on screen method of updating
Number in upper left corner indicates all stones on map/scene
I leave link to test builds + projects to download so if you want you can check it
I was able to have 2.2k stones on map before i get any slowdowns on creation of new stones
But if i don’t hold LMB and just click one by one it is not noticeable
It starts to slowdown badly at around 2.4 so holding LMB enters slug mode while clicking one by one is somewhat acceptable
At 3k stones on map i get slowdown just by walking around without even creating stones
(if you are confused we are not testing here updating slowdown we are testing slowdown that occurs after SOME number of stones already exist on map
Because slowdown on creation and destruction can be acceptable but constant slowdown is not)
2 - Here additionally i went into AutoTile extension and disabled every single event that was there
So for game it should act as if AutoTile extension does not exist
At 3k i started to get slowdowns on constantly creating stones
3,4k slug mode while creating constantly
4,5k slowdowns just walking by without creating new stones
3 - I simply removed AutoTile behvior from stone leaving only Is on screen behavior on stone
At 5,5 i started to feel very very small slowdown
6k enters slug mode
Again if i click 1 by 1 i feel no slowdown
8k i get slowdowns just by walking by not creating new stones
4 - Same as above i just removed is on screen behavior so stone have none behaviors but not to leave it as empty object i added few variables to it
7k i started to feel slowdown on constantly creating new stones
7,2k slug mode
9k i move like slug under water constantly creating stones but i get no slowdown on just walking by without creating stones
I think that is enough for this test
5 - I made one more test just to be sure of variables
In test #4 i had around 15 variables on stone and it started to slow down on 7,2k
Here i removed most variables leaving only 3 of them
And again started to slow down on 7,2k so amount variables do not impact performance
Test results
Test #4 and #5 shows that variables on object change nothing so i can have as many variables as i want on it and do not affect performance
Test #1 and #2 (where difference is 2 was same as 1 while in 2 i simply disabled everything inside AutoTile extension) shows it is little to no impact do you have anything in behavior attached to object
On #1 i had 2,2k stones when started to slowdown on creating stones and 3k when i get slowdowns just by walking
On #2 i had 3k stones when started to slowdown on creating stones and 4,5k when started to slowdown just by walking by
Test #3 with just 1 behavior shows that 5,5k stones on constant creation until it start to slow down and 8k stones until it starts to slowdown when just walking by
Test #4 shows that 1 behavior on object means 7k before it starts to slowdown on creation and IDK how many but more than 9k and is still smooth with just walking by without creating new stones
So in conclusion best performance = use variables and events instead of behaviors
And i think gain between having something in behavior and not (tests 1 and 2) is minimal
So using 1 behavior on object (i need to combine is on screen with AutoTile) would be best solution for releasing extension
While best thing to do is go with example project for ppl to copy instead of giving them extension
Extension would make sense for small maps but idk who is gonna use it for small maps
So we would waste time trying to find way to reduce creation/deletion slowdown while real problems is from how much behaviors you have on object
I gonna release AutoTile with combined is on screen and warn ppl to go with small maps and keep game zoomed in
But i think i gonna do example project for Auto Tile for best performance and go this route with my game
Thank you Keith you have no idea how you helped me (i still have your project for detecting adjacent objects and gonna use it for something else)
I am happy i decided to waste time on these test before we would waste days trying to find slowdown solution
I for sure learned that if you wanna have tons of stuff on screen then don’t give it behaviors but instead go with variables
Kinda useful info i gonna do bullet hell one day
Have fun and i hope you enjoyed it also