I have a query about how to create a 2d landscape level using libgdx/ box2d (Or possibly with Unity) for Android and iOs. Let me describe the goal and then the specific points I need help with.
What I'm trying to create is something like "Hill Climb Racing" where the player has to drive across a finite 2d free-form landscape, like the one shown here. Different areas may have different properties (friction, texture, restitution, etc) as shown. The player will be able to pinch and zoom out to see all or most of the map and pinch to zoom in to see details..
The level width will vary from game to game but at most it will be about 800 box2d meters wide. Now if I use 32px/m that requires an image 25,600 pixels across and this is where the issues start.. I can't tile it because that might preclude me from making free formed curves which I need to be able to do.
So what I need to know is:
- How can I create a box2d body for the terrain?
- What pixel/meter ratio should I use?
- How many pixels wide should the image be?
- Should I split the image up into sections and how should I chunk the images together?
- What strategies have people used before to achieve this effect?
Hope I have been specific enough and thanks for all the help..