Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11855 Posts in 1569 Topics- by 3054 Members - Latest Member: Ljustin770

11. February 2012, 11:15:24 AM
Xith3D CommunityProjectsYour Projects (Moderator: 'n ddrylliog)Xith3D Applet
Pages: 1 2 [3]
Print
Author Topic: Xith3D Applet  (Read 11924 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #30 on: 15. September 2007, 03:16:44 PM »

You have to do the following to get jar texture loading loading to work (before requesting any texture):

Code:
ResourceLoactor resLoc = ResourceLocator.create( "textures/" );
resLoc.createAndAddTSL();
Then your code will work.

This would be even better:
Your resource folder structure (no matter if in a jar or not) should look like this:
resources/textures/
resources/models/
resources/etc/
resources/blah/

Then do the following:
Code:
ResourceLoactor resLoc = ResourceLocator.create( "resources/" );
resLoc.createAndAddTSL( "textures" );

...

Model model = new OBJLoader().load( resLoc.getResource( "models/mymodel.obj" );

Marvin
Logged
'n ddrylliog
Moderator
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #31 on: 16. September 2007, 03:07:20 PM »

>> I still wanna write something on wiki about this.

Feel free..

BTW the Xith3D applet on your page keeps "Loading..." forever on my computer.. Sad
Logged
kukanani
Fierce Warrior
****
Offline Offline

Posts: 504


My game is coming along fairly smoothly...


View Profile WWW
« Reply #32 on: 16. September 2007, 03:52:29 PM »

BTW the Xith3D applet on your page keeps "Loading..." forever on my computer.. Sad

Me too...  Huh
Logged

xith.setCoolnessLevel(10);
jMe.setCoolnessLevel(0);
xith.rock();
tinsukE
Just dropped in

Offline Offline

Posts: 14


View Profile
« Reply #33 on: 16. September 2007, 06:14:07 PM »

Well well well... it seems that the web server is REALLY slow.
but i waited and it 'tried to run', i checked the java console and got [a lot of...] exceptions.

thats pretty weird because I tested the web page accessing the apache server from local network (wich should provide the same results as from internet) and It worked. But.. from my home (after SO MUCH download time) it didnt run.

some of the exceptions were caused by denied file access (the texture, i guess), but by monday I'll fix it like marvin said and retest.

and, before writing ANYthing on the wiki, I'll try to have a really good working sample, with input handling and something more. any [really] mini game idea [i'm not an artist...]?
« Last Edit: 16. September 2007, 06:17:41 PM by tinsukE » Logged
tinsukE
Just dropped in

Offline Offline

Posts: 14


View Profile
« Reply #34 on: 17. September 2007, 03:56:42 PM »

Ok... the following code didn't work:
Code:
ResourceLocator resLoc = ResourceLocator.create( "textures/" );
resLoc.createAndAddTSL();

Does the ResourceLocator class exists? My eclipse couldn't resolve the import (I've just updated my version from svn....) and it isn't even at the website's javadoc (my firefox search couldn't find it).

Anyway... here, from the local network the applet is running! Although w/o the textures. Weird, isn't it?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #35 on: 17. September 2007, 07:35:43 PM »

I guess, you didn't checkout/include the xith-tk. ResourceLocator comes from xith-tk
http://xith.org/javadoc/toolkit/org/xith3d/utility/resources/ResourceLoader.html

Marvin
Logged
tinsukE
Just dropped in

Offline Offline

Posts: 14


View Profile
« Reply #36 on: 21. September 2007, 03:36:12 PM »

Sry guys. Out of time to play with Xith.

Yes.. I forgot about tk, the code works [at least when accessing the http from local network, gotta try from home]. http://flockin.servegame.org

I'll try to handle mouse/keyboard input by the weekend, so I'll be able to write a simple game.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #37 on: 21. September 2007, 03:58:51 PM »

I'll try to handle mouse/keyboard input by the weekend, so I'll be able to write a simple game.

Please have a look at org.xith3d.test.input.FirstPersonInputHanderTest. It demonstrates the FirstPersonInputHandler, which you might want to use for your game's input.

Marvin
Logged
tinsukE
Just dropped in

Offline Offline

Posts: 14


View Profile
« Reply #38 on: 17. March 2008, 01:48:15 AM »

Right back from the ashes!!!  Grin

Erhm... hello guys, I've finished my graduation, got a job and had some spare time so I could work on the "Xith3D Applet" project, hehe.

Actually, I had some troubles setting up xith3d on my notebook, it has a Intel 945 Express onboard video card, and I had to set the Model Loader's Use Display List flag to false to visualize the model rendered, when it was true, I couldn't see nothing.

I've coded some sort of adaptation of the MD2 Loader test to my old Xith3DApplet class. The HTML is just the same, and... guess what? It works! Check it out:
http://www.dc.uel.br/~asuzuki

The applet runs pretty much faster on IE (read: smoothly) than on Firefox, can anyone guess why?

I will work a little bit more on the code and present it to you guys.

I'm having some headache trying to figure out how to handle input. Like, does HIAL works on an Applet? If not, what will I have to code to have some seamless integration with Xith's Input classes (key constants, i.e.)?

Thank U!
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4337


May the 4th, be with you...


View Profile
« Reply #39 on: 17. March 2008, 02:07:25 PM »

Actually, I had some troubles setting up xith3d on my notebook, it has a Intel 945 Express onboard video card, and I had to set the Model Loader's Use Display List flag to false to visualize the model rendered, when it was true, I couldn't see nothing.

Notebook graphics cards often cause problems with e.g. partial OpenGL support. Sometimes it helps to install a driver, that has been enriched with full support by a third party vendor.

Could you please read this thread and reply to it (providing the two outputs)? Would be interesting, if your card isn't detected to use the workaround.

Instead of telling all the loaders to not use DisplayLists and where ever they are used by default (they are still the fastest possible way to render things) you could also globally disable them. This should be much simpler. Just add this line somewhere after the canvas creation and before render-start:
Code:
canvas.setRenderOption( Option.USE_DISPLAY_LISTS, false );

Marvin
Logged
tinsukE
Just dropped in

Offline Offline

Posts: 14


View Profile
« Reply #40 on: 17. March 2008, 02:55:30 PM »

I'm at office right now and (it may sounds absurd, but...) I left my note at home. Tonight I will code some more and answer your thread. Thanks!
Logged
Pages: 1 2 [3]
Print
Jump to:  

Theme orange-lt created by panic