1
I’m starting programming now, and I have the task of making a simple control with the keyboards on a "map" which is an image, and the cart can bypass the streets, the map is the attached image but n I am able to think of a logic to make the collisions using the x/y coordinates the areas in green, IE, everything that is not street the cart n could walk my cart has size 40x20 pixels.
PS: I don’t want the code ready, I want a help to think about logic or some easier way to do it that n is using x/y
Colision Detection still has enough science behind, to work with speed/acceleration, etc. So it depends on the realism of the implementation you want to give. There’s a lot of stuff on the net about it, there’s even a simple example in the MDN itself for 2D games
– Isac