2d_warrior
Member
I'm planning on making a spawning/despawning system. Because the initial data grab is likely increase lag/load time to start the level I need to know the fastest way of grabbing whether a desired object (or it's child) is at grid intervals and 4-5 of it's user made variables. The lists must be ordered so I can increment through it later to check what's at the correct spot to be spawned or despawned.
My current idea is to use collision_point to check for the desired object then record what's at the position and some variables if the correct object's there. Then loop through x recording as I go until the x range of the gird is full then increment the y loop and reset the x loop. When the y range of the grid in complete everything would be recorded. I think I might need multiple lists for the 4-5 user variables of the instances too.
What's the fastest method? Should I use: ds_grids, or 2-d arrays, or buffers, or something else to do this? Will the choice make a substantial speed difference here?
Where is the bottleneck most like in the above described method?
P.S: I'm not sure I understand how to step through buffers so tell me if that would be fastest to collect, but also best alternative.
My current idea is to use collision_point to check for the desired object then record what's at the position and some variables if the correct object's there. Then loop through x recording as I go until the x range of the gird is full then increment the y loop and reset the x loop. When the y range of the grid in complete everything would be recorded. I think I might need multiple lists for the 4-5 user variables of the instances too.
What's the fastest method? Should I use: ds_grids, or 2-d arrays, or buffers, or something else to do this? Will the choice make a substantial speed difference here?
Where is the bottleneck most like in the above described method?
P.S: I'm not sure I understand how to step through buffers so tell me if that would be fastest to collect, but also best alternative.