Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (483)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  The JWS thread *LWJGL demos only*  (Read 8747 times)
0 Members and 1 Guest are viewing this topic.
Offline Java Cool Dude

Senior Member




Java forever


« Posted 2004-03-09 18:45:58 »

LWJGL Work Frame:



Keys: Escape to exit
         H to display statistics
Source
Zip File Source

Author's notes:
This Frame works makes developping demos and maybe games a hell lot easier since the programmer doesn't have to worry about implementing the following things:
TextureGeneration.
Shaders handling including the new shading language OGLSL.
TextureLoading.
Milkshape3D and 3D Studio max files (with an option to generate Tangents and binormals vectors Wink ).
Cursor rendering.
Text rendering with different fonts.
First person persepective camera.
Frustum class.
Cos and Sin look-up tables.
Quaternion class.

and so on...
It is largely inspired by Xith3D, and yet it is much more flexible (and less features complete).

Enjoy Smiley

Cubic Environment bump mapping:



Mouse: left drag for rotation, right drag for translation and middle button for zooming
Keys: Escape to exit, H to display statistics, S to switch  OGLSL/Fragment-Vertex programs
Source
Zip File Source

Author's notes:
Ok I updated this demo to use my latest framework and therefore I'm putting it up here again.
It now runs on top of my mini-scenegraph which is largely inspired by Xith3D, and although it's not as complete as the latter, it is much much more flexible and Faster.
I also included the license terms on top of every class that I borrowed/modified from Xith3D.
Since OGLSL (Opengl Slang) shading language is now enabled on both Nvidia and ATi's high end cards, I included an option to switch over it instead of the Vertex/Fragment Program combo.
However, OGLSL is noticeably slower than regular shader programs which is understandable since assembly is always faster than high-end language.
I for one prefer to write my shaders using the fragment/vertex program extension since they yield the fastest frame rate, and aren't that hard to work with.
Keep in mind that fragment/vertex assembly-like syntax is a lot less complicated that x86 instructions.
This demo also introduces my MilkShape3D model loader even though I think it sucks the big sweaty-goat's balls. Part of my negative impression regarding that file format is the fact that it writes the normal components into an independent array from the vertices, meaning that for a quad composed by 2 triangles and hence 4 vertices, we actually have a normal array of size 6!!!!
Now if you still don't see how that could cause any problem besides the few more bytes required for the extra normals' components, remember that all the drawing functions in opengl (except the immediate which is not even an option considering how slow it is) take only one array of indices. Therefore we need to duplicate all the vertices till they match the size of our normal array ;Quite wasteful indeed, but mandatory.
The only reason that I use MS3D loader is because generating "good" noramls in 3DS is a true pain.
I haven't done any animation yet with this loader, maybe MojoMonkey can throw me a hint on how I do them?

PROs: Awesome reflection effects
Cons: Requires a Radeon 9600+ or GeForce Fx 5200+.

Dynamic Cube Mapping:



Mouse: Move to look around the scene.
Keys: A,Q,W,S,E,D, up, down, left and right to move around. H to display or hide the info.

Source
Zip File Source

Ok I'm back as promised to comment on the dynamic cube mapping demo Grin
/me takes a long and deep breath
I spent a lot of time coding this application since I had to first learn and understand VBOs (Vertex Buffer Object) and then try to use them with LWJGL.
Few days ago I thought my demo was ready to be published, but then at the very last moment I decided it wasn't since I wasn't entirely satisfied with the performance on my Radeon 9700Pro backed by a 2.1 Ghz Athlon Xp CPU.
Now I understand that rendering the scene 7 times before displaying onto the screen takes a hell lot of computation and time, still the 140 FPS wasn't something to be too proud of :\
So like I said I decided to give VBOs a shot knowing that they mostly store the data on the Graphic Card memory and thus would reduce if not eliminate the time necessary for it to transit from the system's memory to the graphic accelerator through the AGP bus.
At first, I generated 4 VBOs per shape; 1 for the vertices, 1 for the normals, 1 for the indices and finally 1 for the texture coordinates.
I noticed some performance boost over the conventional Vertex Arrays, and again I was attempted at uploading my work and move on to something else, yet I decided to hold on and attempt tweaking this demo even further.
I read on the Opengl forums that one can generate a unique VBO and use strides and offsets to differentiate texture coordinates, normals, vertices etc...;
Few hours later, I'm down to 1 VBO, but I haven't noticed any performance boost over the version that used 4, so thinking there is nothing I can do about it anymore, I went ahead and posted it right here.
This morning when I was reading through my code again, an idea hit me; the indices buffer that I'm sending to the card every single frame is indeed slowing things down, so why not cache it too on the graphic card's memory?
I proceeded to implement that idea and I was pleased by the 15% boost in the frame rate.
After that, I cleaned my code a bit, created a function to safely remove any OpenGL resource created and voila, I uploaded the improved demo to the server Smiley.
Before I leave, just few things about the 3Ds max loader; there is a lot of features missing, but I'll be working on implementing them in due time Smiley

Texture Fonts:



Keys: Escape to exit

Source
Zip File Source

Here's the font factory that generates the textures:
FontFactory.
Notice that some fonts are screwed up until you increase their sizes in the FontFactory class, for example Batang needs at least a size of 27 to look sharp.

Blinn Lighting:



Mouse: A,W,S,D up, down, left and right to move camera location, mouse to look around the seen.
Keys: Escape to exit, H to display statistics, P to enter camera tracking mode, + - decrease and increase the bumping, / * modify the light range
         
Source
Zip File Source

Lighting is computed via a vertex and pixel shader program and is using the Blinn Lighting illumination algorithm which is explained in this page.
Blinn lighting albeit less intensive than Phong Lighting is known to stress and push the most powerful machines to their limits.
Still a modern Graphic accelerator like the Radeon 9700 pro sitting on my machine can push about 250 FPS at 640*480.
Requires Vertex And Fragment shaders.

Parallax Mapping:



Mouse: A,W,S,D up, down, left and right to move camera location, mouse to look around the seen.
Keys: Escape to exit, H to display statistics, P to enter camera tracking mode, + - decrease and increase the bumping, / * modify the light range
         
Source
Zip File Source

As seen in Unreal 3 technological demo, this demo produces an effect similar to bump mapping and yet a hell lot better.
Requires Vertex And Fragment shaders.
Enjoy
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #1 - Posted 2004-03-09 19:07:04 »

nice work, runs perfecly!
damn shaders, why oh why would anybody invent a new language using assembler like syntax Huh - oh well, some master it... Roll Eyes
Thank god for GLSLang, though I have yet to try that out...

<edit>I really like the rugged bottom of the chalice!

Offline Java Cool Dude

Senior Member




Java forever


« Reply #2 - Posted 2004-03-09 22:33:32 »

Demo updated with the following things;
MouseRotations is now replaced with MouseInteraction with which you can translate, rotate and zoom at the same time.
Try holding your mouse's three buttons at once and move the cursor; Crazy things Grin
Btw whoever came up with Mouse.getDX() and Mouse.getDY() gets a two thumbs up from meh Smiley

Now lemmie put together my basic framework which I'm positive will help a lot of people get quicker into LWJGL
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Java Cool Dude

Senior Member




Java forever


« Reply #3 - Posted 2004-03-10 00:02:21 »

Check first post
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #4 - Posted 2004-03-10 03:44:03 »

I really like the bottom  Grin


Offline JasonB

Junior Member





« Reply #5 - Posted 2004-03-10 06:23:23 »

What ver. of LWJGL?  I get a big fat nothing with webstart (no matter what screen mode), and I can't compile the source.  Sad

Linux, by the way... in case you hadn't already guessed.
Offline karatemarkel

Junior Member





« Reply #6 - Posted 2004-03-10 11:34:19 »

Damn, I really need a new graphics card, pics look very nice Smiley

One question though, although I get a pretty dull model when I download the demo I still get the culling bug (as I did with your Buda demo), now if this bug isn't related to lwjgl how come I don't get the bug with your jogl Buda demo?

Oh, talking about graphics cards, what would you guys recommend I go for, ATI or Nvidia?

Thanks all, and Cheers JCD, I'm sure that work frame will be very handy Wink
Offline Java Cool Dude

Senior Member




Java forever


« Reply #7 - Posted 2004-03-10 14:06:15 »

I'll update the code hopefully tonight and see if I can fix the culling bug Smiley
Btw if you're to buy a graphic card in the few next weeks, go for at least a Radeon 9700 Pro;
Not only it performs like a champ, over 18 months after it was introduced to the market, but it will last you at least for another 2 years.
The must would be a Radeon 9800 XT, but gotta have the bucks for that.
But again I'm an ATi fan, and their shaders performance got a lot to do with my addiction to their products...
Offline tom
« Reply #8 - Posted 2004-03-10 14:22:50 »

Quote
Oh, talking about graphics cards, what would you guys recommend I go for, ATI or Nvidia


I've got the impression that Nvidia is better at opengl and ati is better at directx. I know people having problems running simple opengl aps on a Radeon 9600.

Take a look at toms hardware guide if your interested in benchmarks: http://www20.tomshardware.com/graphic/20031229/index.html

Offline princec

JGO Kernel


Medals: 362
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #9 - Posted 2004-03-10 14:25:33 »

Always buy Nvidia.
<edit>Benchmarks schmenchmarks. Card's no good if the bloody drivers don't work. So buy Nvidia, because they know how to write drivers.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #10 - Posted 2004-03-10 15:16:34 »

Quote
So buy Nvidia, because they know how to write drivers

Bah! Some of us actually like that the games look top notch! nVidia keeps turning down image quality because their current generation graphics chips are inferior to ATI's. Oh, and ATI is much better at supporting the open source community with driver specs.
and the "The way it's meant to be played" shit I have to see each time I fire up a game, doesn't make me feel any better with nVidia!
So, to sum it up, best performance (speed, image quality) = ATI, *slightly* more stable drivers (for wide spread OS's) = nVidia.

Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #11 - Posted 2004-03-10 16:28:48 »

I'd agree with Matzon here. In my very limited experiences, the Geforce FX cards have been pretty subpar. The latest gen of Radeons have been vastly superior. Faster framerate and sharper images. The geforce seemed a bit blurrier for me. This very scientific test is from me plugging in a Radeon 9700 Pro into my computer after trying a Geforce FX 5800.

Don't send a man to do a monkey's work.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #12 - Posted 2004-03-10 16:58:34 »

Ok no more thread hijacking puh lease Roll Eyes
Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #13 - Posted 2004-03-10 17:10:06 »

Oh... very cool demo.  Grin

Don't send a man to do a monkey's work.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #14 - Posted 2004-03-11 12:45:36 »

Quote
What ver. of LWJGL?  I get a big fat nothing with webstart (no matter what screen mode)

Linux, by the way... in case you hadn't already guessed.


Ditto; although I only tried 640x480 non-fullscreen (the default, I think?)

PS: Thingie's Q3 loader map with an LWJGL version and a software renderer version worked fine with Webstart, so...

PPS: Quite a few people make naive mistakes with selecting / accepting screen resolutions etc. AFAICS, if user selects w x h @ f, then for windowed mode you should accept "anything >=w, >=h, at any frequency". For fullscreen mode, you should accept "w, h, at f if available, or the highest available if not".

Why? Well, I've noticed that the screen mode querying consistently believes that I'm running at 0Hz. This may be something to do with using an LCD (hence frequency is meaningless; perhaps it returns 0 to signify N/A?), or may be something to do with linux.

malloc will be first against the wall when the revolution comes...
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #15 - Posted 2004-03-11 12:54:47 »

Quote
However unless someone points out a free open source image loader to me


I haven't tried any of them, but here's a list of image codecs:

http://www.geocities.com/marcoschmidt.geo/java-image-coding.html

Offline karatemarkel

Junior Member





« Reply #16 - Posted 2004-03-11 17:30:59 »

I'll keep this quick, don't want to upset JCD  Grin

Cheers for the card recommendations guys, although now I'm probably more confused on the whole subject, I'll probably opt for Nvidia...or maybe ATI Cheesy

Btw, I'm loving lwjgl, it's a hoot.

Keep the demos coming JCD

Cheers all.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #17 - Posted 2004-03-17 20:24:30 »

New demo up and greetings from Montreal Grin
Offline Middy

Junior Member




Java games rock!


« Reply #18 - Posted 2004-03-18 07:41:05 »

very cool demo.... runs 100-200fps in 1024(windowed mode)

When I ride the fireball its 300-450FPS

But it f**ks up in fullscreen (screen out fo sync)... You cannot run it unless you have lwjgl installed...

When do I get my makeMyGameAsILike() extension?
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #19 - Posted 2004-03-18 12:43:23 »

An error occurred while launching/running the application.

Title: Phong Lighting & Particles
Vendor: Abdul Bezrati - Galactic Village
Category: Download Error

Unable to load resource: http://www.users.xith.org/JavaCoolDude/JWS/lib/lwjgl-macos.jar

Offline Java Cool Dude

Senior Member




Java forever


« Reply #20 - Posted 2004-03-18 16:02:16 »

Macs are not supported yet, ask Mazon or Princec to throw me the binaries and I'll add em instantely...
Middy, I'm surprised you got that high of an FPS, do you have any error message on the screen saying no shaders support?
Offline Middy

Junior Member




Java games rock!


« Reply #21 - Posted 2004-03-18 17:52:58 »

Yep I do...

When do I get my makeMyGameAsILike() extension?
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #22 - Posted 2004-03-31 04:08:07 »

All files are down Sad

(I'm really interested in the src of the 3ds loader Roll Eyes)

弾幕 ☆ @mahonnaiseblog
Offline cfmdobbie

Senior Member


Medals: 1


Who, me?


« Reply #23 - Posted 2004-03-31 09:44:04 »

Quote
All files are down Sad

(I'm really interested in the src of the 3ds loader Roll Eyes)


Xith3d.org seem to have occasional DNS problems.  The links are back now, but if you find them dead in the future just remove the "www." on the front of each URL and it usually works.

Hellomynameis Charlie Dobbie.
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #24 - Posted 2004-03-31 15:33:58 »

Quote
Xith3d.org seem to have occasional DNS problems.  The links are back now, but if you find them dead in the future just remove the "www." on the front of each URL and it usually works.


Well xith.org itself works, but users.xith.org doesn't Sad

Edit... after about 20 retries and 10 retries of resolving the host... it works (don't ask me why... I dont have a clue).

弾幕 ☆ @mahonnaiseblog
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #25 - Posted 2004-03-31 18:18:21 »

Hmm... sounds painfull :-/

Well, I guess that complete set would be helpfull... at least as a temporary solution.

Have you seen this decoder?
http://www.multi.fi/~mbc/v3ds/Decode3dsApplet.html

Maybe it would be a good idea to use that thing?

edit:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=share;action=display;num=1061796369

http://games.swizel-studios.com/libraries.html

Gonna try to do something with that.

弾幕 ☆ @mahonnaiseblog
Offline Java Cool Dude

Senior Member




Java forever


« Reply #26 - Posted 2004-04-14 04:50:21 »



Coming soon now Grin
PS: It's Dyanmic cube mapping babeh
Offline Java Cool Dude

Senior Member




Java forever


« Reply #27 - Posted 2004-04-18 05:57:02 »

It's up, check first post.
Offline elias

Senior Member





« Reply #28 - Posted 2004-04-18 06:02:51 »

Very nice demo, runs at 100 fps on a gffx. I'm running Linux, SUSE 9.

- elias

Offline karatemarkel

Junior Member





« Reply #29 - Posted 2004-04-18 09:20:43 »

I get a few errors with this, the draw order seems pretty screwed as you can see from the picture, haven't got a clue why though.

I had this problem with some of your earlier demo's (Buda), but there was no problem with the MagicRoom demo.  

Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (17 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (38 views)
2014-08-06 19:49:38
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!