EasyManua.ls Logo

Commodore Amiga - Collision Detection; How Collisions Are Determined; How to Interpret the Collision Data

Commodore Amiga
321 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Collision
Detection
You can use the hardware
to
detect collisions between one sprite group and another
sprite group, any sprite group and either of the playfields, the two playfields, or any
combination of these items.
The first kind of collision is typically used
in
a game operation to determine if a missile
has collided with a moving player. The second kind of collision is typically used
to
keep
a moving object within specified on-screen boundaries. The third kind of collision detec-
tion allows you
to
define sections of playfield as individual objects, which you may move
using the blitter. This is called playfield animation.
If
one playfield is defined as the
backdrop or playing area and the other play
field
is used to define objects (in addition to
the sprites), you can sense collisions between the playfield-objects and the sprites or
between the playfield-objects and the other playfield.
HOW
COLLISIONS
ARE
DETERMINED
The video
output
is
formed when the input
data
from all of the bit-planes and the
sprites is combined into a common
data
stream for the display. For each of the pixel
positions on the screen, the color of the highest priority object is displayed. Collisions
are detected when two or more objects
attempt
to overlap
in
the same pixel position.
This will set a bit in the collision
data
register.
HOW
TO
INTERPRET
THE
COLLISION
DATA
The
collision
data
register, CLXDAT, is read-only, and its contents are automatically
cleared
to
0 after
it
is read. Its bits are as shown. in table 7-3.
202
System Control Hardware

Table of Contents

Other manuals for Commodore Amiga

Related product manuals