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 / [odejava] matrix bug report & patch on: 2004-04-25 16:12:05
Hi i found that i got inconsistent reading from Geom.getRotation
it seems that ODE continuosly move matrix structures around so we need an updateReference before every read. (I think we also need to call updateReference also before getPosition while getQuaternion always copy the correct ode quaternion)
I don't know if this is correct ODE behaviour or is caused by some other bug.
I also found that indices for both body.setRotation and geom.setRotation were wrong and different from the ones from getRotation (as ODE uses always vectors of 4 element even if it needs only 3)
so here's my cumulative patch for both of this bug.
Index: Geom.java
===================================================================
RCS file: /cvs/odejava/odejava/src/org/odejava/Geom.java,v
retrieving revision 1.4
diff -r1.4 Geom.java
136,141c136,141
<               Ode.floatArray_setitem(tmpArray, 3, r.getElement(1, 0));
<               Ode.floatArray_setitem(tmpArray, 4, r.getElement(1, 1));
<               Ode.floatArray_setitem(tmpArray, 5, r.getElement(1, 2));
<               Ode.floatArray_setitem(tmpArray, 6, r.getElement(2, 0));
<               Ode.floatArray_setitem(tmpArray, 7, r.getElement(2, 1));
<               Ode.floatArray_setitem(tmpArray, 8, r.getElement(2, 2));
---
>               Ode.floatArray_setitem(tmpArray, 4, r.getElement(1, 0));
>               Ode.floatArray_setitem(tmpArray, 5, r.getElement(1, 1));
>               Ode.floatArray_setitem(tmpArray, 6, r.getElement(1, 2));
>               Ode.floatArray_setitem(tmpArray, 8, r.getElement(2, 0));
>               Ode.floatArray_setitem(tmpArray, 9, r.getElement(2, 1));
>               Ode.floatArray_setitem(tmpArray, 10, r.getElement(2, 2));
172a173
>               updateReferences();
202a204
>               updateReferences();
Index: Body.java
===================================================================
RCS file: /cvs/odejava/odejava/src/org/odejava/Body.java,v
retrieving revision 1.27
diff -r1.27 Body.java
296,301c298,303
<         Ode.floatArray_setitem(tmpArray, 3, r.getElement(1, 0));
<         Ode.floatArray_setitem(tmpArray, 4, r.getElement(1, 1));
<         Ode.floatArray_setitem(tmpArray, 5, r.getElement(1, 2));
<         Ode.floatArray_setitem(tmpArray, 6, r.getElement(2, 0));
<         Ode.floatArray_setitem(tmpArray, 7, r.getElement(2, 1));
<         Ode.floatArray_setitem(tmpArray, 8, r.getElement(2, 2));
---
>         Ode.floatArray_setitem(tmpArray, 4, r.getElement(1, 0));
>         Ode.floatArray_setitem(tmpArray, 5, r.getElement(1, 1));
>         Ode.floatArray_setitem(tmpArray, 6, r.getElement(1, 2));
>         Ode.floatArray_setitem(tmpArray, 8, r.getElement(2, 0));
>         Ode.floatArray_setitem(tmpArray, 9, r.getElement(2, 1));
>         Ode.floatArray_setitem(tmpArray, 10, r.getElement(2, 2));

Would someone with CVS access check in this in HEAD?
2  Game Development / Game Mechanics / Re: [Odejava] Issue #3 enhancements implemented on: 2004-04-24 08:58:03
Clap Clap Clap....

Great... As soon as i finish the XODEJoint i'm working on I'll update and try the new code ;-)
3  Game Development / Game Mechanics / Re: [Odejava] setting the Body mass before adding on: 2004-04-24 08:54:59
I sent my details to you so we can coordinate on the parser

About this bug:
Maybe the correct behaviour should be changing Odejava to refuse (exception? assert?) an adjustMass before a proper dMass is supplied (through setDefaultMass(Geom) setGeom (which calls setDefaultMass with the passed Geom) setBoxMass or setSphereMass)
or agree that Bodies start with a default mass some kind of geometry.
4  Game Development / Game Mechanics / Re: [Odejava] setting the Body mass before adding on: 2004-04-22 16:42:05
Ok today I lost about three hours finding the same bug :-)

I wish i looked at the top of the console window ;-)

I also think I found the cause:

You cant' call adjustMass if you don't have a properly set-up dMass for your body. (if i understand it right adjustMass simply "scales" the current mass structure)
If you create a body without passing a geometry the dMass gets allocated but not properly initialized i solved the problem setting the default dMass for a Body to be a sphere with radius =1 in Body.java around line 140 i modified

       if (geom != null) {
           setGeom(geom);
       }

with

       if (geom != null) {
           setGeom(geom);
       }
       else
           Ode.dMassSetSphere(massId, DEFAULT_MASS_DENSITY, 1f);

Now back to the parser ;-)
5  Game Development / Game Mechanics / Re: [Odejava] *new* XML ODE format on: 2004-04-22 11:26:23
Hi Will!
Since I need to use xode in a very short term (within two days) I think i'm starting adding joint support to xode.

As soon as i have some code working i wold be glad to share a couple of classes ;-)
6  Game Development / Game Mechanics / Re: [Odejava] *new* XML ODE format on: 2004-04-18 15:37:01
Hi i just read the specification and a couple of things came into my head:

Why Body and Geoms are seen as containters in the specification?

Is there a way in the file to specify that a Geom is to be bound to a specified Body?
7  Game Development / Game Mechanics / Re: [Odejava] *new* XML ODE format on: 2004-04-17 12:22:54
Impressive... that would be wonderful.
Do you have any landing time estimate for odejava?
8  Game Development / Game Mechanics / [odejava] GeomCone and GeomCylinder Bug? on: 2004-04-17 12:19:28
Hi While i was trying odejava i found what I thik should be two bugs with GeomCone and GeomCylinder

If i change HighLevelApiExample.java at line 171 with

box = new Body("box",world, new GeomCone(1f, 1f));

i get

Odejava version 0.2.4
Exception in thread "main" java.lang.NullPointerException: Attempt to dereference null dGeomID
     at org.odejava.ode.OdeJNI.dGeomGetPosition(Native Method)
     at org.odejava.ode.Ode.dGeomGetPosition(Ode.java:174)
     at org.odejava.geom.Geom.updateReferences(Geom.java:98)
     at org.odejava.geom.GeomCone.<init>(GeomCone.java:59)
     at org.odejava.geom.GeomCone.<init>(GeomCone.java:64)
     at org.odejava.test.simple.HighLevelApiExample.initObjects(HighLevelApiExample.java:171)
     at org.odejava.test.simple.HighLevelApiExample.<init>(HighLevelApiExample.java:116)
     at org.odejava.test.simple.HighLevelApiExample.main(HighLevelApiExample.java:86)

if i change it with

box = new Body("box",world, new GeomCylinder(1f, 1f));

i get a different behaviour (exception outside JVM):

Odejava version 0.2.4
free(): invalid pointer 0x4c93ce28!

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x48D0446
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
     just occurred. Please refer to release documentation for possible
     reason and solutions.


Current Java thread:
     at org.odejava.collision.JavaCollision.spaceCollide(Native Method)
     at org.odejava.collision.JavaCollision.collide(JavaCollision.java:124)
     at org.odejava.test.simple.HighLevelApiExample.step(HighLevelApiExample.java:209)
     at org.odejava.test.simple.HighLevelApiExample.simulate(HighLevelApiExample.java:187)
     at org.odejava.test.simple.HighLevelApiExample.main(HighLevelApiExample.java:87)

Dynamic libraries:
08048000-0804e000 r-xp 00000000 03:04 1910649    /usr/lib/j2sdk1.4-sun/bin/java
0804e000-0804f000 rw-p 00005000 03:04 1910649    /usr/lib/j2sdk1.4-sun/bin/java
40000000-40016000 r-xp 00000000 03:04 2056454    /lib/ld-2.3.2.so
40016000-40017000 rw-p 00015000 03:04 2056454    /lib/ld-2.3.2.so
40018000-40020000 r-xp 00000000 03:04 800169     /usr/lib/j2sdk1.4-sun/jre/lib/i386/native_threads/libhpi.so
40020000-40021000 rw-p 00007000 03:04 800169     /usr/lib/j2sdk1.4-sun/jre/lib/i386/native_threads/libhpi.so
40021000-40028000 r-xp 00000000 03:04 2056558    /lib/libnss_compat-2.3.2.so
40028000-40029000 rw-p 00006000 03:04 2056558    /lib/libnss_compat-2.3.2.so
40029000-40036000 r-xp 00000000 03:04 2056704    /lib/libpthread-0.10.so
40036000-40038000 rw-p 0000c000 03:04 2056704    /lib/libpthread-0.10.so
4007a000-4007c000 r-xp 00000000 03:04 2056508    /lib/libdl-2.3.2.so
4007c000-4007d000 rw-p 00002000 03:04 2056508    /lib/libdl-2.3.2.so
4007e000-401a6000 r-xp 00000000 03:04 2056463    /lib/libc-2.3.2.so
401a6000-401ae000 rw-p 00127000 03:04 2056463    /lib/libc-2.3.2.so
401b1000-405ab000 r-xp 00000000 03:04 800174     /usr/lib/j2sdk1.4-sun/jre/lib/i386/client/libjvm.so
405ab000-405c7000 rw-p 003f9000 03:04 800174     /usr/lib/j2sdk1.4-sun/jre/lib/i386/client/libjvm.so
405d9000-405eb000 r-xp 00000000 03:04 2056557    /lib/libnsl-2.3.2.so
405eb000-405ec000 rw-p 00011000 03:04 2056557    /lib/libnsl-2.3.2.so
405ee000-4060f000 r-xp 00000000 03:04 2056509    /lib/libm-2.3.2.so
4060f000-40610000 rw-p 00020000 03:04 2056509    /lib/libm-2.3.2.so
40610000-40614000 rw-s 00000000 03:04 572466     /tmp/hsperfdata_migliava/4794
40614000-40617000 r--s 00000000 03:04 800205     /usr/lib/j2sdk1.4-sun/jre/lib/ext/dnsns.jar
40617000-4061e000 r-xp 00000000 03:04 2056354    /lib/libgcc_s.so.1
4061e000-4061f000 rw-p 00007000 03:04 2056354    /lib/libgcc_s.so.1
40621000-40629000 r-xp 00000000 03:04 2056678    /lib/libnss_nis-2.3.2.so
40629000-4062a000 rw-p 00007000 03:04 2056678    /lib/libnss_nis-2.3.2.so
4062a000-40632000 r-xp 00000000 03:04 2056588    /lib/libnss_files-2.3.2.so
40632000-40633000 rw-p 00008000 03:04 2056588    /lib/libnss_files-2.3.2.so
40633000-40643000 r-xp 00000000 03:04 800178     /usr/lib/j2sdk1.4-sun/jre/lib/i386/libverify.so
40643000-40645000 rw-p 0000f000 03:04 800178     /usr/lib/j2sdk1.4-sun/jre/lib/i386/libverify.so
40645000-40665000 r-xp 00000000 03:04 800179     /usr/lib/j2sdk1.4-sun/jre/lib/i386/libjava.so
40665000-40667000 rw-p 0001f000 03:04 800179     /usr/lib/j2sdk1.4-sun/jre/lib/i386/libjava.so
40667000-4067b000 r-xp 00000000 03:04 800181     /usr/lib/j2sdk1.4-sun/jre/lib/i386/libzip.so
4067b000-4067e000 rw-p 00013000 03:04 800181     /usr/lib/j2sdk1.4-sun/jre/lib/i386/libzip.so
4067e000-42016000 r--s 00000000 03:04 800916     /usr/lib/j2sdk1.4-sun/jre/lib/rt.jar
42060000-42076000 r--s 00000000 03:04 800208     /usr/lib/j2sdk1.4-sun/jre/lib/sunrsasign.jar
42076000-42151000 r--s 00000000 03:04 800913     /usr/lib/j2sdk1.4-sun/jre/lib/jsse.jar
42151000-42162000 r--s 00000000 03:04 800209     /usr/lib/j2sdk1.4-sun/jre/lib/jce.jar
42162000-426bb000 r--s 00000000 03:04 800914     /usr/lib/j2sdk1.4-sun/jre/lib/charsets.jar
44763000-44770000 r--s 00000000 03:04 800206     /usr/lib/j2sdk1.4-sun/jre/lib/ext/ldapsec.jar
4c7f0000-4c80c000 r--s 00000000 03:04 800204     /usr/lib/j2sdk1.4-sun/jre/lib/ext/sunjce_provider.jar
4c80c000-4c8c8000 r--s 00000000 03:04 800207     /usr/lib/j2sdk1.4-sun/jre/lib/ext/localedata.jar
4c8c8000-4c90f000 r--s 00000000 03:04 2220650    /home/migliava/eclipse/odejava/odejava/lib/vecmath.jar
4c90f000-4c987000 r-xp 00000000 03:04 1730858    /home/migliava/eclipse/odejava/odejava/lib/linux/libodejava.so
4c987000-4c988000 rw-p 00078000 03:04 1730858    /home/migliava/eclipse/odejava/odejava/lib/linux/libodejava.so
4c99b000-4ca39000 r-xp 00000000 03:04 685753     /usr/lib/libstdc++.so.5.0.5
4ca39000-4ca4f000 rw-p 0009d000 03:04 685753     /usr/lib/libstdc++.so.5.0.5

Heap at VM Abort:
Heap
def new generation   total 576K, used 471K [0x44770000, 0x44810000, 0x44c50000)
 eden space 512K,  92% used [0x44770000, 0x447e5f38, 0x447f0000)
 from space 64K,   0% used [0x447f0000, 0x447f0000, 0x44800000)
 to   space 64K,   0% used [0x44800000, 0x44800000, 0x44810000)
tenured generation   total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000)
  the space 1408K,   0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000)
compacting perm gen  total 4096K, used 1367K [0x48770000, 0x48b70000, 0x4c770000)
  the space 4096K,  33% used [0x48770000, 0x488c5cc0, 0x488c5e00, 0x48b70000)

Local Time = Sat Apr 17 16:15:39 2004
Elapsed Time = 0
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
#
# An error report file has been saved as hs_err_pid4794.log.
# Please refer to the file for further information.
#

Sometimes i wonder why cones and cylinders aren't very popular ;-))
9  Java Game APIs & Engines / Xith3D Forums / Re: Added another package (with runDemos.bat files on: 2003-12-04 15:51:05
Hi! we are a group of students and we are going to use odejava to develop a simulator for robots in dynamic environments.

I'm tryng to build odejava on linux debian but so far I have not been successful...

First, if i get this correctly I think that according to the readme.txt
odejava.h  
odejava.cpp  
odejava.i
files should go into javaode/net/java/dev/odejava/ode and not in zip's root as in odejava-0.1.1-full.zip right?

Then after i ran swig i try with
g++ -c -I /usr/local/j2se/include/ -I /usr/local/j2se/include/linux -I ../../../../../include odejava_wrap.cxx

and i get
odejava_wrap.cxx: In function `void
  Java_net_java_dev_odejava_ode_OdeJNI_dHingeJoint_1addTorque(JNIEnv*,
  _jclass*, long long int, float)':
odejava_wrap.cxx:2416: error: `addTorque' undeclared (first use this function)
odejava_wrap.cxx:2416: error: (Each undeclared identifier is reported only once
  for each function it appears in.)
odejava_wrap.cxx: In function `void
  Java_net_java_dev_odejava_ode_OdeJNI_dSliderJoint_1addForce(JNIEnv*,
  _jclass*, long long int, float)':
odejava_wrap.cxx:2620: error: `addForce' undeclared (first use this function)
odejava_wrap.cxx: In function `void
  Java_net_java_dev_odejava_ode_OdeJNI_dUniversalJoint_1addTorques(JNIEnv*,
  _jclass*, long long int, float, float)':
odejava_wrap.cxx:2929: error: `addTorques' undeclared (first use this function)
odejava_wrap.cxx: In function `void
  Java_net_java_dev_odejava_ode_OdeJNI_dHinge2Joint_1addTorques(JNIEnv*,
  _jclass*, long long int, float, float)':
odejava_wrap.cxx:3204: error: `addTorques' undeclared (first use this function)
odejava_wrap.cxx: In function `void
  Java_net_java_dev_odejava_ode_OdeJNI_dAMotorJoint_1addTorques(JNIEnv*,
  _jclass*, long long int, float, float, float)':
odejava_wrap.cxx:3765: error: `addTorques' undeclared (first use this function)

Is swig not including something?

Has someone suceded in building odejava under linux?

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

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

BurntPizza (50 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 (57 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!