Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - EgonOlsen

#12076
Bugs / OS X render problems
May 17, 2004, 04:43:03 PM
I've uploaded a fixed version here: *Link removed*
It's only the API-jar, not a complete distribution. Please compile the examples from the regular distribution with this jar and tell me, if the textures are looking fine now.

Edit: The fix is now included in the release version of jPCT
#12077
Support / Ray/polygon collision
May 16, 2004, 05:58:43 PM
Quote from: "Musurca"There are still some problems when projectiles are fired at an object from close range, but I suspect the problem is that I'm spawning the projectiles inside of said object. A collision won't be registered if the ray starts inside of an object's bounding-box, right?
No, it's not a problem if it starts inside a bounding box. If it were, no projectile could collide with a large landscape if fired on the landscape's surface. The "problem" (actually it's a feature... :wink: ) is, that polygons are backface culled in respect to the position/direction of the projectile before they are checked for collision. And if you fire your shot "inside" an object, almost all polygons of your object will be culled and therefor, no collision is detected. If you really want to cover this case, i suggest to do a simple distance check between the objects or "abuse" rayIntersectsAABB(...) in Object3D somehow...
#12078
Bugs / OS X render problems
May 15, 2004, 12:49:03 PM
The code of the OpenGL renderer includes a comment: "Will this work on Mac? (byte order)"...well, obviously it doesn't... :wink: Should be an easy fix in this case, albeit i'm not sure that it's the only place where little endian vs. big endian matters.
Anyway, i'll upload a version for you to test on monday.
About the input problem: I don't know. Seems to be a LWJGL problem then. You mean that you can't move around in the fps example, i assume!?
#12079
Support / Ray/polygon collision
May 14, 2004, 04:26:58 PM
Does it work now?
#12080
Support / Using mouse in jPCT applet version
May 14, 2004, 04:07:08 PM
What is mouseClick()? I suggest to overwrite

protected void processMouseEvent(MouseEvent e)

in the applet with something like:


protected void processMouseEvent(MouseEvent e) {
  super.processMouseEvent(e);
  if (e.getID()==MouseEvent.MOUSE_CLICKED) {
     wire=!wire;
  }
}


That should work. You shouldn't abuse processKey() for mouse events, because it was meant to handle events from the keyboard, not from the mouse.
#12081
Support / Selectable objects
May 12, 2004, 05:20:29 PM
Yes, you have to get x and y of your mouse. In an applet, overwriting processMouseMotionEvent(MouseEvent e) or processMouseEvent(MouseEvent e) from Component should work (depends if you want to get an Event in case of a click or everytime the mouse moves...maybe both...). You can then query the MouseEvent for x and y.

The picking already returns the object's ID. You can obtain it simply by calling Interact2D.getObjectID(res). You don't have to ask the world for the object with ID x and ask the returned object for its ID afterwards. Both IDs are the same in this case.

Hope this helps.
#12082
Support / MD2 file
May 12, 2004, 05:04:06 PM
Should be quite easy in this case. You load and place the object like every other and animate it. Basically like this:

Object3D objAnim=Loader.loadMD2("md2/tris.md2", 1f);
TextureManager.getInstance().addTexture("myTexture", new Texture("md2/texture.jpg"));
objAnim.setTexture("myTexture");
objAnim.build();
theWorld.addObject(objAnim);
.
.
.
objAnim.animate(index, sequenceNumber);


Where index is a value between 0 and 1 and sequenceNumber the number of the animation sequence. Have a look at the Javadocs for more details about this.

Hope this helps.
#12083
Support / MD2 file
May 11, 2004, 11:43:41 PM
Code/docs for using jPCT's MD2-support or for writing your own loader in whatever language?
#12084
Support / Switching renderer in an applet context
May 11, 2004, 11:40:55 PM
Well, it's of course impossible to render directly into the applet, but i thought that it may be possible to open the LWJGL-window from within the applet. Anyway, a system that could probably do that can do webstart as well... :wink:
#12085
Support / Switching renderer in an applet context
May 10, 2004, 07:14:14 PM
No, hardware and software renderer can both do the same things. Software is just slower and doesn't look as good as hardware. But it will run everywhere, where Java1.1 is installed (including IE or NS4.7).
If you are using applets, maybe the old applet example is of interest for you. I've removed it from the distribution because it was outdated and ugly, but it's still available in this package (it's called bounce): http://www.jpct.net/download/jpctapi_096.zip
It should include some keyboard related stuff for applets. Please use just the example from this package, not the whole api.
#12086
Support / Switching renderer in an applet context
May 10, 2004, 06:25:54 PM
Webstart is SUN's "replacement" for applets (since Java 1.2.2 or so), i.e. a way to distribute and launch applications via a network. I made some small webstart demos using jPCT. They can be found here (you need at least Java 1.3 to run them):

http://www.jpct.net/forum/viewtopic.php?t=134

All you do is to write a small XML-file that tells Java webstart what to download and what to start. I can give you a sample XML if you are interested.
#12087
Support / Switching renderer in an applet context
May 10, 2004, 05:06:15 PM
Short answer: I don't know. I never tried it. Even if it is possible somehow to make the applet access the LJWGL-DLL, this would limit your applet to Windows and you would have to sign it.
I suggest to use Webstart instead. It's easy to work with and you can make sure that every OS gets the correct native libs.
#12088
Support / Ray/polygon collision
May 09, 2004, 01:04:10 PM
I recently discovered two bugs in 1.00. On in the CollisionListener and one in the ray-polygon-collision itself. I'm not sure if they may cause the behaviour you describe, but it could be worth a try to use this version:

*Link removed*

It's a pre-1.01 with both bugs fixed. If it's still not working, try to adjust collideOffset in Config. Personally, i'm using the ray-polygon detection for exactly the same thing ATM (have a look at the "new example" thread in the news-section) and it works fine.

Edit: Docs for this version can be found here: *Link removed*
#12089
News / Working on new example
May 04, 2004, 11:47:17 PM
Still working on it...the "car" can now fire bullets which are leaving decals on the terrain's surface.



Edit: New terrain texture
#12090
Projects / Game I'm soon to make
May 04, 2004, 07:40:15 PM
Sounds very interesting. Is this somehow related to the RPG that can already be found on gamelizard.com? If i just had the time to make something like this myself. Reminds me of the stuff i did on the Amiga a decade ago. I would really like to revive this game (http://amiga.emucamp.com/quelle.htm) using jPCT but i'm busy maintaining the engine itself. :(