![](smile.gif)
[java] Java3D, an exercise in confusion
I have done some dx8 3d stuff but getting the same results with java3d hasn''t been as easy so far. I haven''t been able to get a whole lot of information on java3d programming and the tutorials i''ve read dont really go into what I wanna do.
All I want to do right now is, make a flat square with a 16x16 surface and a texture that is 16x16 pixels and when its displayed have it be 16x16 pixels on the frickin screen. In d3d this is trivial.
Think of a game in 2d, thats kinda what I want to replicate. Anyone wanna clue me in on how to set it up so that when my frame size is 640x480, a 16x16 flat square takes up 16x16 pixels. Essentially all I want to do is setup the viewpoint and ignore the z plane.
Advice? Code?
![](smile.gif)
If you want to do 2D with Java3D, you just need to set the Projection Policy to parallel. I don''t have the API docs right here but so far I can remember you can still use the SimpleUniverse in java3D.util and then by getting the View you can setProjectionPolicty(View.PARALLEL_PROJECTION). Something like that I think.
I''ve already tried to do such a thing, I mean 2D with Java3D. But as you said, there''s a lack of support and tutorials... I think this could be a way to have fast graphics with hardware acceleration for all the stretch/rotate operations. I was even thinking of coding a GraphicsEngine module for javanerd''s 2D GameFrame engine using Java3D. But I''m missing tutorials (and maybe time) to succesfully deal with textures and so.
So for now, I''m going to use the standard GameFrame engine for my game project and then, if I need it, either translate it in Java3D or implement a Java2D GameFrame module.
Anyway, if you succeed in doing 2D with Java3D, I am interested in the performance results you can obtain.
I''ve already tried to do such a thing, I mean 2D with Java3D. But as you said, there''s a lack of support and tutorials... I think this could be a way to have fast graphics with hardware acceleration for all the stretch/rotate operations. I was even thinking of coding a GraphicsEngine module for javanerd''s 2D GameFrame engine using Java3D. But I''m missing tutorials (and maybe time) to succesfully deal with textures and so.
So for now, I''m going to use the standard GameFrame engine for my game project and then, if I need it, either translate it in Java3D or implement a Java2D GameFrame module.
Anyway, if you succeed in doing 2D with Java3D, I am interested in the performance results you can obtain.
April 30, 2001 12:41 PM
If you go there you''ll find plenty of infos on the Java3D API.
http://developer.java.sun.com/developer/earlyAccess/
C''mon, do a little search on www.javasoft.com and stop whining that there is no infos.
http://developer.java.sun.com/developer/earlyAccess/
C''mon, do a little search on www.javasoft.com and stop whining that there is no infos.
You can go to www.java3d.org to have a list of all java3D related sites.
And on www.j3d.org you can find a tutorial about textures and so.
I agree with you you can find some tutorials on javasoft and the official Java3D Tutorial is quite useful. In fact I don''t need a Java3D tutorial but instead a 3D for newbies tutorial in Java3D
.
Anyway, my project is 2D so I will use one of the existing 2D engines available. I was just wondering if using Java3D would be easy or not for a newbie.
And on www.j3d.org you can find a tutorial about textures and so.
I agree with you you can find some tutorials on javasoft and the official Java3D Tutorial is quite useful. In fact I don''t need a Java3D tutorial but instead a 3D for newbies tutorial in Java3D
![](wink.gif)
Anyway, my project is 2D so I will use one of the existing 2D engines available. I was just wondering if using Java3D would be easy or not for a newbie.
Silencer, you said you''ll use a 2d engine but there are working 2D engines written in Java? What exactly do they?
The GameFrame Engine (currently v0.9.4) can be found at www.gamedev.net/hosted/javanerd
As I write, I just realized that this engine was coded by the moderator of this forum, javanerd.
It is a java 2D engine that uses a common interface for all your java 2D games (microsoft Java, Sun Java 1.1, Sun Java 1.2 etc) and do the appropriate optimizations (in MS Java you have DirectX fullscreen support for example). It''s kind of nice when you don''t want to invest time in building your low level graphics engine. And if you are not satisfied with the performance, you can still code your own engine using the same interface (that is what I wanted to do with Java3D or GL4java).
I think we should use more often such engines so people could involve more in their developments and maybe at the end we would have a nice common API for Game dev in Java.
As I write, I just realized that this engine was coded by the moderator of this forum, javanerd.
It is a java 2D engine that uses a common interface for all your java 2D games (microsoft Java, Sun Java 1.1, Sun Java 1.2 etc) and do the appropriate optimizations (in MS Java you have DirectX fullscreen support for example). It''s kind of nice when you don''t want to invest time in building your low level graphics engine. And if you are not satisfied with the performance, you can still code your own engine using the same interface (that is what I wanted to do with Java3D or GL4java).
I think we should use more often such engines so people could involve more in their developments and maybe at the end we would have a nice common API for Game dev in Java.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement