A86: Re: collisions
[Prev][Next][Index][Thread]
A86: Re: collisions
That would depend entirely upon where you found the code...
There is no standard code that I know of to check for collision....
It is based on the simple principle that you keep tack of where your
figure and the object is at all times and then have a place in the loop
that checks to see if they have collided.
What the code you posted seems to be is a routine to see if two pairs of
points will collide (I'm a beginner so I'm not entirely sure). Keeping
track of where your sprites are though is up to you...
Later,
Chris
On Sun, 9 May 1999 23:25:16 EDT BlAsTo1414@aol.com writes:
>
>could some one let me know whats going on in this procedure? i dont
>understand any of it :( where do I stick this in my code? after it
>draws
>the sprites? how does it know what sprites it is looking at for the
>collision?
>
>thanks,
>-=-=1414=-=-
>
>
>
>> ; bc = (x1,y1), de = (x2,y2)
>> ; returns: no carry = collision
>> CheckCollision:
>> ld a,d
>> add a,7
>> cp b
>> ret c
>> ld a,b
>> add a,7
>> cp d
>> ret c
>> ld a,e
>> add a,7
>> cp c
>> ret c
>> ld a,c
>> add a,7
>> cp e
>> ret
>
>
___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]
Follow-Ups:
References: