RobinB
|
 |
«
Posted
2012-10-05 13:19:06 » |
|
It doesnt have a name yet, suggestions are welcome    My goal is to render realistic (random generated) planets, stars and other objects. Currently, the planets and stars are generated using perlin noise and sphere mapping, so everything looks unique (to bad i only have implemented one pattern for the planets yet).  Features:- All planets / stars are generated realtime without lag. - Ups always stays at 59/60 UPS (rounding errors), while fps is capped at 60. - Implemented some particle systems. New:- Optimized planet generation, should not lag at all. - Toggle FPS cap with F1 (dont, its bugged). - Memory usage is shown on screen. - Increased gravitational pull (2x) - Shaders! - Sun glow is created using a shader, now there is no limit of the width of the glow, its faster and it looks much smoother. - Sunbeams are calculated and projected on planets (visible in the image of the planet above). - Sun is more alive (color multiplier shifts from 0.9 - 1.5) - Antialiastering for the sun, planet and atmosphere. - Shooting - Added random moon Download Url (sorry i need to figure out how to pack the natives / lib yet). DownloadYou can fly around a bit and check the generated content, have fun (maybe a minute of 2) 
|
|
|
|
|
Huw
|
 |
«
Reply #1 - Posted
2012-10-05 14:17:50 » |
|
Wow, this is really great! Very smooth game, also the gravitational pull towards the sun was very nicely put in there. Can't wait to see where this goes.
|
|
|
|
matheus23
|
 |
«
Reply #2 - Posted
2012-10-05 17:31:44 » |
|
Oh man!... Procedural content! I'm dying... I can't play this $ java -jar SpaceGame.jar Full-screen exclusive mode not supported Exception in thread "Thread-0" java.lang.NullPointerException at Game.Presenter.a.b(Unknown Source) at Game.Presenter.c.run(Unknown Source)java version: $ java -version java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (ArchLinux build 7.u7_2.3.2-2-x86_64) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)You should better include line-numbers... Also, why lib/lwjgl, if you try to set "fullscreen exclusive mode"? FEM is only for AWT, isn't it?
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Ultroman
|
 |
«
Reply #3 - Posted
2012-10-06 01:08:16 » |
|
Works fine for me. Gave a "file not found" exception, saying it wanted D:\Screen.vert Exited successfully, though  Very nice! Keep it up
|
- Jonas
|
|
|
Jimmt
|
 |
«
Reply #4 - Posted
2012-10-06 06:07:50 » |
|
Really cool, but same error as Ultroman. Specifically: 1 2 3 4 5 6 7 8 9 10 11 12
| java.io.FileNotFoundException: D:\screen.vert (The device is not ready) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at g.b.a.a(Unknown Source) at g.b.a.a(Unknown Source) at g.b.a.<init>(Unknown Source) at j.a.a.<init>(Unknown Source) at j.g.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Unknown Source) |
|
|
|
|
|
Sammidysam
|
 |
«
Reply #5 - Posted
2012-10-06 18:58:48 » |
|
Really cool, but same error as Ultroman. Specifically: 1 2 3 4 5 6 7 8 9 10 11 12
| java.io.FileNotFoundException: D:\screen.vert (The device is not ready) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at g.b.a.a(Unknown Source) at g.b.a.a(Unknown Source) at g.b.a.<init>(Unknown Source) at j.a.a.<init>(Unknown Source) at j.g.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Unknown Source) |
Same error here, except it said "The system cannot find the file specified" in parenthesis instead of "The device is not ready". The game worked completely fine though. I was kinda lost as to what I was doing, but I did smash my spaceship right into a planet  I did notice that it looks like the escape button closes the game. I think it should just open up a pause menu or something, but I assume you will add that when it comes time. This game looks really cool so far.
|
|
|
|
|
RobinB
|
 |
«
Reply #6 - Posted
2012-10-07 13:08:44 » |
|
Thanks for all the replies  . The exception is some leftover from my try with shaders (hardcoded path), i want the sun to cast light on the planets and blurring objects when the player moves. Ill upload a new version without this problem.
|
|
|
|
|
|
|
RobinB
|
 |
«
Reply #8 - Posted
2012-10-11 15:42:58 » |
|
doesnt work on mac  Possibly, i dont have any mac near, so hard to test. It would come in handy if you explained a little more, what happens when you execute the jar, are there any errors?
|
|
|
|
|
Regenuluz
|
 |
«
Reply #9 - Posted
2012-10-11 15:55:27 » |
|
I can help you with a little more info.  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Regenuluz@Medusa ~/Downloads/game $ java -jar SpaceGame.jar Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) at java.lang.Runtime.loadLibrary0(Runtime.java:845) at java.lang.System.loadLibrary(System.java:1084) at org.lwjgl.Sys$1.run(Sys.java:73) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.Sys.doLoadLibrary(Sys.java:66) at org.lwjgl.Sys.loadLibrary(Sys.java:95) at org.lwjgl.Sys.<clinit>(Sys.java:112) at org.lwjgl.opengl.Display.<clinit>(Display.java:132) at Game.Presenter.a.<init>(Unknown Source) at Game.Presenter.Start.main(Unknown Source) Exception in thread "Thread-1" java.lang.NullPointerException at Game.Presenter.a.b(Unknown Source) at Game.Presenter.c.run(Unknown Source) |
Is the error when trying to run it on a Mac, and I think I recall seeing that before and that being something with the current version of lwjgl not working correctly on os x ^^ (Someone correct me if I'm way off here..  )
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Danny02
|
 |
«
Reply #10 - Posted
2012-10-11 16:22:35 » |
|
you probably should not obfuscate your code to get better feedback
|
|
|
|
|
matheus23
|
 |
«
Reply #11 - Posted
2012-10-11 16:23:22 » |
|
you probably should not obfuscate your code to get better feedback
+1
|
|
|
|
Regenuluz
|
 |
«
Reply #12 - Posted
2012-10-11 16:51:13 » |
|
you probably should not obfuscate your code to get better feedback
How will not obfuscating your code get you better feedback? Any exceptions etc. is printed in the terminal, unless they're caught, whether or not the code is obfuscated.
|
|
|
|
|
matheus23
|
 |
«
Reply #13 - Posted
2012-10-11 16:52:42 » |
|
you probably should not obfuscate your code to get better feedback
How will not obfuscating your code get you better feedback? Any exceptions etc. is printed in the terminal, unless they're caught, whether or not the code is obfuscated. If the code is not obfuscated, you can see which file it was and even which line threw the Exception, else you can't. I don't know how you would want to know where the exception happened, if you've got a big project, which is even obfuscated.
|
|
|
|
RobinB
|
 |
«
Reply #14 - Posted
2012-10-11 16:55:44 » |
|
you probably should not obfuscate your code to get better feedback
+1 Yeah, but i want to keep some code for myself, so that wouldnt work well. Most of the stuff is basic, but im kinda proud of my terrain generation, so i want to protect it a little. Im sorry for this guys. The error is "no lwjgl in java.library.path", so a command line error. LWJGL is not added to the command e.g. "java -Djava.library.path="lib\macosx" -jar SpaceGame.jar" (slash could be the other way, im not so familiar with mac) When the library path is added to the command it should work.
|
|
|
|
|
Regenuluz
|
 |
«
Reply #15 - Posted
2012-10-11 16:59:10 » |
|
I actually used "java -Xmx512m -Xms256m -Djava.library.path="lib\macosx" -jar SpaceGame.jar" at first. But well, guess I should've used slashes instead.  Now I get this error: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
| Regenuluz@Medusa ~/Downloads/game $ java -Xmx512m -Xms256m -Djava.library.path="lib/macosx/" -jar SpaceGame.jar JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM org.lwjgl.LWJGLException: Could not get the JAWT interface at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method) at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:51) at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:94) at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:92) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:92) at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:66) at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:57) at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56) at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85) at org.lwjgl.opengl.MacOSXContextImplementation.create(MacOSXContextImplementation.java:47) at org.lwjgl.opengl.ContextGL.<init>(ContextGL.java:132) at org.lwjgl.opengl.Display.create(Display.java:847) at org.lwjgl.opengl.Display.create(Display.java:754) at org.lwjgl.opengl.Display.create(Display.java:736) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at g.b.<init>(Unknown Source) at g.a.a.a(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.ARBShaderObjects.glDeleteObjectARB(ARBShaderObjects.java:66) at g.b.a.a(Unknown Source) at g.b.a.<init>(Unknown Source) at j.a.a.<init>(Unknown Source) at j.g.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at g.a.<init>(Unknown Source) at j.a.a.<init>(Unknown Source) at j.g.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at g.a.<init>(Unknown Source) at j.a.<init>(Unknown Source) at j.g.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at d.d.e(Unknown Source) at d.a.b.<init>(Unknown Source) at d.d.<init>(Unknown Source) at j.a.<init>(Unknown Source) at j.g.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at g.a.<init>(Unknown Source) at h.d.<init>(Unknown Source) at f.d.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at d.a.e(Unknown Source) at d.a.b.<init>(Unknown Source) at d.a.<init>(Unknown Source) at h.a.<init>(Unknown Source) at h.d.k(Unknown Source) at h.d.<init>(Unknown Source) at f.d.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at d.b.e(Unknown Source) at d.a.b.<init>(Unknown Source) at d.b.<init>(Unknown Source) at h.a.<init>(Unknown Source) at h.d.k(Unknown Source) at h.d.<init>(Unknown Source) at f.d.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at g.b.<init>(Unknown Source) at c.a.b.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at d.c.e(Unknown Source) at d.a.b.<init>(Unknown Source) at d.c.<init>(Unknown Source) at c.a.b.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at d.c.e(Unknown Source) at d.a.b.<init>(Unknown Source) at d.c.<init>(Unknown Source) at c.a.b.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenTextures(GL11.java:1372) at g.d.b(Unknown Source) at g.d.a(Unknown Source) at g.d.a(Unknown Source) at g.a.<init>(Unknown Source) at c.a.b.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) Exception in thread "Thread-3" java.lang.NullPointerException at org.lwjgl.opengl.GL11.glGenLists(GL11.java:1391) at c.a.b.<init>(Unknown Source) at Game.a.<init>(Unknown Source) at Game.d.run(Unknown Source) at java.lang.Thread.run(Thread.java:722) Exited succesfull |
|
|
|
|
|
RobinB
|
 |
«
Reply #16 - Posted
2012-10-11 17:04:58 » |
|
Mother of errors... Well it seems i need some more exception handling to stop those extra errors. Im going to try to fix this.
Thanks for trying.
*It seems this bug happen rarely on random games under osx, are you running java 1.7?
|
|
|
|
|
RobinB
|
 |
«
Reply #17 - Posted
2012-10-11 21:37:41 » |
|
|
|
|
|
|
Regenuluz
|
 |
«
Reply #18 - Posted
2012-10-11 21:55:38 » |
|
Yeah, I'm running Java 7. 1 2 3 4
| Regenuluz@Medusa ~ $ java -version java version "1.7.0_04" Java(TM) SE Runtime Environment (build 1.7.0_04-b21) Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode) |
I'm getting the same error from the new build. ^^
|
|
|
|
|
RobinB
|
 |
«
Reply #19 - Posted
2012-10-11 22:15:21 » |
|
Ehmm.. i dont know it. All threads i can find about it just tell to rollback to java 6. Do other java games (using lwjgl) work well for you?
|
|
|
|
|
Grunnt
|
 |
«
Reply #20 - Posted
2012-10-12 09:35:48 » |
|
It works fine here, I could extract and run it using the batch file no problem (Java 7 on Windows 7). Looks really cool! I like the exhaust flame effects, the sun (and how your ship heats up and loses shields when near) the planets, and the wormhole looks awesome! Best looking wormhole ever  Some random thoughts: - your current setup seems very well suited for an action-like game. Maybe make gravitational pull more intense, make the controls more responsive (i.e. higher ship thrust, faster rotation) - having some kind of zoom may be useful to be able to see ahead a bit further when travelling at speed (i.e. going faster = zoomed out further). Alternatively you can make the ship move to the edge of the screen when speeding up so you can see further ahead. - at the beginning of a game I get quite big hiccups in the framerate, but after like 30 secs it's all smooth. I guess this has something to do with the realtime content generation (as some of the hiccups occur right when a planet turns from blue to textured). Maybe completely generate content upon entering a sector to avoid these hiccups? But overall, looks great and I'm looking forward to what you will make of it 
|
|
|
|
RobinB
|
 |
«
Reply #21 - Posted
2012-10-12 14:27:36 » |
|
Thank you very much, The wormhole is actually a particle system, it looks nice, but needs some more tweaking. The ship is a beginner ship, so its supposed to be kinda slow i guess, but i could make evrything faster so there is more action, good idea. Zooming is also awsome, im going to implement that. On my laptop the hicckups were 1 seconds each at first, but after some optimailisation it was more like 50-100 msec, but i didnt take slower systems in account. I really want to try to load them at realtime, because i dont like loading screens, some more optimizing then  . I think im going to add colonizing planets, and some ai ships to take with you in the future. At first im going to try adding enemys (with guns etc), and landing on planets (maybe like the game spore).
|
|
|
|
|
Phased
|
 |
«
Reply #22 - Posted
2012-10-12 14:41:32 » |
|
I was going to download this game a while ago when you first put the topic up but never got around to it, Just did then, and I like it, the physics is nice, and the wormhole is very nice, I wanted to go through it  Is the background stars 3d? or is it just a illusion? And I did not really drop any frames, at the beginning It felt like it skipped a few frames, but that only happens twice, but it didn't really pick up on the FPS counter.
|
|
|
|
|
RobinB
|
 |
«
Reply #23 - Posted
2012-10-12 15:27:28 » |
|
Thanks.
Passing trough a wormhole is going to be possible ofcourse, but still something for the future.
Its an illusion, small stars just move slower then big stars, giving this effect. 3D seems not worth it, because it takes more gpu time and has no other use then filling up the black gaps between planets and giving the illusion of moving. I also want these stars to blur (forming a small line) when the player is flying at high speed, but its hard with my limited knowledge about shaders.
When the texture gets loaded to memory (need to be done on the same thread as rendering) this takes some ms time, and get compensated by the loop itself. However the loading takes long enough to be noticed (even easyer on slower systems).
|
|
|
|
|
RobinB
|
 |
«
Reply #24 - Posted
2012-10-17 18:03:10 » |
|
New update! New:- Optimized planet generation, should not lag at all. - Toggle FPS cap with F1 (dont its bugged). - Memory usage is shown on screen. - Increased gravitational pull (2x) - Shaders! - Sun glow is created using a shader, now there is no limit of the width of the glow, its faster and it looks much smoother. - Sunbeams are calculated and projected on planets (visible in the image of the planet above). - Sun is more alive (color multiplier shifts from 0.9 - 1.5) - Antialiastering for the sun, planet and atmosphere. - Shooting - Added random moon Download:l DownloadGoal of this release is to check if the shaders are working for everyone. Give some feedback / error dumps if possible 
|
|
|
|
|
Joshua Waring
|
 |
«
Reply #25 - Posted
2012-10-17 18:10:04 » |
|
for me the shading of the sun was just a big orange square under the sun.
|
The world is big, so learn it in small bytes.
|
|
|
RobinB
|
 |
«
Reply #26 - Posted
2012-10-17 18:10:59 » |
|
Could you upload a picture of it? And does it show any errors inside the console?
|
|
|
|
|
Ultroman
|
 |
«
Reply #27 - Posted
2012-10-17 18:16:18 » |
|
Looked beautiful here  Keep it up!
|
- Jonas
|
|
|
theagentd
|
 |
«
Reply #28 - Posted
2012-10-18 15:28:27 » |
|
for me the shading of the sun was just a big orange square under the sun.
Same here. You're doing an implicit conversion from vec4 to vec3 somewhere. Integrated Intel Ivy Bridge GPU here. Line 0:11 somwhere.
|
Myomyomyo.
|
|
|
Joshua Waring
|
 |
«
Reply #29 - Posted
2012-10-18 15:35:22 » |
|
 There's no error returned and it exit's correctly, I'm using a 6970 on a AMD FX-8150
|
The world is big, so learn it in small bytes.
|
|
|
|