I am currently working on a 2D side-scroll . I am loading my Tiled platform via TMXTiledMap.
Suppose for instance that my tiled platform looks like this

I wanted to know what the convention is and what most game developers do when it comes to using platforms with TMXTiledMap particularly in the following case.In the above picture the ball C is resting on top of the second floor , not the first floor. Now my question is what is the best approach for knowing that there is surface (floor) under ball C ? So when a ball C is bouncing in the air and then falling down because of gravity it becomes stationary when it touches the second floor and does not keep falling and go through the second floor…Here are some approaches that I could think about.
1-Locate the y-cordinate of the second floor and when the ball is falling down handle it then.
2-Make the entire platform a physics body.This sounds the most sensible. However I am not sure how I could make an
entire loaded TMXTiledMap platform a physics body any suggestions on this would be appreciated,
If you plan to create a platform game (like mario)
Do not use physics engine (especial with the large screen and a lot of obstacle inside).
follow this link to get the idea how ?
http://www.raywenderlich.com/15230/how-to-make-a-platform-game-like-super-mario-brothers-part-1
With box2d I could not make any smooth platform game until saying good bye to box2d
)
By the way, this is a game without physics engine - had just made by myself
https://play.google.com/store/apps/details?id=com.happysky.jumpup
Thanks for the reply but I am not sure what you mean by simple. If its mario based wouldnt physics help out more ? sure some objects dont need to be attached to physics bodies.I would think physics would be helpful in large scale collision detections when you have a machine gun firing in multiple directions.Kindly let me know what you think ? This is my first game and opinions from pros definitely matter.
As Jake Gundersenf said in his topic (“How to Make a Platform Game Like Super Mario Brothers”)
and I do agree with him (when I made a running game like “geometry dash” or a platform game like “goblin sword” - I only got it “smooth running” after following his link)
With your subclass of sprite which can detect collision 8 tiles arround… also will be helpful in the case machine gun firing…
Box2d only helpful just in the case you do not need to control the action of objects in your game, but let them moving as complicated as possible.
Ps: I hope the others here fix me if I am wrong 