Live data from Hacker News

2D Rigid Body Collision Resolution

sassnow.ski

11–20 of 69 posts

Re: 2D Rigid Body Collision Resolution

#12
The way this article is written with small simulations throughout the page and word highlights was reminding me of https://ciechanow.ski/ and then I noticed the domain name. It is very similar too https://www.sassnow.ski/

Couldn't be happier seeing more people going to same depths (or heights) to explain things to people. Will be looking forward to more articles like this as this just the very first one.

Re: 2D Rigid Body Collision Resolution

#13

The way this article is written with small simulations throughout the page and word highlights was reminding me of https://ciechanow.ski/ and then I noticed the domain name. It is very similar too https://www.sassnow.ski/ Couldn't be happier seeing more people going to same depths (or heights) to explain things to people. Will be looking forward to more articles like this as this just the very first one.

Bartosz was definitely my biggest inspiration when writing this post. I was debating if I should actually use that domain because it might come across as a little too derivative but I couldn't resist!

Re: 2D Rigid Body Collision Resolution

#14

Hey everyone, author here! To give some context, this is only part one in a series of blog posts I plan on writing about rigid body physics. The post is aimed at people like myself, who aren't game devs and don't necessarily have a strong math background. Which is why I spend so much time explaining concepts that would appear almost trivial to someone who has experience in this area. Happy to answer any questions you…

I'm curious whether you've considered using Box2D[1] as a reference, since it is a pretty complete implementation of rigid body physics? Or is it more that you want to re-implement things from scratch as part of this tutorial?

[1] - https://box2d.org/documentation/

Re: 2D Rigid Body Collision Resolution

#16

The way this article is written with small simulations throughout the page and word highlights was reminding me of https://ciechanow.ski/ and then I noticed the domain name. It is very similar too https://www.sassnow.ski/ Couldn't be happier seeing more people going to same depths (or heights) to explain things to people. Will be looking forward to more articles like this as this just the very first one.

With a sample size of 2, I declare that the .ski domain is dedicated to very high-quality interactive education websites. I am now conditioned to click on any .ski domain that I come across on HN.

Re: 2D Rigid Body Collision Resolution

#17
Collisions are violations of the pairwise non-intersection constraint between bodies. Collision forces are Lagrange multipliers of these constraints. Collision normals are the (normalized) partial derivatives of the constraint function wrt one of the body's configurations.

Re: 2D Rigid Body Collision Resolution

#18
One side project I am working on right now is a 2d space shooter I am developing with my son. The idea is to have top down look, have each player control some kind of ship and fly in an enclosed area filled with space debris and shot opponents. An important aspect of this game is that the space debris can be moved around the arena and used creatively to capture opponents, prevent them from achieving their goals, etc.

As part of the project I was thinking we will skip game engine altogether because I wanted to teach my son a bit more about how to structure the application, etc. I thought in future we would use a ready game engine but at least once we would go through the exercise of implementing everything.

Everything was fine until we approached the problem of collision detection and handling. That's when things went downhill pretty quickly. Even with my theoretical math background I was soon consumed with just enormous amount of corner cases and finally decided to relent and use Box2d for this.

I am not a professional game developer, but I have over 20 years of development experience + math background and I still made the mistake of underestimating the problem. It really seems easy problem when you state it and just becomes exponentially more and more complex as you start digging into details.

Re: 2D Rigid Body Collision Resolution

#19
post #17

Collisions are violations of the pairwise non-intersection constraint between bodies. Collision forces are Lagrange multipliers of these constraints. Collision normals are the (normalized) partial derivatives of the constraint function wrt one of the body's configurations.

That sounds like the kind of thing which works if you're doing physics at 1kHz+ with an integration algorithm with good numeric stability which honours conservation of energy, but in games, we're often running physics at down to 30Hz using some ad-hoc Euler-Chromer, which requires very different approaches
Post reply on HN