Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 4
  ignore  |  Print  
  3D Randomly Generated World  (Read 12269 times)
0 Members and 1 Guest are viewing this topic.
Offline Longarmx
« Posted 2013-12-28 01:57:23 »

Inspired by The Fog - Survive, State of Fortune, Far Sky, and many others, I have created a 3d randomly generated world using simplex noise in a couple days. All you can do right now is walk(or fly) around and generate new terrain. Current frame rate for me is ~90 230 1500 fps limited to 60fps! I am curious as to what others are getting.

[Controls]
LMB/RMB - grab/release mouse cursor
WASD - movement
E - toggle flying
Q - fly supersonic
R - reload world with current settings
L; - decrease or increase persistence
,. - decrease or increase the largest feature
[] - decrease or increase the view distance
nm - decrease or increase the water quality
jk - decrease or increase the water wave height
CTRL - zoom
ESC - quit
LSHIFT - slow walking

Current Version: 0.0.5.2
[Download]

[Latest Update]
  • Water!
  • Performance greatly improved
  • You can now launch directly from data/launch_direct
  • VSync option in the launcher
  • Increased available display dimensions

[Known Bugs]
  • Collision mesh is buggy in negative coordinates
  • Screenshots don't take the whole screen in fullscreen mode unless you explicitly change the dimensions
Please tell me about bugs that you find!



[Update 0.0.5.3 DEV]
<a href="http://www.youtube.com/v/-RdZxfQ3i6s?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/-RdZxfQ3i6s?version=3&amp;hl=en_US&amp;start=</a>

Any criticism or feedback is much appreciated. Cheesy

Offline Longarmx
« Reply #1 - Posted 2013-12-28 06:28:52 »

[V0.0.2]
-Major Performance improvement
-Now normals are calculated only once per vertex (removes some artifacts)
-Chunk loading system (very large maps now possible)

Offline NegativeZero

JGO Knight


Medals: 41
Projects: 2


Zero but not.


« Reply #2 - Posted 2013-12-28 19:55:45 »

I had a bit of a blast in it, I found it to be very smooth!

I really like the texture you've got going on for the grass, it makes it seem nicer than a lot of grass textures you see around.
It kinda reminded me of this:



Although, I found that when I looked as far down as I could, the world starting glitching a bit.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline wessles

JGO Wizard


Medals: 77
Projects: 4
Exp: 3 years


Radirius Games


« Reply #3 - Posted 2013-12-28 20:23:45 »

I think you forgot something about linux with the natives.

Offline Longarmx
« Reply #4 - Posted 2013-12-28 22:07:32 »

@NegativeZero Yes, that's the picture I thought of too  Wink I'm trying to fix the camera issue, I just need to limit how far you can look down because when you get past looking straight down, your view flips and it glitches around.

@Wessles
Try to download again. I updated lwjgl and the natives. I also grouped all the natives in a single folder.

Offline wessles

JGO Wizard


Medals: 77
Projects: 4
Exp: 3 years


Radirius Games


« Reply #5 - Posted 2013-12-28 22:10:21 »

Unfortunately, still the same error Sad

Offline Longarmx
« Reply #6 - Posted 2013-12-28 22:11:21 »

@Wessles That's strange, I'm loading the natives directly with this code:
1  
2  
3  
       final String userDir = System.getProperty("user.dir");
       final String nativeLibDir = userDir + File.separator + "native";
       System.setProperty("org.lwjgl.librarypath", nativeLibDir);


Edit: That's strange, now I can't run the jar on windows. Same error. (It runs in eclipse though)

Offline Longarmx
« Reply #7 - Posted 2013-12-28 22:36:31 »

Ok, try one more time. If this doesn't work, then I don't have any idea on how to fix it.

Offline Simn
« Reply #8 - Posted 2013-12-28 22:54:18 »

Wait, why are you setting the natives path to the "user.dir" directory? That refers to the user directory in the file system, not where the jar is located.

- Simn
Offline Longarmx
« Reply #9 - Posted 2013-12-28 22:57:07 »

It seems to work fine for me, wherever I put the jar.

C:\Users\Longarmx\Documents\workspace\Simplex Noise\native\windows\

Is there a different property I should use?

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Simn
« Reply #10 - Posted 2013-12-28 22:58:56 »

Sorry, read a bit fast; "user.dir" is the property to use, but on OS X it fails:

1  
java.lang.UnsatisfiedLinkError: Can't load library: /Users/simn/native/macosx//liblwjgl.dylib

- Simn
Offline Simn
« Reply #11 - Posted 2013-12-28 23:09:05 »

It seems like the JVM gets run from /Users/user in OS X no matter what (that leads to every path from the directory of the jar to be referred to the home directory). I advice you to use JarSplice or place the natives at a temporary directory like "java.io.tmpdir" and load them from there.

- Simn
Offline Longarmx
« Reply #12 - Posted 2013-12-28 23:14:17 »

Sorry about that. It seems that the smallest of errors get past me (double file separator). Try the download again. Hopefully I'll eventually get this right  Wink

Offline Simn
« Reply #13 - Posted 2013-12-28 23:23:28 »

Lol, just totally forget what I said. Tongue

When I do:
1  
java -jar /Users/simn/Downloads/3D\ World/3D\ World.jar

It starts the JVM from /Users because that's the current directory I'm inside.

When I do:
1  
cd /Users/simn/Downloads/3D\ World

And then do:
1  
 java -jar 3D\ World.jar

It starts the JVM from that directory and "user.dir" refers to that directory. Cheesy (I feel so stupid now).

I only get an error saying that the shader version 330 is not supported, did you forget to create the display with the core profile enabled?

- Simn
Offline Longarmx
« Reply #14 - Posted 2013-12-28 23:59:35 »

When I create the display with core profile enabled (version 3.2), I just get a blank screen.

Offline Simn
« Reply #15 - Posted 2013-12-29 00:11:54 »

Hmm, that could be anything... Tongue

Try to make a small OpenGL application and see if it works, it's for sure a small problem somewhere.

- Simn
Offline Longarmx
« Reply #16 - Posted 2013-12-30 18:49:03 »

Simn, what OpenGL version do you have? This application requires V3.3

Offline Simn
« Reply #17 - Posted 2013-12-30 21:21:08 »

I have support for 4.1 and minor.

- Simn
Offline Longarmx
« Reply #18 - Posted 2013-12-31 01:30:13 »

Okay Simn, I got core profile enabled. Apparently you can't call glEnable(GL_TEXTURE_2D) Tongue Hopefully it works this time.

[Version 0.0.2.4]
-Reorganized engine so it is loading correct natives
-Core profile enabled with opengl version 3.3

Offline wessles

JGO Wizard


Medals: 77
Projects: 4
Exp: 3 years


Radirius Games


« Reply #19 - Posted 2014-01-01 15:57:22 »

Same errors. I would suggest the following:

- Start over on the .jar file
- Use a fat .jar creator
- Profit

-wes

Offline Longarmx
« Reply #20 - Posted 2014-01-03 02:54:42 »

Hmm. Just tried it on my mac (has support for 3.3) and got the same error as Simn. I don't know how to fix this error because it doesn't seem like anything is wrong. If anyone has any idea, could they please share. I will continue trying to find the cause of this problem on my own.

@Wessles
I don't think that creating a fat jar will solve any problems. The problem is not locating the files.

Offline HeroesGraveDev

JGO Kernel


Medals: 309
Projects: 11
Exp: 3 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #21 - Posted 2014-01-03 05:12:48 »

If you're using
System.getProperty("user.dir");
you will get errors if you try to double-click launch on Mac/Linux.

Solution:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
   public static String jarDir()
   {
      try
      {
         return new File(SomeClass.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
      }
      catch(URISyntaxException e)
      {
         e.printStackTrace();
         return null;
      }
   }

Offline AullenVerch

Senior Newbie




The univertse is vast!!


« Reply #22 - Posted 2014-01-09 18:36:44 »

Yeah, it appears I am having the same issues in mac too.. :/
Offline Sickan

Senior Devvie


Medals: 9



« Reply #23 - Posted 2014-01-09 20:42:57 »

If you're using
System.getProperty("user.dir");
you will get errors if you try to double-click launch on Mac/Linux.

Solution:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
   public static String jarDir()
   {
      try
      {
         return new File(SomeClass.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
      }
      catch(URISyntaxException e)
      {
         e.printStackTrace();
         return null;
      }
   }


I thought
1  
new File(SomeClass.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
was a joke the first time I read it, but apparently it's legitimate. Java's such a complicated and bureaucratic platform - maybe that's why companies like it?
Offline Zeke

Junior Devvie


Medals: 1



« Reply #24 - Posted 2014-01-12 03:08:08 »

Could you make a version for those of us with OpenGL 3? #130 for shader

Thank you!
Offline Longarmx
« Reply #25 - Posted 2014-01-12 06:49:17 »

@Zeke

There you go. Link in the 1st post  Wink I tested it to the best of my abilities on an opengl 4.3 computer so I am interested in your feedback. Cheesy

Offline Zeke

Junior Devvie


Medals: 1



« Reply #26 - Posted 2014-01-16 00:08:35 »

Log file:

Using Java Version: 1.7.0_45
OS: Windows
Using OpenGL Version: 3.0.0 - Build 8.15.10.2291
Loading Texture: grass13.png

Status: Works great! Smiley

Thanks for fixing that. That is really awesome. Is the code on github?

Also, do you use matrix transforms for camera? It seems like it... I really want to learn to get away from that, never learned to use quaternions... really want to.
Offline Longarmx
« Reply #27 - Posted 2014-01-16 00:53:13 »

@Zeke

Thanks for the feedback!

Check out my signature for my github page.

The base engine is a modified version of this tutorial, written in LWJGL. There are dedicated camera and quaternion classes that you can check out if you feel the urge.

Offline Longarmx
« Reply #28 - Posted 2014-01-18 21:14:36 »

[V 0.0.3]
-Text Rendering!
-Spritesheets/Texture Regions!
-Press ctrl to zoom!
-[] to decrease and increase render distance!


Offline Longarmx
« Reply #29 - Posted 2014-01-21 04:57:59 »

[V 0.0.3.1]
-Text Rendering how I intended it!
-Opengl V: 3.0 crash fixed!
-FPS counter!
-Hold Q to fly supersonic!

The world is collapsing!

Pages: [1] 2 3 4
  ignore  |  Print  
 
 

 

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

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (42 views)
2014-12-09 22:41:13

BurntPizza (76 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (51 views)
2014-12-03 16:27:13

CopyableCougar4 (48 views)
2014-11-29 21:32:03

toopeicgaming1999 (115 views)
2014-11-26 15:22:04

toopeicgaming1999 (103 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!