Hacker News new | ask | show | jobs
by thedirt0115 2190 days ago
There's a billiards simulator/game[1] that uses event prediction instead of step-based physics for realistic and reproducible results. It solves the equations of motion to find the next event, animates to that point, and continues until nothing is moving. This is feasible since there are only 16 balls and 1 cue tip, but I imagine that as computational power continues to increase, the scale of such simulations will increase too. I'm excited to see what's next :)

[1] - I read a paper that specifically talked about step-based vs event-prediction for billiards simulation, but I can't find it now :/ Virtual Pool 4 might use the system for its physics, but don't quote me on that!

P.S. - Unity has a pretty handy built-in CharacterController class that lets you move around while respecting collisions -- you just need to add your own Gravity. Also, for more advanced character movement, Catlike Coding has a great series of tutorials: https://catlikecoding.com/unity/tutorials/movement/

1 comments

That’s sort of the way things are done in industry.

One strong example is in mixed-signal electronic simulation. Your digital portion of the system describes digital outputs in terms of digital inputs and gate delays, more or less. Changing the digital inputs results in a queue of events.

So you run the analog portion of the system until the pending digital event, process the digital event, and then continue the analog simulation.