Slick Forums

Discuss the Slick 2D Library
It is currently Tue May 21, 2013 11:25 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Jun 12, 2012 4:32 pm 
Offline

Joined: Sat Jun 09, 2012 4:43 pm
Posts: 2
Hello,

After I studied a less then minimal about jBox2D I saw the improvents I could have using slick, but when I search for some repo i find many. I don't know if github replicates for each user or something, but I would like to know if there is any official as I've been using currently https://github.com/Kenkron/fizzy/ (which can be found on wiki).

Another thing, does the project still live on?

And with this repo I an having a issue when trying to use CompoundShape. A have made a program that opens a map created with Tiled and extract some points from it. Those are the borders of the unpassable tiles (is working nice, I thing). Then I add those points to Polygons (if there is more than one polygon) and add each to the CompoundShape. I am currently testing only one shape on the CompoundShape, but when I add to the world it cause a stackOverflow on
Code:
at org.newdawn.fizzy.CompoundShape.createInBody(CompoundShape.java:58)

When I tryied to setRestitution on this body after the constructor the error didn't happen there, but on the setRestitution
Code:
colBody = new StaticBody(cShape, 0, 0);
       
colBody.setRestitution(0.1f);


Code:
Exception in thread "main" java.lang.StackOverflowError
   at java.util.ArrayList$Itr.<init>(ArrayList.java:780)
   at java.util.ArrayList$Itr.<init>(ArrayList.java:780)
   at java.util.ArrayList.iterator(ArrayList.java:774)
   at org.newdawn.fizzy.CompoundShape.setRestitution(CompoundShape.java:90)


An ps is that if I use only 'Shape' instead of compound shape (same Polygon) it works.
Am I breaking any rule?

edit:
I've solved my error. The polygon wasn't being added properly. Now I have it working, but with some strange behavior (often dynamic objects start floating).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group