Log In  
Follow
AtomicPico

Cart #collisionsp8-0 | 2025-05-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

2 comments



hey guys, can you please explain the hit function in my code. I used a tutorial for it but i want to understand it.

x = 63
y = 35
dx = 0
dy = 0
grid_x = 0
grid_y = 0
map_tile = 0
flag_tile = 0
function _update()
dx = 0
dy = 0
grid_x = flr(x/8)
grid_y = flr(y/8)
flag_tile = fget(mget(grid_x,grid_y))
if btn(⬅️) then dx = -1 end
if btn(➡️) then dx = 1 end
if btn(⬆️) then dy = -1 end
if btn(⬇️) then dy = 1 end
if hit(x+dx,y,7,7) then
dx = 0
end
if hit(x,y+dy,7,7) then
dy = 0
end
x += dx
y += dy
end
function _draw()
cls()
map(0,0,0,0,16,16)
spr(2,x,y)
end
function hit(x,y,w,h)
collide = false
for i=x,x+w,w do
if fget(mget(i/8,y/8))>0 or
fget(mget(i/8,(y+h)/8))>0 then
collide = true
end
end
return collide
end

4 comments



Cart #picopongg-1 | 2025-05-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

pong go brrrrrr (dani)

0 comments



Cart #picosnakeeee-1 | 2025-05-12 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

a super hard snake game thats ment to make you play for hours, second pico 8 game.

2
6 comments



Cart #picoshooter-1 | 2025-05-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

this is my first finished game! its not much, but im very happy with it.

CONTROLS:

X = shoot

left arrow key = left

right arrow key = right

Thanks for playing!

3
1 comment



Cart #shooter1-0 | 2025-05-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

This is going to become a really polished shooter game in the future, I am posting it now so I can have some feedback.

left and right keys to move, x to shoot

1
0 comments