Sign in to follow this  
DevlinHealy

Good 3D Lib for Java browser game/Basic

Recommended Posts

Okay, I need some advice here. I am intermediate-expert in Java. I'm going to use Java for the game. I have programmed some simple singleplayer 2d rpgs (and platformers). I'm looking to jump into basic 3d multiplayer game that runs in a browser. What I need:

A *3D* graphics library that is low(er) level that will run on any browser (okay, maybe not IE), and it capable of graphicsthatarenicerthatrunescape lol. I was thinking OpenGL, but there are very few tutorials on using opengl in a browser (honestly, I'm getting the hang of OpenGL, and would prefer this, but I have no idea how to get it in a browser), I looked into WebGL, but the amount of documentation on using it with java is absolutely PATHETIC. Which one should I use? (Keeping loading times down is a plus).

lwjgl looks alright... But there's barely any documentation whatsoever, and i doubt it can be used in a browser. JOGL seems to be kinda what I'm aiming for, but again, next to no documentation whatsoever. And it appears Java3d has been dead for years =\ Any other ideas?

Also, what language should I use for client-server communication? PHP? I honestly know next to nothing on this topic. The only real requirement I have for the client-server is that it is easily secured (or rather, EASIER to secure).

Also if you know of any good tutorials on *3D* ENGINE/GAME framework design (specifically in Java) that would be awesome. There are SOME tutorials on this in 2D, but I'm looking for some 3D tutorials.

thanks

Devlin

Share this post


Link to post
Share on other sites
[quote name='soaren' timestamp='1306347041' post='4815697']
Okay, I need some advice here. I am intermediate-expert in Java. I'm going to use Java for the game. I have programmed some simple singleplayer 2d rpgs (and platformers). I'm looking to jump into basic 3d multiplayer game that runs in a browser. What I need:

A *3D* graphics library that is low(er) level that will run on any browser (okay, maybe not IE), and it capable of graphicsthatarenicerthatrunescape lol. I was thinking OpenGL, but there are very few tutorials on using opengl in a browser (honestly, I'm getting the hang of OpenGL, and would prefer this, but I have no idea how to get it in a browser), I looked into WebGL, but the amount of documentation on using it with java is absolutely PATHETIC. Which one should I use? (Keeping loading times down is a plus).

lwjgl looks alright... But there's barely any documentation whatsoever, and i doubt it can be used in a browser. JOGL seems to be kinda what I'm aiming for, but again, next to no documentation whatsoever. And it appears Java3d has been dead for years =\ Any other ideas?

Also, what language should I use for client-server communication? PHP? I honestly know next to nothing on this topic. The only real requirement I have for the client-server is that it is easily secured (or rather, EASIER to secure).

Also if you know of any good tutorials on *3D* ENGINE/GAME framework design (specifically in Java) that would be awesome. There are SOME tutorials on this in 2D, but I'm looking for some 3D tutorials.

thanks

Devlin
[/quote]

What makes you think the WebGL documents are bad? The official spec by Khronos is very well written: [url="https://www.khronos.org/registry/webgl/specs/1.0/"]https://www.khronos....ebgl/specs/1.0/[/url]

If you know OpenGL, WebGL is pretty much the exact same thing. I don't see how you could make the case that either JOGL/LWJGL are easier, since you would need to learn at least as much to use either of them .

For your server, you could write that in pretty much anything you want. All it takes is some code to process HTTP headers, which is really easy (or you could just find a library that does it for you). Depending on your requirements, you may want to use either a static web server (if you don't have any dynamic content), a framework (if you only have simple forms/stateless transactions), or roll your own HTTP server (if you need to use websockets/comet style passing for low latency updates to some complex internal state).

EDIT: Now if your question is on how to use it with Java, then I am afraid you are terribly confused. The idea behind WebGL is to have an OpenGL interface for Java[b]script --[/b] not Java. I don't think it would even be possible without an enormous (and probably wasted) effort to connect WebGL to Java.

Share this post


Link to post
Share on other sites
[quote name='soaren' timestamp='1306347041' post='4815697']
lwjgl looks alright... But there's barely any documentation whatsoever, and i doubt it can be used in a browser.[/quote]

LWJGL comes with an Applet loader that runs in the browser just fine, and also works around some of the issues with the default JDK applet loader. As for documentation, any documentation for OpenGL is also documentation for the OpenGL binding in LWJGL. You'll just need to do a bit of mental translation for some of the function signatures -- e.g., where the C API uses pointers, LWJGL uses Buffer objects (FloatBuffers, ByteBuffers, etc..).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this