Radar Display
Uses the PICO-8 Math and T libraries.
#include ./math.lua
#include ./t.lua
function _init()
beam = vec2(0,-1)
blip = vec2(80,64)
t_every(1/60, rot_beam)
t_every(1, move_blip)
end
function rot_beam()
beam:rot(d2r(-6))
end
function move_blip()
blip:add(0, 1)
end
function _update()
t_step()
end
function _draw()
cls()
circfill(64,64,50,1)
local x, y = blip:unpack()
rectfill(x-1, y-1, x+1, y+1, 7)
x, y = beam:clone():mul(48):add(64,64):unpack()
line(64, 64, x, y, 12)
end