Log In  

Cart #wetipaheti-3 | 2024-05-21 | Code ▽ | Embed ▽ | No License

I've been trying to place objects in a circle using angles, but for some reason it's never a perfect circle. Is there a way to make it perfect somehow?

P#148762 2024-05-21 09:34

1

Pico-8 draw coordinates work with integers and the fractional part is discarded
pset(3,3) does the same as pset(3.99,3.99)
?'.',3,3,1
does the same as
?'.',3.99,3.99,1
This is this truncation that messes with your circles.
to get a rounding to the nearest pixel just add 0.5 to your x and y. The truncated value will be the nearest possible pixel

for p in all(point) do
?'.',p.x+.5,p.y+.5,1
end
P#148769 2024-05-21 13:12

that really did the trick! thank you so much @RealShadowCaster!!!

P#148802 2024-05-22 11:06

[Please log in to post a comment]