Algorithm for Direction Change upon Collision

Jim Hurley jhurley0305 at sbcglobal.net
Tue Nov 12 19:29:01 EST 2013


> 
> Message: 16
> Date: Tue, 12 Nov 2013 22:11:35 +0200
> From: Ender Nafi Elekcioglu <endernafi at gmail.com>
> To: How to use LiveCode <use-livecode at lists.runrev.com>
> Subject: Re: Algorithm for Direction Change upon Collision
> Message-ID: <etPan.52828b77.6b8b4567.18f at fdbqMacBookPro.local>
> Content-Type: text/plain; charset="utf-8"
> 
> @Jim,
> As I?ve said, you?re equations and physics simulations are excellent.
> But performance is my biggest concern over being realistic,
> so I?m with Scott here, ?near enough is good enough?.
> 

I guess I didn't understand what you want to achieve. If it was simulating the game of air hockey you really can't avoid doing  a realistic collision between pucks. But if it is simply moving a lot of objects around the screen, then maybe the interaction between them would be irrelevant and you would ignore collisions altogether, just collisions with walls. 

See for example "Kaleidoscope Deluxe" in the User Samples (Rev On Line).
Go to the third card (Click box in the lower left hand corner until you arrive at "Bouncing Balls.") And set the velocity to the max.





More information about the use-livecode mailing list