Just a short demo of how to draw a map, place a sprite and detect collisions with the map.
Make sure the map has sprites with flag 0 set to true.
On each update the player's input is read and that new location is checked for a sprite with flag 0 set.
If true, a collision is detected and the previous x and y position of the player are restored.
P#86324 2021-01-10 18:04
[Please log in to post a comment]