Java Cool Dude
|
 |
«
Posted
2003-09-27 21:55:13 » |
|
Topic says it all; instead of creating countless threads about every port, I thought it'd be more efficent to have em all within one. Notice the following demos are all jar executables. GameTutorial 41= Height map + FogQuake 3 Loader and AnimatorPS: Pepi, I'd like you to take a closer look at ProcessKeyboard() function in the first linked port; now if you can put that in all Nehe's ports, it'd be awesome 
|
|
|
|
|
chiraz
Junior Newbie
Java games rock!
|
 |
«
Reply #1 - Posted
2003-09-28 17:45:53 » |
|
As requested...  I have worked over the weekend to create a Quake3 BSP viewer app in Jogl. I made use of one of the Nehe tutorials for helper classes and resource loaders... Thanks for those people who created them. Here's the Eclipse project and the sources: http://www.openworkflow.org/jmundo.zipI've run this app and even though it doesn't raise exceptions or dumps, it only shows a completely black screen  I've tried a lot and did identify some bugs in the process, but cannot seem to get it working. If only it would even show garbled objects... My hunch is that it may be with the use of the buffers... If it's simple, please post the resolution in the forum and I'll update. Let me know what you think about this thing and perhaps we can put the sources in collaborative working environment somewhere. Cheers, Chiraz
|
|
|
|
|
chiraz
Junior Newbie
Java games rock!
|
 |
«
Reply #2 - Posted
2003-09-28 20:01:50 » |
|
 I've just found out the most stupid mistake in my Q3 BSP viewer, glDrawElements or glDrawArrays was never called ( it may do several passes for transparency and special effects ). Rather than let you look into it for hours yourself: In the FaceRenderer you'll see a renderFlush method. The setState function would always return 1, which is why it was never called. I've had to update the shaders to increase the numpasses and modify the setState. It should return when it gets a 0 back, rather than > 0. Things work now actually! For an interesting shot: http://www.openworkflow.org/screenshot.jpgMeshes and textures are not working properly yet. The framerate I estimate about 10-15 or so. This is when rendering the FULL scene ( PVS and clipping DISABLED ). Amazing what you can jam out of a JVM!!! Cheers, Chiraz
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Java Cool Dude
|
 |
«
Reply #3 - Posted
2003-09-29 04:45:50 » |
|
Great Job dude, now let's build a team and code a game  Anyways I tweaked my code as much as I can, and all the ports now come as executable jars. I also improved keyboard's events processing a lot as well as my textures texture loaders. Some of you brought to my attention that Lesson 27 doesn't display any shadows. Turned to be the stencil buffer had to be manually enabled on the Radeons R2xx line of cards (8500,9000,9100,9200). Bug that is fixed now. Also in Lesson 22 wouldn't run on linux because of the lower/upper case issue that the textures names were coded like in the port. It is now Fixed. Lesson09Lesson12Lesson18Lesson22Lesson24Lesson27Lesson30Lesson34Lesson37Quake 3 Loader and AnimatorFinally I reworked my basic JoGL frame as well as my simple Texture loader which manages Bmp, GIF, JPG and PNG image formats. Check them out here: Texture LoaderJoGL basic frameI'd appreciate any feedback 
|
|
|
|
|
|
|
chiraz
Junior Newbie
Java games rock!
|
 |
«
Reply #5 - Posted
2003-09-29 21:55:15 » |
|
My jaw dropped open when I saw it! That's an awesome piece of work! I was going to look into terrain rendering next, but maybe already right now I'm gonna look into it a bit... -=-=- I've scrapped the port of the levelviewer, because I found something better: http://www11.brinkster.com/chapter23/It's way more OO based than mine was, plus that it runs properly. Given this as a starting point, I should be ok extending from that source. The source zip file contains the ported sources from GL4Java... You should be ok to run this against any quake map. Screenshots: http://www.openworkflow.org/newshot1.jpghttp://www.openworkflow.org/newshot2.jpghttp://www.openworkflow.org/jmundo.zipPVS needs some work especially in outdoor scenes. Mesh generation is still off by a bit but nothing that can't be fixed... Btw... This thread has three interesting things going... A character animator, a BSP viewer and a terrain renderer... I wonder if these three things can merge together in one impressive demo?  Cheers, Chiraz
|
|
|
|
|
AndersDahlberg
|
 |
«
Reply #6 - Posted
2003-09-29 23:21:51 » |
|
WAOW  Looking GREAT (heya, Markus and David - are you guys watching this?) 
|
|
|
|
|
|
|
Markus_Persson
|
 |
«
Reply #8 - Posted
2003-10-01 10:26:07 » |
|
Looking GREAT (heya, Markus and David - are you guys watching this?)  Yes. What are you insinuating?
|
|
|
|
AndersDahlberg
|
 |
«
Reply #9 - Posted
2003-10-01 10:38:40 » |
|
That you both should add fog (if you haven't added it recently?) and show us some new screenshots (not saying wurm doesn't look good already - just that it can get better) 
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Markus_Persson
|
 |
«
Reply #10 - Posted
2003-10-01 13:09:43 » |
|
Ouch, I just noticed I forgot to add a smilie. Hehe, that sure changed the tone of that post.  I think in order to combine distance fog with height fog (mist?), I'd have to write a vertex shader. And I'd rather not read THAT specification quite yet. Hehe.  But it does look good. =D
|
|
|
|
kevglass
|
 |
«
Reply #11 - Posted
2003-10-01 14:01:36 » |
|
cool , and of course runs great on my linux box ... http://www.gnox.net/images/jogl_linux.jpg
Not had a chance to run it, but looks great in the screenshot!! Although, is there something odd going on with the normals defined for the surfaces? Seem to be dark bits here and there.. or are they cloud shadows? Kev
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #12 - Posted
2003-10-01 21:57:10 » |
|
Nehe lessons 1-20, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 42, 45 SourceBinaries
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #13 - Posted
2003-10-01 23:08:21 » |
|
Nehe lessons 1-20, 22, 23, 24, 26, 27, 29, 30, 33, 34, 36, 37, 39, 42, 45 SourceBinariesDude try calling a function that checks the keyboard input from within the display method; It'll make the controls much, much smoother. Example: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| void ProcessKeyboard(){
if(g_Camera.keys[KeyEvent.VK_SPACE]){ terrain.g_DetailScale = (terrain.g_DetailScale * 2) % 128; if(terrain.g_DetailScale == 0) terrain.g_DetailScale = 1; g_Camera.keys[KeyEvent.VK_SPACE] = false; } if(g_Camera.keys[KeyEvent.VK_ADD]){ terrain.g_FogDepth += 1; if(terrain.g_FogDepth > 200) terrain.g_FogDepth = 200; g_Camera.keys[KeyEvent.VK_ADD] = false; }
if(g_Camera.keys[KeyEvent.VK_SUBTRACT]){ terrain.g_FogDepth -= 1; if(terrain.g_FogDepth < 0) terrain.g_FogDepth = 0; g_Camera.keys[KeyEvent.VK_SUBTRACT] = false; } } |

|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #14 - Posted
2003-10-02 04:11:21 » |
|
Lesson44: Lens Flare TutorialWhen I sat down and started porting this demo, it was around 7:30PM EST, now when I take a look at my clock it says 12:10 AM.... Damn someone throw me a life  Anyways my unique comment regarding this port is the fact that it runs slightly faster than the equivalent demo in C++. Java 1 C++ 0 
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #15 - Posted
2003-10-02 08:30:35 » |
|
try calling a function that checks the keyboard input from within the display method I realize it's done like this in the C demos, but I don't really see the benefit of sticking with this for the Java version. Any other opinions on this?
|
|
|
|
|
quintesse
Junior Member  
Java games rock!
|
 |
«
Reply #16 - Posted
2003-10-03 08:18:37 » |
|
@pepijnve: For sake of clarity I'd prefer sticking to the Java method. We could always add comments or an extra tutorial if the difference is really big.
@Java Cool Dude: your Lesson27 now at least shows shadows (compared to the one from pepijnve's bag-of-ports) but it still doesn't work right: the shadows show up on the wong side of the ball in the middle! (they seem to wrap around the ball)
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #17 - Posted
2003-10-03 15:07:33 » |
|
@Java Cool Dude: your Lesson27 now at least shows shadows (compared to the one from pepijnve's bag-of-ports) but it still doesn't work right: the shadows show up on the wong side of the ball in the middle! (they seem to wrap around the ball)
 As you can see, the program is running fine the way it is, actually it worked fine ever since day 1, I don't know what's going on on your side. Maybe if you list your system specs we can try and help you out? @Pepi: Check the new version of Lesson 34 that I put up; zooming in and out is now much much smoother than it ever was .
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #18 - Posted
2003-10-03 15:22:16 » |
|
Now I got it... My code now repeats using the keyboard repeat rate, which of course isn't very smooth. By setting flags on and off you get a much smoother effect. I should have thought of this  Using the keyboard repeat is never a good idea... I'll fix this in my code asap
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #19 - Posted
2003-10-03 15:34:02 » |
|
Now I got it... My code now repeats using the keyboard repeat rate, which of course isn't very smooth. By setting flags on and off you get a much smoother effect. I should have thought of this  Using the keyboard repeat is never a good idea... I'll fix this in my code asap Cheers mate 
|
|
|
|
|
bakchuda
JGO Visitor
Java games rock!
|
 |
«
Reply #20 - Posted
2003-10-03 18:49:40 » |
|
I've been a read-only user of these forums for a while now, but since I've seen more and more of projects related to making a Quake3 BSP viewer/engine, i thought i'd post the progress of my own venture into this area. I am working with the arkanae team ( http://arkanae.org/ on the 3D engine. Here is a sample of what I have so far of the renderer. http://arkanae.org/~bakchuda/app/It's a web start app, and I would encourage anybody who tries it out to click on the button for the "Dungeon Test" map, since it is a simple show of the features I have finished of this BSP viewer. Here is a summary of what I have working so far: Meshes Textures Lightmaps Potential Visibilty Sets Partial shader support (textures, animated textures, alpha functions, color shifting) Curved meshes embedded models and maybe some other things i've left out. Also working on getting my MD3 object viewer up as a web start app, and hopefully combining the two at some point. Any feedback would be most appreciated, either via email or the forum. And should anybody be intersted in the arkanae project, the java.net project is also available: http://arkanae.dev.java.net(sorry about the gratuitous plugs  Andy Lubbers "Some mornings, it just doesn't pay to eat through the leather straps" -- Emo Phillips
|
|
|
|
|
aNt
|
 |
«
Reply #21 - Posted
2003-10-09 11:22:10 » |
|
loads nothing happens. just a white frame..
|
|
|
|
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #24 - Posted
2003-10-12 22:36:58 » |
|
Most impressive port so far, you now set the standard high enough to make my new port look like ****  Good job bud 
|
|
|
|
|
Daath
Junior Member  
Java games rock!
|
 |
«
Reply #25 - Posted
2003-10-12 23:03:23 » |
|
after seeing this demo I felt like typing rm -rf /* and getting into sport-fishing ..... 
|
|
|
|
|
pepijnve
Junior Member  
Java games rock!
|
 |
«
Reply #26 - Posted
2003-10-12 23:28:42 » |
|
I thought it was pretty cool too. Wish I could come up with this stuff myself  . If you take a look at the code, it's pretty amazing how this is all programmed. Every scene is one big method with a float variable 'timer' running the entire thing. I personally had expected to find some scripts or something...
|
|
|
|
|
Java Cool Dude
|
 |
«
Reply #27 - Posted
2003-10-14 07:13:47 » |
|
Pure shadow volumes crazinessSeriously though, I spent over 15 hours in between yesterday and tonight doing that port  PS; Make sure you take a look at the readme file to know the key mapping 
|
|
|
|
|
tsjung75
Junior Newbie
Java games rock!
|
 |
«
Reply #28 - Posted
2003-10-27 09:35:16 » |
|
I downloaded Nehe tutorial demos and tested those. But it didn't work. (I couldn't see no window on windows mode and could see just a white screen on full screen mode) On windows mode, I've encountered the following message. ; 2003-10-28 20:23:18.941 java[478] invalid drawable
What's wrong with me? I tested these on Mac OS X 10.3 with September 5th build JOGL. Please give me a advice.
|
|
|
|
|
|
|
|