I Haz Codes
When dealing with edge detection you must manually add it to your programs. Pygame does offer collision detection, which will be covered later, but simple screen boundary checks can be done using 2 if statements. By adding the x and y speeds (shown as dx and dy), you can easily manipulate them by reversing the sign (multiply by -1).
Leave a Reply