Sep 14, 2026 at 10:31 PM
I've been checking out the CSE2 code, and for some reason I don't understand the collision code. In the HitMyCharMap function, we have two different arrays labeled as offsets for X and Y. They have four values, and enumerating through them starts with us checking our current tile, the tile to our right, the tile below us, then the tile below us and to the right. We have a for loop that gets the tile flag from these tiles as we iterate.
At least, that's what I think it's doing. In that case, when are we checking the tiles to our left and above? Is there no priority in which direction we check for collision first? Can anyone please help explain the collision?
At least, that's what I think it's doing. In that case, when are we checking the tiles to our left and above? Is there no priority in which direction we check for collision first? Can anyone please help explain the collision?
