Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (562)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Tiny Wings landscape with Libgdx  (Read 1904 times)
0 Members and 1 Guest are viewing this topic.
Offline TheGDeveloper

Junior Member


Projects: 1



« Posted 2012-12-18 13:34:30 »

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?

Offline KevinWorkman

JGO Wizard


Medals: 70
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #1 - Posted 2012-12-18 15:14:00 »

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?

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline TheGDeveloper

Junior Member


Projects: 1



« Reply #2 - Posted 2012-12-18 15:26:44 »

i am trying to create a game like this
http://www.youtube.com/watch?v=PlpDEPK3XnA

I want to create this landscape

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline KevinWorkman

JGO Wizard


Medals: 70
Projects: 11
Exp: 12 years


klaatu barada nikto


« Reply #3 - Posted 2012-12-18 16:05:26 »

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.

Static Void Games - Play indie games, learn game programming, upload your own games!
Offline TheGDeveloper

Junior Member


Projects: 1



« Reply #4 - Posted 2012-12-18 16:26:43 »

Here is an image


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

Offline davedes
« Reply #5 - Posted 2012-12-18 19:38:24 »

http://www.raywenderlich.com/3888/how-to-create-a-game-like-tiny-wings-part-1
http://www.emanueleferonato.com/2011/07/14/create-a-terrain-like-the-one-in-tiny-wings-with-flash-and-box2d/

Good luck!

Offline TheGDeveloper

Junior Member


Projects: 1



« Reply #6 - Posted 2012-12-18 19:50:30 »

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

Offline davedes
« Reply #7 - Posted 2012-12-18 20:08:49 »

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.

Offline TheGDeveloper

Junior Member


Projects: 1



« Reply #8 - Posted 2012-12-18 21:26:19 »

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

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

BurntPizza (25 views)
2014-09-21 02:42:18

BurntPizza (16 views)
2014-09-21 01:30:30

moogie (19 views)
2014-09-21 00:26:15

UprightPath (26 views)
2014-09-20 20:14:06

BurntPizza (29 views)
2014-09-19 03:14:18

Dwinin (44 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (100 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56

mitcheeb (71 views)
2014-09-08 06:06:29
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!