Changes

Jump to: navigation, search

6502 Math and Strings Lab

10 bytes added, 10:25, 15 September 2022
Techniques
**** These values can simply be -1 or +1 if the object is going to bounce at 45-degree angles.
**** These values will need to include a fractional component for angles other than 45 degrees. This can be handled by using two bytes for each element of the X,Y position and for the deltaX and deltaY values, where one byte represents the integer portion and one byte represents the fractional portion (fixed-point representation).
** Detect when the object has collided with the edge of the screen or other objects, and reverse the sign of the deltaX or deltaY value (or both). For example, when bouncing off the top or bottom of the display, set <code>deltaX deltaY = -deltaXdeltaY</code>
* Keyboard

Navigation menu