Log In  

In new to Pico-8 so maybe you can tell me if I'm doing something wrong.

In the code below, the sprite and the squares render just fine, but the circles only appear when the camera offset is exactly 0,0(whether by calling camera() or camera(0,0) or by never changing it).

The manual doesn't mention any incompatibilities between circfill() and camera()

I'm using Pico-8 0.1.0 for windows

pico-8 cartridge // http://www.pico-8.com
version 4
__lua__
-- noid by noid
-- s a r a c a t u n g a

local x=0
local i=0

local u=64
local v=64

sfx(0)
--music(0)

local function _update()
 x = flr(59*sin(time()))
 y = flr(59*cos(time()))
 if (i<15) then i += 1
 else i=0 end

 if (btn(0)) then u=u-1 end
 if (btn(1)) then u=u+1 end
 if (btn(2)) then v=v-1 end
 if (btn(3)) then v=v+1 end

end

local function _draw()
 cls()
 camera(u-64,v-64)
 rectfill(0,0,128,128,13)
 rectfill(x+u,y+v,x+u+10,y+v+10,i)
 circfill(x+u,y+v,5,i)
 spr(i,x/2+u,y/2+v)
 circfill(u-x/2+x/4+4,v+y/2+y/4+4,2,2)

end
P#10110 2015-04-22 16:10 ( Edited 2015-04-22 20:13)


[Please log in to post a comment]