User Tools

Site Tools


base:simple_hardware_sprite_to_sprite_collision
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


base:simple_hardware_sprite_to_sprite_collision [2015-04-17 04:33] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +==== Sprite/Sprite hardware collision ====
  
 +One of the most easiest methods to make the player sprite collide into sprite 2 or higher is by using a simple hardware collision. This is triggered by using $D01E. Unfortunately with most games these days, $D01E is very useless, therefore a software collision is used. Anyway, if you wish to use a sprite/sprite collision using hardware pokes, then here is how it works.
 +
 +<code>  
 +          LDA $D01E ;Read hardware sprite/sprite collision
 +          LSR       ; (LSR A for TASM users) Collision for sprite 1
 +          BCC HIT
 +          RTS       ;No collision
 +HIT       INC $D020
 +          JMP HIT
 +</code>
 +
 +
 +This source above shows that if the very first sprite hits any other sprite, the border will flash
 +
 +
 +If you want the next sprite to read hardware collision to other sprites just add another LSR, etc. 
base/simple_hardware_sprite_to_sprite_collision.txt · Last modified: 2015-04-17 04:33 by 127.0.0.1