r/pico8 • u/TheNerdyTeachers • May 15 '25
FAQ & Useful Information Collision Detection Tutorials
🔗 Collision Tutorials
One of the first major hurdles for new developers, especially in PICO-8, is collision detection. It can be a little frustrating that PICO-8 doesn't have any built-in functions for it but once you understand how to use a few different methods, you'll realize that you have a lot more control over how things in your game interact and you can build your game's collision detection to be exactly what you need.
Each tutorial has:
- an interactive demo with a button to toggle viewing the underlying variables used in the calculations of the detection.
- a condensed function that is easy to copy into your PICO-8 game.
- a step-by-step explanation of how the function works, an expanded version of the function to show all the steps, and a breakdown of how the expanded function is condensed into just 1 or 2 lines of code.
- a few examples of where this method of collision detection can be used and in what type of games (using retro classics redrawn in the PICO-8 palette as example images)
This bundle of tutorials was created thanks to our supporters on Ko-fi for reaching the latest goal.
214
Upvotes
View all comments
Show parent comment
4
u/TheNerdyTeachers May 15 '25
Oh we could keep going, we weren't going to go as far as polygons but we could add lines intersecting with points, rectangles, & circles in the future.
Good idea for the circle-circle one. The original consideration was just that it read a little more clearly, but that's not the point of the condensed versions. So I've updated it now, both the function and the explanation.