Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Little LWJGL applet demo  (Read 10529 times)
0 Members and 1 Guest are viewing this topic.
Offline indexunknown

Junior Devvie





« Posted 2009-11-09 22:49:18 »

Hi, i've been trying to learn a bit opengl and i've put together a basic demo that uses lights and textured objects with materials and specular. It hasn't got many fancy techniques, only display lists for the objects. I got tackled down with trying to port different shadow mapping code from c++ cause the matrix calculations get me confused. I hope someone will find it interesting to test.

W,A,S,D,mouse - move
Lights can be turned on/off with keys 1 - 4 :
http://www.hot.ee/testgame/appletloader.html

Offline CommanderKeith
« Reply #1 - Posted 2009-11-12 17:20:26 »

Cool demo. I just started learning openGL too. I can appreciate how hard it must have been to make! Nice work.

I'm more interested in openGL for fast 2d stuff, and I've been browsing the 2 libraries LWJGL and JOGL. LWJGL seems easier and there's more help out there in terms of tutorials and actually getting started. The JOGL API must have changed a lot over from version to version since most of the examples and tutorials on the net don't work. Also it's hard to figure out how to actually build a JOGL app. I don't understand anything about glugen etc. LWJGL was way easier in that regard. But LWJGL doesn't have anything from 'GLU' which provides polygon tesselation and resizing of windows which is annoying.

What are your ambitions for learning openGL?

Keith

Offline princec

« JGO Spiffy Duke »


Medals: 434
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2009-11-12 17:38:48 »

LWJGL has GLU.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CommanderKeith
« Reply #3 - Posted 2009-11-12 18:10:34 »

Hmm ok, shows how much I know.

By the way it's a nice library, very neat and simple.

I found blog and forum posts saying that in LWJGL you can't drag the edge of a window to expand it and it doesn't do polygon tesselation so you can't draw concave polygons without tesselating it yourself. Maybe that's not the case in the latest version, I'm still learning.

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 81
Projects: 15


★★★★★


« Reply #4 - Posted 2009-11-12 20:03:51 »

Hmm ok, shows how much I know.

By the way it's a nice library, very neat and simple.

I found blog and forum posts saying that in LWJGL you can't drag the edge of a window to expand it and it doesn't do polygon tesselation so you can't draw concave polygons without tesselating it yourself. Maybe that's not the case in the latest version, I'm still learning.

wrong again Smiley

1) lwjgl does have polygon tesselation, see lwjgl_util package.
2) although the default lwjgl Dispaly doesn't allow resizing, resizable lwjgl window is pretty easy to achieve using a JFrame with Display.setParent() function.
Offline CommanderKeith
« Reply #5 - Posted 2009-11-13 04:13:07 »

Cool, thanks for the tips. I'll try and figure it out.  Smiley

Offline indexunknown

Junior Devvie





« Reply #6 - Posted 2009-11-13 12:36:55 »

Thanks Keith i've always wanted to create my own little 3d game. I can send you the source of this demo and tell how to set it up in eclipse to get an applet together if you like.
Offline CommanderKeith
« Reply #7 - Posted 2009-11-13 18:10:26 »

Hey thanks, that would be sensational. my email's keithphw at hotmail.com I'm very interested to see how you did your demo.


Offline indexunknown

Junior Devvie





« Reply #8 - Posted 2009-11-30 21:02:02 »

Bump i've changed my demo to a more game like demo, it's looks like a fake minecraft and the physics are kind of unstable cause i haven't been able to implement simple AA collision detection properly but i think it's way cooler now.
Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #9 - Posted 2009-11-30 21:30:10 »

Pretty neat!  Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 81
Projects: 15


★★★★★


« Reply #10 - Posted 2009-12-01 16:19:33 »

thats is pretty cool, works and runs really well.

however do get a crash/error dialog on exit, but it appears and disappears so fast that its hard to tell what it is.
Offline indexunknown

Junior Devvie





« Reply #11 - Posted 2009-12-01 20:06:32 »

even more new stuff, didn't actually plan to make it similar to minecraft but i added ability to build, destroy blocks it's quite fun to make something like that
the building is kind of awkard cause im still bad at maths but it works
opengl house lol
Offline indexunknown

Junior Devvie





« Reply #12 - Posted 2009-12-05 11:46:15 »

i got normal mapping shader working from a tutorial, don't know if i should put it into demo cause it requires gl2.0 and lots of low end integrated chips don't support it.



EDIT: actually its easy to determine the capabilities with (GL11.glGetString(GL11.GL_VERSION).split("\\."))[0] and if its 2, then shaders will probably work.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #13 - Posted 2009-12-05 14:05:02 »

EDIT: actually its easy to determine the capabilities with (GL11.glGetString(GL11.GL_VERSION).split("\\."))[0] and if its 2, then shaders will probably work.

Or use GLContext.getCapabilities() to get a ContextCapabilities object, then check the ContextCapabilities.OpenGL20 flag. This has the advantage of not breaking on the more non-standard version strings that your simple split() probably won't handle well.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #14 - Posted 2009-12-05 15:27:34 »

Quote
cause im still bad at maths but it works
You're not alone.  Wink Many many years have past since I made math and I forgot a lot of things in this domain, but I manage to do with it when there's a need. Thanks to google, wikipedia, etc. I know this is off topic but just wanted to share it.

Offline CommanderKeith
« Reply #15 - Posted 2009-12-05 18:15:35 »

Pretty cool. I like the openGL hut Smiley

I'm still plugging away learning LWJGL too. I keep on getting caught up on snags. Like I just spent 5hrs trying to draw a texture in orthographic mode. Damn textures, Grr! For some reason when the image is converted to a texture its height and width change...  Huh At least I know now, lol.

Offline indexunknown

Junior Devvie





« Reply #16 - Posted 2009-12-05 21:57:25 »

Added the normalmapping shader into the demo, with key "t" you can change between shader and non-shader mode.
Offline indexunknown

Junior Devvie





« Reply #17 - Posted 2009-12-11 13:13:46 »

Intel graphics is just amazing, brand new laptop with intel x3100 runs at 0.9 fps and my over 5 years old pc at 50 fps.
Offline xinaesthetic

Senior Devvie


Medals: 1



« Reply #18 - Posted 2009-12-14 14:03:48 »

It pauses intermittently on my system; Chrome / Vista / 8600m GT / T7250 CPU...
Offline indexunknown

Junior Devvie





« Reply #19 - Posted 2009-12-14 16:28:10 »

I havent tried under Chrome, maybe it's java plugin acts differently.
Offline xinaesthetic

Senior Devvie


Medals: 1



« Reply #20 - Posted 2009-12-14 16:36:59 »

I just tried in FF and it seems ok.

Chrome is a great browser, generally, btw...
Offline indexunknown

Junior Devvie





« Reply #21 - Posted 2009-12-23 13:22:59 »

That ninja should be careful Leon has a gun

(this is not in the demo, don't want to upload these copyrighted thingies, they don't do anything but pose anyway)
Offline CommanderKeith
« Reply #22 - Posted 2009-12-23 15:01:57 »

Looking good, how did you load the models?

Offline indexunknown

Junior Devvie





« Reply #23 - Posted 2009-12-23 15:11:29 »

I used the mri.v3ds loader that can parse .3ds files http://www.multi.fi/~mbc/v3ds/Decode3dsApplet.html, although it has a big mistake in it currently and i had to write some reverse engineering code for the decoded text to get textures working properly because it currently acts like material name = texture file name but that's not true, materials can have texture's attached to them and the texture file name is in the decoded text under material property  MAT_TEXMAP but it's in hexademical.
Offline CommanderKeith
« Reply #24 - Posted 2009-12-24 03:02:36 »

Nice job, that's pretty annoying when it just doesn't work. I usually give up.

Did you consider ripping out the model loading code from jmonkeyengine or ardor3d? http://www.ardor3d.com

Offline indexunknown

Junior Devvie





« Reply #25 - Posted 2009-12-24 12:45:43 »

nop.
Wanted to use a separate loading library.
Pages: [1]
  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.

rwatson462 (33 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (51 views)
2014-12-09 22:41:13

BurntPizza (84 views)
2014-12-08 04:46:31

JscottyBieshaar (45 views)
2014-12-05 12:39:02

SHC (59 views)
2014-12-03 16:27:13

CopyableCougar4 (59 views)
2014-11-29 21:32:03

toopeicgaming1999 (123 views)
2014-11-26 15:22:04

toopeicgaming1999 (114 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!