Slick Forums Forum Index Slick Forums
Discuss the Slick 2D Library
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Slick Collision
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Slick Forums Forum Index -> Community Projects
View previous topic :: View next topic  
Author Message
Chronocide
Regular


Joined: 07 Dec 2008
Posts: 191
Location: Vancouver, BC, Canada

PostPosted: Fri Nov 13, 2009 8:02 am    Post subject: Reply with quote

Hey good job on contributing some real code. :D
I only took a cursory glance over the Java Doc.
But, I like how you provide some different approached for broad phase detection right out of the box.

It seems to me one thing everyone can agree on as far as what they want in a library isn't so much particular features; but the ability for new features to be incorporated in an elegant way*. So picking on your nice implementation a bit, here are some questions I would have as a potential user. Of course I can think of a few game ideas were it looks like I could just drop Spash down and solve my collision needs, I am talking in a more generic context here.

You mention shapes don't support rotation, which is fine many users don't need it, how might rotational support be implemented for those users that do want it?
You say that the detection system does not guard against tunneling. Again this is fine, in many cases tunneling is not an issue. But how hard would the user have to work to add tunneling prevention if it was needed? Is it possible to simply write a new detection system and plug that in without needing to touch any Shape classes for example?

For me these are the sorts of questions I would be asking when I'm looking at a collision library.

*here "elegant" takes on the meaning of not impeding the goals of the user by making them learn every detail about the library being used.
_________________
If at first quads don't succeed tri tri again.
Back to top
View user's profile Send private message
peabrain



Joined: 23 Oct 2007
Posts: 32

PostPosted: Sat Nov 14, 2009 12:08 am    Post subject: Reply with quote

Quote:
You mention shapes don't support rotation, which is fine many users don't need it, how might rotational support be implemented for those users that do want it?


I specifically avoided rotations because the math would be too hard. I guess technically you could write your own impls of Shape and write your own shape vs shape overlap checkers that handle rotating shapes. That'd be a lot of work but not impossible.

Quote:
You say that the detection system does not guard against tunneling. Again this is fine, in many cases tunneling is not an issue. But how hard would the user have to work to add tunneling prevention if it was needed


Like rotations, I think it might be possible but it'd be a lot of work. Out of the box the library only does shape vs shape checks. There is no notion of velocity or acceleration or even time. I'm not sure what you'd need to stop tunneling but you could write an implementation of BodyOverlapper that tries to prevent it.

Quote:
Is it possible to simply write a new detection system and plug that in without needing to touch any Shape classes for example?


Probably not, the shape classes are really basic.

edit: added some basic docs at http://wiki.github.com/psalaets/spash
Back to top
View user's profile Send private message
peabrain



Joined: 23 Oct 2007
Posts: 32

PostPosted: Sat Nov 21, 2009 2:00 am    Post subject: Reply with quote

manunderground wrote:
We want to implement a steering algorithm and need neighboring bodies


What is a neighboring body query? Is it as simple as "give me every body within x distance from some body"?

Where x distance is expressed as a radius or something?
Back to top
View user's profile Send private message
Gornova81
Game Developer


Joined: 02 Apr 2008
Posts: 524
Location: Italy

PostPosted: Fri Jul 02, 2010 2:01 pm    Post subject: Reply with quote

up on this topic?
_________________
Blog | Last game = Zombie Employee
Back to top
View user's profile Send private message Visit poster's website
peabrain



Joined: 23 Oct 2007
Posts: 32

PostPosted: Tue Jul 20, 2010 12:26 am    Post subject: Reply with quote

I was going to write a small game using the library to demonstrate usage but work/school/crap got in the way.

In the lib, I'm thinking of starting a branch that focuses only on spatial hash, since that can do more useful stuff than the other impls and I don't know how valuable the others are.
Back to top
View user's profile Send private message
Gornova81
Game Developer


Joined: 02 Apr 2008
Posts: 524
Location: Italy

PostPosted: Tue Jul 20, 2010 6:38 am    Post subject: Reply with quote

good to see someone around here Very Happy

If you have something to be tested, showed or you need help, let me know! Very Happy A collision library for Slick is a great addition to library and I think newbies need it to starting using Slick Very Happy
_________________
Blog | Last game = Zombie Employee
Back to top
View user's profile Send private message Visit poster's website
Gornova81
Game Developer


Joined: 02 Apr 2008
Posts: 524
Location: Italy

PostPosted: Thu Jul 22, 2010 1:01 pm    Post subject: Reply with quote

OverlapDemo is pretty cool Very Happy

I've build a little jar with your example that anyone with Java installed can run, anyone can find here:

http://code.google.com/p/jpacman/downloads/detail?name=OverlapDemo.jar&can=2&q=
_________________
Blog | Last game = Zombie Employee
Back to top
View user's profile Send private message Visit poster's website
dham



Joined: 21 Jun 2010
Posts: 11

PostPosted: Wed Sep 08, 2010 4:20 pm    Post subject: Reply with quote

Any kind of source for overlap demo?
Back to top
View user's profile Send private message
Gornova81
Game Developer


Joined: 02 Apr 2008
Posts: 524
Location: Italy

PostPosted: Thu Sep 09, 2010 6:36 am    Post subject: Reply with quote

dham wrote:
Any kind of source for overlap demo?


You can find all demos here: http://github.com/psalaets/spash/tree/master/demo/org/spash/

and OverlapDemo here:

http://github.com/psalaets/spash/blob/master/demo/org/spash/OverlapDemo.java
_________________
Blog | Last game = Zombie Employee
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Slick Forums Forum Index -> Community Projects All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group