LWJGL 3D Terrain

LWJGL 3D Terrain Demo

Play this game!

Applet JNLP

This game is open source. Download the source here.

How are other people allowed to use this source?

This source is available AS-IS with no warranty or guarantees. You are free to use it as you wish.

This is a basic test and demo using LWJGL to draw a 3D randomly generated terrain. It utilizes the new OpenGL 3.3 shader-based rendering code and all code should be compatible with any video card compatible with OpenGL 3.3 or newer.

Look for upcomming tutorials and hints/tips for this demo as well as other Java-related posts at http://www.javaprogrammingforums.com/blogs/helloworld922/.

Minimum Requirements:

OpenGL 3.3 or newer

128MB video memory (estimated)



WASD: move the camera forward, backwards, left, and right

Z/X: Move the camera up and down

Q/E: Roll the camera

Left click: Rotate the camera (hold down and move the mouse)

Escape: Reset view to start view

Update 1.1:


- Made an applet version

- Lowered demo app default height map resolution to 512x512

- Switched to triangle strips for rendering (reasonable speed boost)

- Switched to a tile-based rendering scheme (hope is to have frustrum culling implemented at some point in the future)

- Fixed load stall

- No more webstart version

- Various minor tweaks and fixes



You are free to use all source as you wish, keep in mind all code is provided AS-IS with no warranty or guarantees. Feel free to comment if something isn't working quite right.

Login to leave a comment!