Quote from: Moru on 2021-May-17
You could also use the array for the map data instead of the sprite/box collision. Just convert the screen coordinates of your player and compare to the map data to decide of there is a collision or not. This should also have the added benefit of being pretty fast compared to sprite collision tests.
Example of what I mean:
https://www.gamedev.net/forums/topic/592791-index-to-2d-coordinates/
Ah! Never thought of that! Checking against the object type in the array would be a really simple check as all objects of a certain type are grouped together ranges.