Learn how to handle collisions in Pygame using the different collision types such as rectangles, points and lines.
Category: Pygame
![](http://www.codingwithruss.com/wp-content/uploads/2023/02/Thumb-5.png)
Why Use Rectangles? One of the key concepts in pygame is working with rectangles. They allow you to position and
![](http://www.codingwithruss.com/wp-content/uploads/2023/02/THUMB-4.png)
Introduction To Shapes Typically a pygame project will contain images and spritesheets, but for simpler shapes we can use the
![](http://www.codingwithruss.com/wp-content/uploads/2023/02/thumb-3.png)
Creating A Helper Function Pygame doesn’t have built in functionality for drawing text, this is something we have to add
![](http://www.codingwithruss.com/wp-content/uploads/2023/02/THUMB-2.png)
Mouse Input Options Just like keyboard input, there are two different ways to get mouse input: Using the event handler
![](http://www.codingwithruss.com/wp-content/uploads/2023/02/THUMB-1.png)
Keyboard Input Options There are two different ways of getting keyboard input in pygame: Using the event handler Using the
![](http://www.codingwithruss.com/wp-content/uploads/2023/02/thumb_2.png)
Introduction To Events In pygame when working with keyboard or mouse inputs we talk about an event handler, but what
![pygame in 10 mins](http://www.codingwithruss.com/wp-content/uploads/2023/02/Thumb.png)
Install Pygame Requirements: Python & pip installed from python.org The easiest way to install pygame is through the command prompt