[java] java opengl/java3d for 2d games
This is possibly going to be a lengthy message that doesn''t necessarily apply totally to this group, but here goes..
I was thinking of a way to improve game programming in java that was "outside the box". The idea is to use a 3d api (be it Java3D or OpenGL java bindings) to accelerate 2d graphics. The idea I had would be to have each sprite essentially exist on a square. The square would be texturemapped with the actual sprite image. Assuming you had alpha enabled, you could have a sprite with transparency. All sprites would be coplanar, except for perhaps the background. Anyway, the gist of this idea is that you could render out these 3d sprites letting Direct3d or OpenGL accelerate the graphics in hardware (hopefully).
I know this idea isn''t fleshed out very well, but I was hoping to generate some discussion.
Thanks,
Shaun
first come 2d
then accelerated 2d
then accelerated 3d.
So if you can take advantage of 2d accel you would have a fast app, isn''t it ?
Yes, but the 3d rasterizer is so fast with so many nice features !
Truly, the 3d option for rendering 2d is good, it was suggested by NEC and Videologic engineers about 1 year ago, in a PowerVR related doc.
Of course w/o 3d acceleration you will have a problem, but 3dcards cost so little money...
Something cool will be an API using the fastest function between 2d and 3d ones, but to my knowledge none (except opengl ICD possible implementation) are available right now.
-* Sounds, music and story makes the difference between good and great games *-
then accelerated 2d
then accelerated 3d.
So if you can take advantage of 2d accel you would have a fast app, isn''t it ?
Yes, but the 3d rasterizer is so fast with so many nice features !
Truly, the 3d option for rendering 2d is good, it was suggested by NEC and Videologic engineers about 1 year ago, in a PowerVR related doc.
Of course w/o 3d acceleration you will have a problem, but 3dcards cost so little money...
Something cool will be an API using the fastest function between 2d and 3d ones, but to my knowledge none (except opengl ICD possible implementation) are available right now.
-* Sounds, music and story makes the difference between good and great games *-
It appears that this is actually a fairly common technique. I am using the same concept to develop a cyberpunk game in Java 3D. As I was looking into this concept for my own game I found out that the technique has been used in a couple of commercial games, including Dungeon Keeper 2.
There was a similar discussion in the Isometric Game thread on this board where they questioned the use of 3D API''s for 2D isometric games. The benefits they listed included accurate Collision Detection and 3D Lighting (which is going to be more effective than trying to simulate lighting with a 2D engine).
I am not that far along yet, but the only problem I have found in my development is that Java 3D apparently doesn''t support animated textures.
There was a similar discussion in the Isometric Game thread on this board where they questioned the use of 3D API''s for 2D isometric games. The benefits they listed included accurate Collision Detection and 3D Lighting (which is going to be more effective than trying to simulate lighting with a 2D engine).
I am not that far along yet, but the only problem I have found in my development is that Java 3D apparently doesn''t support animated textures.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement