Article View: rec.games.programmer
Article #1035Re: Software Pinball Machine
From: Martin Gemmel
Date: Mon, 09 Nov 1992 08:22
Date: Mon, 09 Nov 1992 08:22
23 lines
1360 bytes
1360 bytes
Kevin Martin (sigma@picasso.ipl.rpi.edu) writes: } it was sort } of just that the ball could accidentally go through things. Here is another problem that could easily be overlooked. If the ball's speed is sufficiently high, it is not enough to check for collision with just 1 object borderline. Bluntly computing its new position and heading after 1 collision might cause it to pass a couple of other borders too, that are ignored in the computation. If you ask me, during each frame collisions should be checked like this: while ball will collide with some object: compute new heading and position ball AT the object's border; repeat, to see if it can hit something else; position ball for next frame; So the above while-statement should definitely not be an if-statement. Am I right? Martin
Technical Details
Message-ID:
<BxFwL5.ILA@cs.vu.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!star.cs.vu.nl!mgemmelReferences:
<18899@ucdavis.ucdavis.edu> <Bx8H5G.Gt7@cs.vu.nl> <1992Nov6.034457.11981@waikato.ac.nz> <1992Nov5.202313.7178@nntp.hut.fi> <8gl1r1h@rpi.edu>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!star.cs.vu.nl!mgemmel From: mgemmel@cs.vu.nl (Martin Gemmel) Subject: Re: Software Pinball Machine Message-ID: <BxFwL5.ILA@cs.vu.nl> Sender: news@cs.vu.nl Organization: Math & CS, VU Amsterdam References: <18899@ucdavis.ucdavis.edu> <Bx8H5G.Gt7@cs.vu.nl> <1992Nov6.034457.11981@waikato.ac.nz> <1992Nov5.202313.7178@nntp.hut.fi> <8gl1r1h@rpi.edu> Date: Mon, 9 Nov 1992 08:22:16 GMT Lines: 23