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   
  Show Posts
Pages: [1]
1  Game Development / Game Mechanics / Re: MAZE3D+ODEJAVA problem on: 2004-10-07 06:25:26
Quote


Got a bug report regarding the crash?

For the ASE objects, I would suggest exporting them already scaled and transformed.  What are the ase objects for?  Remember, it's best to minimise the use of tri-mesh and were possible approximate with primitive geoms.  This gives faster and often more accurate results.

Will.



Bug report you mean the crash message?

1  
2  
3  
4  
5  
6  
Exception in thread "main" java.util.ConcurrentModificationException  at java.util.LinkedList$ListItr.checkForComodification(Unknown Source)
        at java.util.LinkedList$ListItr.next(Unknown Source)
        at org.odejava.Space.delete(Space.java:169)
        at org.xith3d.agentcities3d.OdeWorld.cleanup(Unknown Source)
        at org.xith3d.agentcities3d.Agentcities3d.cleanup(Unknown Source)
        at org.xith3d.agentcities3d.Agentcities3d.main(Unknown Source)


If you need a more complex bug report, tell me how to obtain it (maybe a background running tool?).


Regarding to ASE, i cant scale and transform the scene, because i dont have the original max scenes.Im using a furnitured room scene where avatar goes at door collisions.Maybe i can use the unscaled room far from normal scene sight, and scale the avatar so it makes the feeling the room has the right size.Or as you say, aproximate the physical world with basic shapes manually.
2  Game Development / Game Mechanics / Re: MAZE3D+ODEJAVA problem on: 2004-10-06 14:05:45
I think i had some problems with libraries (dont ask me how i fixed it  Tongue) but i finally got the right NativeAddr results, so i can search my geoms in the space.Anyway i have tested your new methods, and work well...but it crashes at the clean up of the space when the program exits.So im using the NativeAddr to do my collisions, and now they work fine.


Now im heading for a new challenge, the use of ASE imported objects.If i import the objects and add them to my Xith3D scene all works fine (because i can scale and transform them using transform groups).But if i follow the example of CarTerrain and use the GeomTrimesh to get the physic ode representation of the ASE scene, i dont get it scaled or transformed, cause ode takes as base the shape3D objects (that are not transformed).I have not seen any way to scale the Geoms using any method.Do you have any suggestion that does not involve much 3D geometry skills?

Thanks for your answers, have been very useful  Smiley
3  Game Development / Game Mechanics / Re: MAZE3D+ODEJAVA problem on: 2004-10-05 07:27:23
Well, i have been investigating a bit.The numbers that getGeomID1() and getGeomID2() return seem to correspond with the ones that you get from a Geom calling

geom.getId().getSwigCPtr()

I imagine that this way you get the real native address of the geom (as far as getNativeAddr() always returns 0 for all geoms).After parsing all the geoms of my space (printing its id and its name) i can see that all my objects are correctly in introduced in my space, even the avatar geom.The problem comes when a collision occurs, as the getGeomID1 and getGeomID2 return ids of geoms that are not in my space!!!
I cant figure why this happens  Huh
4  Game Development / Game Mechanics / Re: MAZE3D+ODEJAVA problem on: 2004-10-05 05:48:14
I have solved the 'problem' of the avatar entering through a wall before getting collided.It was because the avatar Body was very small, so when the collision was detected, the camera was almost inside the wall.When i made the Avatar body a bit bigger, the collisions with walls behave perfectly  Smiley

But i still have the problem to work out the iterateContacts method to program the collision behavior.If i use the getBodyID1/2 and getGeomID1/2, what method should i call in the Body or the Geoms to get the same type of identifier to compare? Something like:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
if ((contact.getBodyID1() == avatar.methodXXX()) || (contact.getBodyID2() == avatar.methodXXX())){

Iterator it = space.getGeoms().iterator();
while(it.hasNext()){
Geom g = (Geom)it.next();
if((g.methodXXX()==contact.getGeomID1)||(g.methodXXX()==contact.getGeomID2)){
       if(g.getName().equals("door")) this.teleport();
}}

}



In this example we could have different Geoms with the same name "door", and the teleport() method should decide where to move the avatar.

The important part is methodXXX() that returns me the identifier that matches with the getGeomID or getBodyID.I have tried with avatar.getGeom().getNativeAddr() but does not work.Which is this method??
5  Game Development / Game Mechanics / Re: MAZE3D+ODEJAVA problem on: 2004-10-04 06:43:35
Well, i guess the only reason for walls being trimeshes and no GeomBoxes was lazyness  Grin
This way I only had to create the trimesh from the shape, without caring about position, sizes,...

I have redone with GeomBoxes and works pretty decent, although if the GeomBoxes are too much slim and the avatar runs too much, it does not detect the collisions and lets it go through.Other weird thing is that when you colide with the box, sometimes you can see the 'inside' of the box, as if the physical barrier was inside the box, and not in the box sides.

The version Im currently using is odejava-2004-09-07_cvs.zip.The contact class has 4  methods like getGeomID1,getGeomID2,getBodyID1,getBodyID2.If i call this methods in the iterateContacs() method, i get a serie of numbers, but i still dont get what this numbers correspond to.I need to know what are this numbers i get, as i want to program some behaviour to the collisions.
For example, if i have 10 GeomBoxes with the name "door" and my avatar collides with one of this geomboxes, i want to teleport the avatar to another room.Which method in the body or the geoms returns back the same type of identifier that getGeomID1,... returns back?

Maybe my version is a bit updated and the nethods you added are useful for what im trying to do.As a start i'll search for that CVS, thanks Smiley
6  Game Development / Game Mechanics / MAZE3D+ODEJAVA problem on: 2004-10-01 09:48:48
Im doing an integration of maze3d with the odejava collision system and im getting problems detecting collisions.I have used the CarTerrain example as a base, and i have used the chassis as avatar without problems (the camera moves through the maze over a GeomBox body).Im adding the Wall3D shapes as GeomTriMeshes to the odeworld.
The problem comes when the box body has to collide with the walls, as i dont get any collisions, the box goes through the walls.In fact i only get collisions in some points of the wall (more or less in the center) but not in the whole wall.That does not make much sense, as with InitXithFromOdejava Xith displays the walls correctly as Ode knows them.
So, why does Ode draw well the walls but does not get the right collisions?

More info:
-The walls are simple Geoms while the avatar box is a Body
-I check with a println the collisions in the iterateContacts() method.
-When a collision happens (in detailed spots of the wall), the contact.getBodyID / contact.getGeomID does not seem to correspond to any body/geom NativeAdress.
-I dont know why, but all my objects/bodies seem to have the same NativeAdr...that may be the cause? how is the NativeAdr calculated?

Any clue?  
7  Java Game APIs & Engines / Xith3D Forums / Collision Errors on: 2004-09-10 08:42:45
Im getting this runtime error when colliding my avatar (maze3d style)  with a simple cube:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
Exception in thread "main" java.lang.Error: Invalid ray : (NaN, NaN, NaN)
        at com.xith3d.collider.RaySegment.<init>(RaySegment.java:74)
        at com.xith3d.collider.CollisionSystem.bounceCollision(CollisionSystem.j
ava:291)
        at com.xith3d.collider.CollisionSystem.processEllipsoidCollider(Collisio
nSystem.java:445)
        at com.xith3d.collider.CollisionSystem.processCollider(CollisionSystem.j
ava:501)
        at com.xith3d.collider.CollisionSystem.processCollider(CollisionSystem.j
ava:539)
        at com.xith3d.collider.CollisionSystem.processTime(CollisionSystem.java:
557)
        at com.xith3d.collider.CollisionSystem.newFrame(CollisionSystem.java:580
)
        at org.xith3d.agentcities3d.Agentcities3d.runMaze(Unknown Source)
        at org.xith3d.agentcities3d.Agentcities3d.init(Unknown Source)
        at org.xith3d.agentcities3d.Agentcities3d.main(Unknown Source)


I dont think that the error is in the definition of the collider node, i have done before with simple planes and dont had any problem:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
Shape3D s3 = new Shape3D();
        GeometryArray ga =(GeometryArray) TestUtils.createCubeViaTriangles(0f, 6f, 0f, 12f, false,true);
        TestUtils.reverseWinding(ga);
        s3.setGeometry(ga);
        ColliderGeometry cg = new ColliderGeometry();
        cg.setModel(s3);
        BiTreeCollider bic = new BiTreeCollider();
        bic.build(cg);
        ColliderNode cnode = new ColliderNode(s3,ColliderNode.CT_GEOMETRY,ColliderNode.CT_GEOMETRY,false,bic);
        cs.addCollider(cnode);
      scene.addChild(s3);



Anyone can bring some light to the problem? Thanks  :-/
8  Java Game APIs & Engines / Xith3D Forums / Re: Problems with Collisions on: 2004-08-24 06:22:56
Well...in fact your answer contains a possible solution --> use OdeJava!  Smiley
I would love to help in the development, but the fact is that im a total noob to this 3D world, so i need to understand a lot of things before thinking about improving them.
Thanks for your answer.
9  Java Game APIs & Engines / Xith3D Forums / Re: Problems with Collisions on: 2004-08-23 12:34:02
Nobody that has worked with collisions can bring some light to the problem? Nobody uses them?   :-/
10  Java Game APIs & Engines / Xith3D Forums / Problems with Collisions on: 2004-08-18 08:22:49
Im having problems using the collision system.Im doing some sort of mix between two examples....in first place i load a model with the ase loader (it does it right).Then i apply to the group of the loaded model, the collision node creation:

1  
2  
3  
4  
5  
6  
7  
ColliderGeometry cg = new ColliderGeometry();
                              cg.setModel(group);
                              BiTreeCollider bic = new BiTreeCollider();
                              bic.build(cg);
                              ColliderNode cn = new ColliderNode(group,ColliderNode.CT_GEOMETRY,ColliderNode.CT_GEOMETRY,false,bic);
                              cn.setTwoSided(true);
                              cn.setResponse(CollisionResponse.BOUNCE);


The model is a simple wide slim cylinder that looks like a platform.Im using a physical camera like the one in maze3d.So...what is the problem? lets see

Well, the collisions only seem to happen in one side of the cylinder (the down side base)...so if i let fall the camera with gravity from a high position, the camera goes through the cylinder and stops when reaches the base of the cylinder..I have tested with more complex models and it works worse (a world globe that had no collisions at all).
I dont understand whats going on, it seems that the setTwoSided() method doesnt work, as the collision system+loaded models.

Any suggestion?
Thanks  Huh
11  Java Game APIs & Engines / Xith3D Forums / Re: BSP loader? on: 2004-08-03 09:58:22
Thanks i found it, but it does not work as i expected Embarrassed

I want to be able to create dinamic maps using pre-made "pieces" of map that i can assemble in execution time...but i cant make these pieces with separate bsp maps, because they cant be 'open' (with holes/exits to the void) so there wouldnt be joining points between pieces.Its also hard to operate with bsp loaded maps, because the nodes have no names (ASE files have nodes named).
Its a pitty, because quake map editors are quite easier to use than 3DStudio, and in fact I only need maps (no models, no behaviour, no animations,...).

The maze3D could be a good starting point if I could improve the quality of the cells (i.e. changing cells by premade pieces of map).
12  Java Game APIs & Engines / Xith3D Forums / BSP loader? on: 2004-07-29 08:24:05
I have read in older topics about a quake BSP loader, but i only have been able to find the javacooldude md3 quake model loader.
Any idea where to find it?
thanks  Smiley
13  Java Game APIs & Engines / Xith3D Forums / Re: Texture Loading with ASE on: 2004-07-25 14:46:07
did i forgot to mention that i am totally newbie to 3D world?  Grin

Thanks for your answer and your patience  Smiley
14  Java Game APIs & Engines / Xith3D Forums / Texture Loading with ASE on: 2004-07-25 09:02:03
I have been trying to re-use the code from the ASE tutorial to load different models, but it seems that is unable to show the textures (only shows the shapes with white texture).
The textures are quite simple, dont use images that i need to copy to the directory, here you can see them from the ASE file:

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  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
*MATERIAL_LIST {
      *MATERIAL_COUNT 3
      *MATERIAL 0 {
            *MATERIAL_NAME "Material #2"
            *MATERIAL_CLASS "Standard"
            *MATERIAL_AMBIENT 0.9725      0.9765      0.9725
            *MATERIAL_DIFFUSE 0.2000      0.5529      0.1765
            *MATERIAL_SPECULAR 0.8980      0.8980      0.8980
            *MATERIAL_SHINE 0.0000
            *MATERIAL_SHINESTRENGTH 1.0000
            *MATERIAL_TRANSPARENCY 0.0000
            *MATERIAL_WIRESIZE 1.0000
            *MATERIAL_SHADING Phong
            *MATERIAL_XP_FALLOFF 0.0000
            *MATERIAL_SELFILLUM 0.0000
            *MATERIAL_FALLOFF In
            *MATERIAL_XP_TYPE Filter
      }
      *MATERIAL 1 {
            *MATERIAL_NAME "Material #3"
            *MATERIAL_CLASS "Standard"
            *MATERIAL_AMBIENT 0.7333      0.7255      0.7608
            *MATERIAL_DIFFUSE 0.2667      0.1922      0.5451
            *MATERIAL_SPECULAR 0.8980      0.8980      0.8980
            *MATERIAL_SHINE 0.2500
            *MATERIAL_SHINESTRENGTH 0.0500
            *MATERIAL_TRANSPARENCY 0.0000
            *MATERIAL_WIRESIZE 1.0000
            *MATERIAL_SHADING Phong
            *MATERIAL_XP_FALLOFF 0.0000
            *MATERIAL_SELFILLUM 0.0000
            *MATERIAL_FALLOFF In
            *MATERIAL_XP_TYPE Filter
      }
      *MATERIAL 2 {
            *MATERIAL_NAME "Material #27"
            *MATERIAL_CLASS "Architectural"
            *MATERIAL_AMBIENT 0.9490      0.3020      0.1255
            *MATERIAL_DIFFUSE 0.9490      0.3020      0.1255
            *MATERIAL_SPECULAR 0.5000      0.5000      0.5000
            *MATERIAL_SHINE 0.0000
            *MATERIAL_SHINESTRENGTH 1.0000
            *MATERIAL_TRANSPARENCY 0.0000
            *MATERIAL_WIRESIZE 1.0000
      }
}


I dont know whats wrong with them  Huh
15  Java Game APIs & Engines / Xith3D Forums / MultiTexture Tutorial Problems on: 2004-07-16 08:15:13
I have been testing this tutorial, and i got this error on runtime:

java.lang.ArrayIndexOutOfBoundsException: 1
       at com.xith3d.scenegraph.GeometryArray.getTexCoordData(GeometryArray.java:107)
       at com.xith3d.render.jogl.ShapeAtomPeer.setupTextureCoords(ShapeAtomPeer.java:114)
       at com.xith3d.render.jogl.ShapeAtomPeer.setupTextureUnit(ShapeAtomPeer.java:592)
       at com.xith3d.render.jogl.ShapeAtomPeer.renderAtom(ShapeAtomPeer.java:698 )      
 at com.xith3d.render.CanvasPeerBase.render(CanvasPeerBase.java:102)
       at com.xith3d.render.jogl.CanvasPeerImpl.drawBin(CanvasPeerImpl.java:760)
       at com.xith3d.render.jogl.CanvasPeerImpl.display(CanvasPeerImpl.java:999)
       at net.java.games.jogl.impl.GLDrawableHelper.display(GLDrawableHelper.java:74)
       at net.java.games.jogl.GLCanvas$DisplayAction.run(GLCanvas.java:198 )      
 at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:239)
       at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:186)
       at net.java.games.jogl.GLCanvas.display(GLCanvas.java:74)
       at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:1100)
       at com.xith3d.scenegraph.View.renderOnce(View.java:755)
       at com.xith3d.scenegraph.View.renderOnce(View.java:688 )
       at org.xith3d.gsg.MultiTextureXith3D.<init>(MultiTextureXith3D.java:139)

       at org.xith3d.gsg.MultiTextureXith3D.main(MultiTextureXith3D.java:53)



I have been working from start with the HelloXith3D file, so it uses the

Geometry g = Cube.createCubeViaTriangles(0, 0, 0, 1, true);

method to create the cube.I have tested the code file of the tutorial and it uses a local method to create the cube, and with that method i dont get that error at runtime and the example works fine.

I want to know why using different geometry builders the texture loading works or fails.Any clue?
Thanks in advance  Smiley
16  Java Game APIs & Engines / Xith3D Forums / Re: Ase Loader Tutorial - Troubleshoot.... on: 2004-07-14 13:54:28
Well, i suppose it helps, as a clue.I have not been able to find such a method ( removeFromParentGroup() ) in the node class.But i have seen that with groups you can access childs and remove them...so, once you have your node, you access the parent (as a group)  and remove the child you want to assign to the new group.Here's an example:

torso.addChild(removeParent((Node) nodes.get("Torso")));


And our remove parent method is:

public Node removeParent(Node n){
           
           Group Parent = (Group)n.getParent();
           Parent.removeChild(n);
           return n;
}

It works, maybe there's a better solution that uses a killparent method that i havent found.Dunno.
Anyway, thanks Will and the others to help resolve this little problem  Wink
17  Java Game APIs & Engines / Xith3D Forums / Re: Ase Loader Tutorial - Troubleshoot.... on: 2004-07-13 14:46:07
There is a topic about this issue in http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1089579666

As you can see, it still has no solution posted.I have been playing around with the code, and i took example from the xith3DTransformGroupTree example.It seems that you cant load the ASE nodes as childs in the code, if they have parent in the ASE file (i guess).I have succeed loading the ASE scene as a whole TransformGroup.

Anyway, it would be great if any of the developers (or the tutorial author) could bring a little help about whats wrong with the tutorial example, so we could learn more about the scenegraph, the ase files, and such.  Smiley
18  Java Game APIs & Engines / Xith3D Forums / Re: Getting started... on: 2004-07-13 09:17:24
Im having the same problem here with asetest  example :-/

Maybe the last changes on the cvs affect the node structure and makes the example not to work?
Any help will be welcome!
Pages: [1]
 

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 (35 views)
2014-12-15 09:26:44

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

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

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

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

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

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

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

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

toopeicgaming1999 (34 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!