Collision detection: Difference between revisions

Content deleted Content added
A posteriori (discrete) versus a priori (continuous): added TONE template, usage of "we" looks like it was copied directly from it's source article.
Tags: Mobile edit Mobile app edit Android app edit
Video games: add Amiga source for hardware collision detection
Line 121:
Video games have to split their very limited computing time between several tasks. Despite this resource limit, and the use of relatively primitive collision detection algorithms, programmers have been able to create believable, if inexact, systems for use in games {{Citation needed|date=August 2014}}.
 
For a long time, video games had a very limited number of objects to treat, and so checking all pairs was not a problem. In two-dimensional games, in some cases, the hardware was able to efficiently detect and report overlapping pixels between [[sprite (computer graphics)|sprite]]s on the screen.<ref>{{Cite web|url=http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0004.html#line95|title=Components of the Amiga: The MC68000 and the Amiga Custom Chips|last=|first=|date=|website=|series=|at=Chapter 1|type=Reference manual|archive-url=https://web.archive.org/web/20180717093216id_/http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node0004.html#line95|archive-date=2018-07-17|dead-url=no|access-date=2018-07-17|quote=Additionally, you can use system hardware to detect collisions between objects and have your program react to such collisions.|edition=2.1}}</ref> In other cases, simply tiling the screen and binding each ''sprite'' into the tiles it overlaps provides sufficient pruning, and for pairwise checks, bounding rectangles or circles called [[hitbox]]es are used and deemed sufficiently accurate.
 
Three-dimensional games have used spatial partitioning methods for <math>n</math>-body pruning, and for a long time used one or a few spheres per actual 3D object for pairwise checks. Exact checks are very rare, except in games attempting to [[Simulation game|simulate]] reality closely. Even then, exact checks are not necessarily used in all cases.