Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sprite Collision With Map Tiles
#2
Hi Daniel!

You're on the right way. There's no built-in mechanism to do sprite vs playfield collision detection, but there are some helper functions to aid you. The usual way is to define some "hot points" in your sprite, usually spaced by the same amount of pixels than the tileset you're checking collision. Then test the suitable points, depending on the motion direction, in which tiles they fall and check their types. This is what SuperMarioClone and PythonPlatformer sister projects do.
Reply


Messages In This Thread
Sprite Collision With Map Tiles - by Daniel H. - 06-19-2018, 04:33 AM
RE: Sprite Collision With Map Tiles - by megamarc - 06-22-2018, 06:46 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)