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?



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

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



[Please log in to post a comment]