Page 6 of 11

Re: Simple, lightweight, general purpose collision detection

Posted: Sun Jan 16, 2011 6:49 pm
by TechnoCat
vrld wrote:There will be a tutorial featuring how to write a simple game using HardonCollider soon.
Please involve rolling circles!

Re: Simple, lightweight, general purpose collision detection

Posted: Thu Feb 17, 2011 12:24 am
by vrld
Changes!
  • I finished writing up Part 0 and Part 1 of the tutorial. It involves no rolling circles though.
  • There are now point-in-shape and ray-intersection tests.
  • Tweaks for huge (or mediocre) performance gains
The future:
  • Point Shapes
  • Part 2 of the tutorial
  • Part 3 of the tutorial
  • Something else? (Any feature you wish for?)

Re: Simple, lightweight, general purpose collision detection

Posted: Thu Feb 17, 2011 2:23 am
by TechnoCat
vrld wrote:
  • Something else? (Any feature you wish for?)
Rolling circles! :crazy:

Re: Simple, lightweight, general purpose collision detection

Posted: Thu Feb 17, 2011 3:11 pm
by miko
Robin wrote:
kikito wrote:Maybe it's a little early to ask this, but - will it be Lua & C++, or Lua-only?
It would probably make the most sense to make it Lua-only, because more lovers are familiar with Lua than with C++ and more importantly, if we do use C++ and want to gain any traction, it would have to be included in the LÖVE core, and I don't know how the devs feel about that. If they do want to include it, the heavy stuff and inner loops could probably be done in C++.
Note: for love compiled with luajit2, the pure lua implementation actually will be faster than using C++ because it is expensive to cross lua/C++ boundary.

Re: Simple, lightweight, general purpose collision detection

Posted: Sat Feb 26, 2011 5:37 pm
by vrld
Welcome to the future:
HardonCollider now has point shapes (useful for (slow) bullets and stuff)
I've also fixed this bug and another bug with collisions between circles.
TechnoCat wrote:Rolling circles! :crazy:
I can offer you one rolling (and bouncing) circle:

Re: Simple, lightweight, general purpose collision detection

Posted: Sat Feb 26, 2011 7:10 pm
by Robin
vrld wrote:I can offer you one rolling (and bouncing) circle:
That *is* crazy! (Everyone who doesn't know what I'm talking about: let the ball roll down and wait. Perpetual motion FTW!)

Re: Simple, lightweight, general purpose collision detection

Posted: Sat Feb 26, 2011 10:26 pm
by TechnoCat
vrld wrote:
TechnoCat wrote:Rolling circles! :crazy:
I can offer you one rolling (and bouncing) circle:
My dreams, they come true!

Re: Simple, lightweight, general purpose collision detection

Posted: Sun Feb 27, 2011 1:21 pm
by chris
I humbly want to request a feature for Hardon Collider.

There is a shape:move() and a shape:moveTo() function. The moveTo sets the position.
There is also a shape:rotate() function. But not a rotate function that sets the rotation. I would really like that.

Re: Simple, lightweight, general purpose collision detection

Posted: Sun Feb 27, 2011 4:06 pm
by vrld
chris wrote:I humbly want to request a feature for Hardon Collider.
Done. you can set the rotation with shape:setRotation(). As a by-product, you can get the shape's rotation with shape:rotation().

Re: Simple, lightweight, general purpose collision detection

Posted: Sun Feb 27, 2011 6:38 pm
by chris
Nice :) Another question:

Why is it that if I make a rectangle:
box.x = 5
box.y = 6
box.box = HC.addRectangle(box.x,box.y,50,50)

And I want to move it 3 pixels to the right, I have to write this:
box.box:moveTo(box.x+25+3,box.y+25)