Hey guys,
Im looking for some advice and hopefully an example on what would be a very fast method to have the game check if a bunch of events are on the same tile.
Lets say I place 20 different events on the map, who all do random movement and can move on eachother, id like to have a function that would quickly keep checking how many and which events are collided with eachother.
I could make a loop that would check literally every tile on the whole map and see which one has multiple events on it, but since there are only 20 events, i feel like that it could get checked way faster.
I also had this idea to somehow have a loop only check on each of the coordinates that currently contain an event, but I dont know how to make that.
Please ask if I havent been clear enough
Thanks in advance,
Im looking for some advice and hopefully an example on what would be a very fast method to have the game check if a bunch of events are on the same tile.
Lets say I place 20 different events on the map, who all do random movement and can move on eachother, id like to have a function that would quickly keep checking how many and which events are collided with eachother.
I could make a loop that would check literally every tile on the whole map and see which one has multiple events on it, but since there are only 20 events, i feel like that it could get checked way faster.
I also had this idea to somehow have a loop only check on each of the coordinates that currently contain an event, but I dont know how to make that.
Please ask if I havent been clear enough
Thanks in advance,