Tiny Wings landscape with Libgdx

HI, i have started to use Libgdx these days and i am on the learning curve and the best way to overcome is to create a project. So i have started a new game based on the Tiny Wings/fragon fly etc. What are the best classes of Libgdx to represent the landscape? I am thinking about generate multiple Mesh objects in an array based on a cosine function. On the rendering phase i will render only the meshes that are in the viewport. Is this the best way to store my data?

What exactly are you trying to recreate? Are you talking about a background landscape, or an interactive landscape, or something else?

An example screenshot would be really helpful, as I am not familiar with the game you’re talking about, and you could be talking about a few different things here.

And, obligatory reaction question: what happened when you tried the approach you’ve outlined?

i am trying to create a game like this

I want to create this landscape

I can’t watch videos right now, which is why I asked for a screenshot or a more specific description of your goal: when you say landscape, is it a background landscape, an interactive landscape, or something else? Maybe somebody else can watch the video or is familiar with what you’re asking.

Here is an image

https://lh3.ggpht.com/2PKkRSA63NUOD9f-GdlzQikuLMWJ0iL77Co59-5YRR9CvzirBy4GtZvNQ5vxyupE7A

it is a simple game, a landscape is generated aitomatically based on a cosine function and you have a little dragon/bird/ninja (depends of the clone) and you role on the hills to speed up and make greater jumps. I wan to create a landscape like this

http://www.raywenderlich.com/3888/how-to-create-a-game-like-tiny-wings-part-1

Good luck!

Me problem is now how to generate this but how to do it with libgdx. If i will do it i will write a tutorial about how to do it with libgdx

Here is a very simple approach that doesn’t involve changing mesh data on the fly. Chunk nearby meshes (depending on how many you’d like to store in memory at once); each chunk is a set of hills with a simple flat bottom obscured from the user’s view. When the user’s window approaches the end of a chunk, generate a new one.

In LibGDX you simply generate a list of points and from that create a new Mesh object. Whichever mesh is within the user’s view, you would render with a shader. You could do something simple, like repeat a pattern with GL_REPEAT by giving texcoords to each mesh vertex, or you could use something more advanced like creating the pattern in the shader.

yes that technique i had in my mind and i try to figure out what libgdx class i need. So Mech class is a good choice to render my hills. I ddi not understood the last part about shades cause i do not know anything about shaders yet but i will search about it. Thank you