Another week, another re-write.
After the objects started to move too fast, the previous collision algorithms started to render unrealistic trajectories. It even missed a few hits altogether, allowing balls to quantum-tunnel through the racket every now and then...
The new collision module is based on some galactic evolution code I had laying around. It was a bit of a struggle to hack it in there, but it seems to be working.
The positions of objects are now tracked via an improved Euler method (prev just a simple Euler), forces are allowed to be non-linear, and upto approx 1 million objects can be tracked and rendered at low res at around 10 frames per sec.
So I'm set for modelling a room full of superballs!
This vid shows the modified code and some close-ups of the collisions -- just to check they look good (and no ball sinks too far into the racket or floor before it's detected as a collision).
The 'bot s/w has also been adjusted to "return" the ball instead of just block it -- as in prev vids.
The next step will be to get the think to serve the ball to a specific square. And then try to return an incoming ball to a selected square.
Some of the logic for these latter things is already in place and roughly tested.
Link to this comment:
All Comments (0)