I’ve been looking into adding physics to my tile based side scroller game, and it seems like the best option might be to write my own engine to handle things like collisions and gravity due to the simplicity of what it is I need.
I mostly understand the math that I need and some of the techniques to get the functionality I want (such as slopes), but the part I'm still missing is how the physics relates to the graphics, as well as how to actually implement that connection.
All that I've seen is that physics and graphics are separate, but are updated together (the textures/animations change according to the interactions from the physics engine). Aside from that, however, I have very little idea what I'm doing.
My question is: When it comes to a tile-based game, how do you handle physics bodies and their creation? And on top of that, what would be an efficient way to connect the two engines to one another?