Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Pico 8 collision.

A topic by LebbyFoxx created Nov 14, 2019 Views: 272 Replies: 3
Viewing posts 1 to 2
Submitted

Hello all.

I am asking for help with collision. since these games are very small, how do I go about adding collisions? Just between two objects, and that when they collide the game ends?

Thank you for your time.

-LebbyFoxx

HostSubmitted(+1)

Hi LebbyFoxx! In a normal PICO-8 game, I'd use a function for rectangular collisions, but for Tweetcarts, I use pget(x,y). Pget grabs the color of pixel at x,y and returns it. So if you're colliding with a red object, check if pget(x,y) == 8. If so, end the game. If not, continue! :)

Submitted(+1)

Thank you so much! I have been stuck on this issue and I really appreciate the help! :)

Submitted(+1)

i figured this out of my second tweetcart and i'll use your method from now on, thanks :D