This is a simple example on how circle collision works.
All you need from this cartridge is the function:
function circ_col(c1, c2) local dx = c1.pos.x - c2.pos.x local dy = c1.pos.y - c2.pos.y local distance = sqrt(dx*dx + dy*dy) return distance <= (c1.r + c2.r) end |
If you want to check if two circles are colliding, you simply pass them as parameters c1 and c2 see an example bellow:
c1 = { pos={x=64,y=64}, r = 4 --size the radius would have to be for a 8x8 sprite } c2 = { pos={x=70,y=70}, r = 8 --size the radius would have to be for a 8x8 sprite } collides = false function _update() collides = circ_col(c1, c2) end function _draw() cls() if collides then print("colliding",4,4,11) end --draw the circles here - mind you in most projects you woudn't, usually you would have them invisible and have them --at the same position (or slightly offsetted) as your player --i would recommend drawing them anyway at the start to see that the are always where they are supposed to be circ(c1.pos.x,c2.pos.y,c1.r,11) circ(c2.pos.x,c2.pos.y,c2.r,8) end function circ_col(c1, c2) local dx = c1.pos.x - c2.pos.x local dy = c1.pos.y - c2.pos.y local distance = sqrt(dx*dx + dy*dy) return distance <= (c1.r + c2.r) end |



A handy timer for a class I will hold on pico8. Screensaver in the Background is not by me but by: @Fortyseven
# A dicy boss fight
Oh no! All the bosses of our past video games have decided to fight us :S Please help us defeating them!
how to play:
Roll the dice to fight each boss. The damage dealt depends on the dice results. You can re-roll a few dice per round. But beware, the opponent does the same! After defeating the boss, you can swap one die with the opponent. There are different dice, try to collect the best ones! Roll combos to get bonuses.
controls:
- x: X on keyboard
- o: C on keyboard
- use arrow keys to select dice and options
about:
- made in about 24h for the GMTK Jam 2022
- made with pico-8
- made by saturn91 and EinsteinsErbe




This is an example for an easy to use particle system.
to use it in your own cartridge do the following: copy the code in tab1 into one of your code tabs
Use it in the project as follows:
function _init() init_particles() end function _update() update_particles() if btnp(🅾️) then particle_burst( {x=63, y=63}, //pos on screen 10, //num of particels 2, //life time (in sec) 0, //form 0=rnd 1=pixel,2=circles,3=rect 2, //size 3, //color 2 //speed of particles ) end end function _draw() cls() draw_particles() print("press 🅾️ for burst", 32, 40, 7) [ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=98894#p) |
The Game
You are one of the devils many servant and have to feed him in time. And your workshedule is litarly hell!! Can you make it trough your shift?
How to Play
It is a combination of cocking and Platforming. You can beat the 20 Levels one after an other or in a pretty challenging Speedrun mode.
You start with 3 Health, if you get damaged you can refill your health by eating some of the food, but the Master does not like this :D.
Details
This is the Release version of my Game Devil's Kitchen :D I programmed it on and off between february 2021 and Mai 2021. The deepest barebone mechanics are loosly based on this Video by the youtuber
