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?

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.

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

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.

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

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org