Sign in to follow this  
Ultimate_Fusion

[java] java 3d tutorials wanted!!!

Recommended Posts

as above im am getting pretting good at java now and have make a few 2d games. i want to get into 3d now. i have tried google but it is really hard to find normal java 3d tutorials. i keep finding the applet ones which i dont want to get into. i was pointed in the direction of http://www.j3d.org but i downloaded some random thing but i am lost from there. Isn't there a step by step tutorial somewhere to learn this. there is plenty for 2d so why not 3d??? thanks for looking

Share this post


Link to post
Share on other sites
Have you looked at the official Sun tutorials?

http://java.sun.com/products/java-media/3D/collateral/index.html#tutorial

Share this post


Link to post
Share on other sites
The official sun site is the best place to go.
But if you really want to get into 3d, may I suggest migrating to C++ and using DirectX or OpenGL. Java 3d is usable, but it is not as feature rich as DirectX/OpenGL and it is a lot slower because of the JVM dependency. The syntax of C++ is very similar to Java, though writing in C++ is a little bit more involved (no garbage collection for you!) but it makes for better 3d.

I have wrote in both Java and C++ in 3d and C++ is definitely the way to go.

Cheers, and good luck with whichever path you choose.

Share this post


Link to post
Share on other sites
Just another thought: Switching from Java to C++ and from J3D to OpenGL is a pretty damn big change. You might want to try an OpenGL binding for Java, by far the best is LWJGL.

Share this post


Link to post
Share on other sites
i was made to learn java at uni and got dam good at it. and wanted to make games.
i have already learned th basics of c++.
I have herd alot of things about c/c++ that it is much better and faster at everything.

so whats the point in java then.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ultimate_Fusion
i was made to learn java at uni and got dam good at it. and wanted to make games.
i have already learned th basics of c++.
I have herd alot of things about c/c++ that it is much better and faster at everything.

so whats the point in java then.


What's the point with Java?

Simple, true object oriented, distributed, robust, secure, portable, architecture neutral and multithreaded.

Though, if you need total control and better speed C++ is the right tool. But for someone starting out in games Java would be just fine. You can make some quite complex games in Java without noticing any appreciable slowdown from the language (unless you code like crap of course [smile]).

I wouldn't use Java3D though. Look for some OGL bindings.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ultimate_Fusion
i was made to learn java at uni and got dam good at it. and wanted to make games.
i have already learned th basics of c++.
I have herd alot of things about c/c++ that it is much better and faster at everything.

so whats the point in java then.


C/C++ are very powerful languages indeed, but they are also much more complex. Don't believe the old lie that java is very slow though, these days its pretty respectable in terms of speed- and more than adequate for 'indie' game development. Also, as I am always saying- a lot of the speed in fast game engines comes from the efficiency of the algorithims, not what language is used.

Java has a lot of good features gunning for it, so don't think its entirely useless altogehter. With java you get a pretty hefty set of easy to use core API functions (no nightmarish WIN32 API to deal with here), automatic heap memory management and garbage collection (though managed C++ and C# has this too), not having to worry about pointer variables, as well as cross platform exectution. The price you pay for all these features is unsuprisingly, extra performance points. Whether you believe these features are worth the performance hit, is your own choice.

As ever, you should read as many informative articles you can find on the net and make your own decision on this, rather than listening to biased opinions from fans of both languages.

Share this post


Link to post
Share on other sites
Why Java?

Taking game programming aside, it's by far the best language to develop nowadays, from simple desktop applications to scalable (and huge) enterprise or distributed applications. I don't mean to start a flame, that's my personal opinion and I believe many people here share it with me.

It is free to use (though not open source), portable (it will run in many popular OS), robust, etc, etc, etc.. Visit java.com for all the merchandising :)

Taking game programming into consideration, there are a few commercial quality games developed with Java, and many indie games as well.

If you want to see what Java can offer you in game development, take a look at jME. It's a game engine that sits on top of LWJGL, with plans to use JOGL as well.

Son Of Cain

Share this post


Link to post
Share on other sites
Why does everyone say Java is "A LOT" slower then c++?
Thats not true. ;(
Ok, java3d is a little slower then c, but do you really need 300 Frames or is 280 ok if you can stay with java ??

Share this post


Link to post
Share on other sites
Quote:
Original post by cybergolem
but do you really need 300 Frames or is 280 ok...


Yes...yes I do ;)

I wasn't aware that Java had OGL bindings...looks like I need to do some reading myself.

Java is a wonderful language (it would be better if it were open source *glares at Sun*) and it definitely has its place in enterprise/desktop development and in games. The thing I really like about Java is how easy the Networking is, which is key for games nowadays. Everything Son of Cain said I agree with, yet I prefer C++ for games, for everything else I will use java. But as was said, make your own decision, there is no right or wrong one here.

Share this post


Link to post
Share on other sites
I tried using Java3D but it can get slow (<30 frames/sec) and you don't get much rendering control. OpenGL bindings make it much easier to switch to 3D because like 2D graphics since you do rendering calls manually. I'm still in the transition from 2D to 3D and LWJGL (and all the openGL tutorials everywhere) is making it a little easier (through still challenging). Check out NeHe's site which has openGL tutorials, which including modifications to fit in other languages (LWJGL,etc.).

Share this post


Link to post
Share on other sites
I don't know much about Java 3d but maybe this link will be useful to you:

http://fivedots.coe.psu.ac.th/~ad/jg/

contains pdf draft versions of Killer Game Programming in Java.

Share this post


Link to post
Share on other sites
You should definitely go with an OpenGL binding to do 3D stuff in Java. I have been experimenting with JOGL. Google for "Jake2" and you will find Quake2 written entirely in Java with JOGL. It even uses the original game files. Pretty neat actually, and you wouldn't even know the difference.

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