[java] Java ROAM Demo

Started by
7 comments, last by appleweed 23 years, 4 months ago
Hey all... I''ve ported Bryan Turner''s ROAM implementation as featured in his Gamasutra article: http://www.gamasutra.com/features/20000403/turner_01.htm I used Magician and Java2 1.3 (JDK1.3, or whatever the hell they are calling it these days! . I basically wanted to see for myself whether or not Java can hack it for some serious game development. I must say, I am *very* happy with the results I got. If you''d like to take a look yourself, I got the source, sample texture, height map and everything else here: http://www.indigenoustech.com/Downloads/JavaROAM.zip At the end of his paper, Bryan qualifies his C implementation with these figures: Platform- Win98, AMD K6-2 450 MHz, 96 MB RAM, NVIDIA GeForce 256 DDR video. Resolution- 640x480, 32-bit color Default # of "TriTreeNodes"- 10,000 With this he gets about 30 fps for textured landscape and about 36 fps for non-textured, solid-filled landscape. My implementation figures: Platform- Win98SE, PIII 600 MHz, 256 RAM, NVIDIA Diamond Viper (16 VRAM?? don''t remember...) Resolution- 640x480, 32-bit color Default # of "TriTreeNodes"- 10,000 For textured landscape, I''m averaging about 28 fps. Just like Bryan''s implementation, I haven''t done any OpenGL optimization yet (no display lists, triangle fans, etc.) nor have I implemented any of the suggested ROAM optimizations (Geomorphing, Merge Queues, Frame Coherence, etc.) To me, this just means there is much more I can do with Java! Also, I must say that I first ran this implementaion using JDK1.2. And, yes, it was slower. About 20 fps for textured landscape. Still, not bad. But obviously Sun is making good on their increased-performance gains. Obviously, the Magician OpenGL binding had everything to do with this performance. I hope this helps some people out in their decision-making when considering Java for game development. I am, by the way, a complete OpenGL and game developer novice! (Maybe a couple months or so into this?) Hell, I''m not even that great of a Java programmer. So for people who still think they need to start with DirectX and re-write Tetris for the billionth time, let me suggest that naivety has its benefits as does a healthy dose of imagination! All comments and ridicule equally appreciated.. -Omar --- "We are Indigenous. Welcome."
---"We are Indigenous. Welcome."Indigenous Technologies, Inc.
Advertisement
holy isht!

unless your a pathological liar,

CONGRATULATIONS !

If you did what you say...

well, i''m a newbie and I could''nt pull

it off.
"do you like my helmut?"-yoghurt
I am downloading it right now. Way to go man. Just so everyone knows I emailed Symbolstone and 5 minutes later the Aligator guy mailed me back and said that they are still working on making magician the standard but that it is slow going and seemed to say it was SGI''s holding the gig up. I am still waiting for a response from an engineer at SGI.

I wanrned you! Didn''t I warn you?! That colored chalk was forged by Lucifer himself!

Opere Citato
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
On what ever the standard window was:

Celeron 464
64megs
16mb tnt1

20-25 fps. Usually 22 and change.

Dual pentium pro 233
128megs
4mb Matrox Milleniom

1.7 - 2.5 fps. Usually 1.9.

Smokin!


I wanrned you! Didn''t I warn you?! That colored chalk was forged by Lucifer himself!

Opere Citato
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
lupine- Well, I''ve been known to stretch the truth every so often! But in this case, as attested by GKW, it really does work!

GKW- I''m curious why you got such low frame rates on the Dual Pentium box. I wouldn''t have thought that the lack of VRAM would have caused that dramatic of a frame degredation. (But what the hell do I know...)

Just realized I forgot to include the original README in the zip file I put on my web site. I''ll include it now. Basically, it tells you the keyboard mappings which are great for debugging purposes. Here they are for those that downloaded the project already:

---
CONTROLS:
MOUSE - Hold Left Mouse Button to Rotate View Angle

Q - Change Rendering Mode (Wireframe, Lit, Fill, Texture)
O - Change View Mode (Observe, Follow, Drive, Fly)

W/S - Move forward/back
A/D - Rotate left/right (in Observe Mode only)

F - Stop Animation
R - Toggle Frustum Drawing

0/9 - More/Less Triangles per frame
1/2 - Adjust FOV
---

It''s worth noting that I didn''t implement lower case mappings, so you need your CAPS LOCK on or hold down your SHIFT key. This happened because I had thought that the VK_A thru VK_Z constants for Java key events represented both lower and upper case letters. And I was too lazy to fix it later... heh.

I would love to hear the frame rates of other people! I''ve started my own game project and it would be nice to know what kind of performance people were getting. Thanks!

-Omar


---

"We are Indigenous. Welcome."
---"We are Indigenous. Welcome."Indigenous Technologies, Inc.
Two PPros 233''s is a bunch of processing power but the Millenium does not accelerate OpenGL in a meaningful way. I don''t believe that it does at all in windowed mode. By the way when I hit ''Q'' to change the rendering mode I get an exception in the Magician library and have to shut the VM down.

I wanrned you! Didn''t I warn you?! That colored chalk was forged by Lucifer himself!

Opere Citato
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
Hmm.. was it something like "An error in native code outside of the VM was detected."? I''ve had that once or twice when I''ve done something that Magician didn''t seem to like, but appeared "legal" to me. (The "gluBuild2DMipmaps" call was a bitch, for instance, even though it is very straightforward.) I believe there are still areas in Magician that Arcana is still working on.

Did you re-compile? Might need to for your dual-cpu setup. Dunno.

-Omar

---

"We are Indigenous. Welcome."
Indigenous Technologies, Inc.
---"We are Indigenous. Welcome."Indigenous Technologies, Inc.
I will recompile it later. I have used gluBuild2DMipmaps and it works fine for me. I ran into an exception a couple of days ago that was a library error and now I don''t remember what it was. Of course since I have a few beers in me I may remember tomorrow. Last time I got one of those errors was when the bitmap loaded I made was not working correctly and was passing an empty array to glTexImage2D. Errors and all I have been happy with Magician so far.

I wanrned you! Didn''t I warn you?! That colored chalk was forged by Lucifer himself!

Opere Citato
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
Yeah... that''s basically the same problem I had with gluBuild2DMipmaps(). First, I had manually built an array with height map values. gluBuild2DMipmaps() caused not only a native code exception, but registered an exception in Windows (in GLU.dll). Then I used a Texture object as suggested by the Magician documentation and loaded a GIF file for height values. I checked the isValid() method to make sure the texture was fully loaded and then performed the build. That caused a native code exception as well.

Wasn''t untill I isolated my code in a separate function and checked the isValid() method there that it actually worked. It was as if it needed some amount of time even _after_ isValid() became true. Weird. But, hey, still love Magician to death!

-Omar

---

"We are Indigenous. Welcome."
Indigenous Technologies, Inc.
---"We are Indigenous. Welcome."Indigenous Technologies, Inc.

This topic is closed to new replies.

Advertisement