How do games like Hill Climb Racing do collision detection?

How do games like Hill Climb Racinghttps://play.google.com/store/apps/details?id=com.fingersoft.hillclimb&hl=en do collision detection on the surface(the dirt or sand or whatever level your on) . Being so irregular i didnt think this would be simple but I am not too sure! I tried googling topics like this but i did not get much with results… Well any ideas?

Look up Box2D, it’s a 2D physics engine, probably the best around.
I’m not sure about this because most of the time I use pure LWJGL, but I think that Slick2D comes with it and LibGDX also (which is great for android game development).
However, I’m sure that it wouldn’t be too hard to implement it into a LWJGL engine. ::slight_smile:
Edit: And here you go: http://www.jbox2d.org/
If you aren’t sure how to use it here’s a cool video on it from “TheCodingUniverse”.

ZKJC2cloIqc

Thank you for that, but I am not sure if you understand the question . I do not mean the physics aspect of the game, I meant how does the car drive along this irregular surface. unless of course that is physics? I just wanted to know what made the car follow the path of the surface pretty much

Either use a high level library(LibGDX + Box2D is extremely easy with the physics body editor) or make your own physics engine, or you could just wing it and rotate the car to the same angle and the surface…lol

I have recently been using libgdx although I have no experience with box2d with it. Is there something I could google or something you know of to see some code for an example of this?

The whole point of google is so you can find things yourself. Why would you ask us what to google?
Try “libgdx box2d” ::slight_smile:

I mean more specific to the question I had
EDIT: since i dont know what this is called i am asking