Closed rickbatka closed 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
IT'S SO OBVIOUS NOW THAT I SEE IT HAHAHA
I replied to an email and it made a comment... that was odd...
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 .
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 .
Things left for implementation of quad tree (before I forget them)
All that's left are collisions, searching is all setup
So rough physics are done, came up with a better solution that might just be simpler anyways.