Commodore 64 Uživatelský manuál Strana 46

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 83
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 45
SPRITE DISPLAY PRIORITIES
Sprites have-the ability to cross each other's paths, as well as cross in
front of, or behind other objects on the screen. This can give you a truly
three dimensional effect for games.
Sprite to sprite priority is fixed. That means that sprite 0 has the high-
est priority, sprite 1 has the next priority, and so on, until we get to
sprite 7, which has the lowest priority. In other words, if sprite 1 and
sprite 6 are positioned so that they cross each other, sprite 1 will be in
front of sprite 6.
So when you're planning which sprites will appear to be in the fore-
ground of the picture, they must be assigned lower sprite numbers than
those sprites you want to put towards the back of the scene. Those
sprites will be given higher sprite numbers.
NOTE: A "window" effect is possible. If a sprite with higher priority has "holes" in it
(areas where the dots are not set to 1 and thus turned ON), the sprite- with the lower
priority will show through. This also happens with sprite and background data.
Sprite to background priority is controllable by the SPRITE-BACK-
GROUND priority register located at 53275 ($DOIB). Each sprite has a
bit in this register. If that bit is 0, that sprite has a higher priority than
the background on the screen. In other words, the sprite appears in
front of background data. If that bit is aI, that sprite has a lower
priority than the background. Then the sprite appears behind the back-
ground data.
COLLISION DETECTS
One of the more interesting aspects of the VIC-II chip is its collision
detection abilities. Collisions can be detected between sprites, or be-
tween sprites and background data. A collision occurs when a non-zero
part of a sprite overlaps a non-zero portion of another sprite or char-
acters on the screen.
144 PROGRAMMINGGRAPHICS
Zobrazit stránku 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 82 83

Komentáře k této Příručce

Žádné komentáře