Slick Forums

Discuss the Slick 2D Library
It is currently Sat Apr 20, 2019 6:12 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Phys2D Lag
PostPosted: Tue Apr 17, 2012 9:28 am 
Offline

Joined: Mon Aug 22, 2011 7:54 pm
Posts: 14
I've been working on porting some things to android and have used Slick-AE to do so. I am using the Phys2D physics engine for all my game objects and have noticed extreme lag when I have only about 15 items in the World. I have attempted to minimize the World's collision accuracy to possibly speed up each step but to no avail. The problem occurs at the world.step(delta / 1000f) method. I am wondering if anyone has any advice?


Top
 Profile  
 
 Post subject: Re: Phys2D Lag
PostPosted: Thu May 03, 2012 5:03 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
Sorry that this response is so late, but I do have a bit of suggestion.

My first suggestion is to use the libgdx Box2D Physics engine. It is a java binding of a native library, which in practical terms, means it works really fast. Box2D also has more features than Phys2d in my experiance with one exception: Box2d does not have direct support for concave polygons. This can be overcome by adding several shapes to a single body. Box2D is also kinda non-user-friendly (what with needing to make a body def to make a body and a shape def to make a shape and all...), but it is the most certain method I have for speeding up physics. I have personally used this engine to simulate a few hundred bodies (with maybe ten dynamic ones) at a time.

However, if you need to use Phys2D, I'm afraid I don't have enough experience with the engine to help you optomize.

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] 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