rickbatka / co-op-engine

A prototype engine for our planned co-op game. This is where we will make it work, make it network, and make it feel fun. No AI, level design, etc.
2 stars 0 forks source link

Physics #2

Closed rickbatka closed 10 years ago

rickbatka commented 10 years ago
reddenx commented 10 years ago

in house physics

- [ ] collision detection (comes along with quad tree)

- [ ] collidable game components. ... (collidables will only be exposed to tree) whole objects in tree

rickbatka commented 10 years ago

IT'S SO OBVIOUS NOW THAT I SEE IT HAHAHA

stick-boxes

reddenx commented 10 years ago

I replied to an email and it made a comment... that was odd...

rickbatka commented 10 years ago

And your second reply... overwrote your first one...

I saw your initial reply in the thread on github, refreshed, and now it's gone, replaced with your second reply. WHERE WILL THIS ONE GO?

...and yes, every sprite will need to define an all-inclusive boundary box for 1st-pass, then check all 4 if the outer one collides.

...I say 4, but it could be an large number of rects, say to accommodate a weirdly shaped boss or world setpiece. you define the compass direction for each rectangle (N,S,E,W), probably via color-coding or some such. then you loop through all the rects and if one collides, bump them back the amount of overlap in the direction dictated by the rect. the only thing it doesn't work so well for is a big, exposed concave side (a N, or top, rect won't bump left-right if it overlaps on its left or right edge).

On Mon, Feb 10, 2014 at 10:34 PM, Sean notifications@github.com wrote:

I replied to an email and it made a comment... that was odd...

Reply to this email directly or view it on GitHubhttps://github.com/rickbatka/co-op-engine/issues/2#issuecomment-34729674 .

rickbatka commented 10 years ago

Also, I'm no genius, I had to see it to realize its genius too: http://www.hobbygamedev.com/adv/2d-platformer-advanced-collision-detection/

On Mon, Feb 10, 2014 at 10:53 PM, Rick Batka rick.batka@gmail.com wrote:

And your second reply... overwrote your first one...

I saw your initial reply in the thread on github, refreshed, and now it's gone, replaced with your second reply. WHERE WILL THIS ONE GO?

...and yes, every sprite will need to define an all-inclusive boundary box for 1st-pass, then check all 4 if the outer one collides.

...I say 4, but it could be an large number of rects, say to accommodate a weirdly shaped boss or world setpiece. you define the compass direction for each rectangle (N,S,E,W), probably via color-coding or some such. then you loop through all the rects and if one collides, bump them back the amount of overlap in the direction dictated by the rect. the only thing it doesn't work so well for is a big, exposed concave side (a N, or top, rect won't bump left-right if it overlaps on its left or right edge).

On Mon, Feb 10, 2014 at 10:34 PM, Sean notifications@github.com wrote:

I replied to an email and it made a comment... that was odd...

Reply to this email directly or view it on GitHubhttps://github.com/rickbatka/co-op-engine/issues/2#issuecomment-34729674 .

reddenx commented 10 years ago

Things left for implementation of quad tree (before I forget them)

reddenx commented 10 years ago

All that's left are collisions, searching is all setup

reddenx commented 10 years ago

So rough physics are done, came up with a better solution that might just be simpler anyways.