Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  help for creating a 3D landscape like this one  (Read 2661 times)
0 Members and 1 Guest are viewing this topic.
Offline java_dude

Senior Newbie

Projects: 1

Play Powablox :

« Posted 2012-12-07 21:45:46 »


I'm an average Java coder, and now I want to learn OpenGL (in Java) to make a landscape like the one shown in the picture below (it's a Linux screensaver).

Actually, the color stuff is not what I'm interested in: what I would like to achieve is just the wireframe view of such a landscape (pretty basic thing in OpenGL, I imagine...)

So Big, Big, Big Thank You for providing me any piece of advice (or code) you have about what I should do in order to create a wireframe landscape!!!!!!!

PS: if your tips, lines of code or weblinks deal with C/C++/C#, no problem, I'll figure out how to make it work in Java, so feel free to post any piece of help (because I'm really starting from scratch on this one, and I really want to code it!). Thank you very much!

Click to Play

Offline Danny02
« Reply #1 - Posted 2012-12-08 09:04:49 »

I don't know how much you know about OpenGL, but if you are familiar with the basics try this:

1. create a grid which is build with as many quads as you like
2. change the height value either on the cpu side or in a shader(then u can use the height also to set a color)
3. render the mesh first as a solid plane then as a wireframe without colors

When you don't know were to get interesting height values to use, there are several possibilities:
- draw a "heightmap" with a drawing programm. just a grey-scaled image, which you read out in your app
- use some interesting functions(sin, cos ...)
- or use some sort of noise function(you should find a lot on this forum)
Offline java_dude

Senior Newbie

Projects: 1

Play Powablox :

« Reply #2 - Posted 2012-12-08 10:44:53 »

Thank you very much for your pieces of advice!

As a matter of fact, I don't OpenGL yet, and I would like to learn coding a wireframe landscape (interesting case, I think).
I'm interested in coding a random/procedural terrain.

Thank you for your help! Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline davedes
« Reply #3 - Posted 2012-12-08 19:06:53 »

If you don't know anything about OpenGL, I'd start with the bare minimum before jumping into 3D. Write yourself a texture loader, dabble with sending custom vertices to a shader, etc. See here.

Pages: [1]
  ignore  |  Print  

EgonOlsen (79 views)
2018-06-10 19:43:48

EgonOlsen (59 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (261 views)
2018-05-13 18:23:11

nelsongames (160 views)
2018-04-24 18:15:36

nelsongames (158 views)
2018-04-24 18:14:32

ivj94 (901 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (813 views)
2018-03-24 14:43:53

Solater (177 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!