"Ahh, this is the life." Sipping on a frosted glass of bug juice, Minimalizard sat back in his tiny lawn chair, soaking up some much-deserved rays of sunlight. He'd spent the whole morning obsessively tidying his minimalistic home ... sweeping up dirt, throwing out trash, and generally cleansing his life of excess.
But suddenly, a shadow fell over his yard. Minimalizard removed his sunglasses in disbelief. "What the ..."
Hundreds of brightly-colored crates loomed in the sky above, plummeting toward his house. They'd almost certainly rearrange his decor - and not a good way.
"Not if I have anything to do with it!" Minimalizard gulped down the rest of his drink and hopped nimbly from his chair. It wasn't going to be easy, but if he had to punch, stomp and shoot every crate from the sky himself, he'd do it.
"Because I ... am ... MINIMALIZARD!"

Robo-Carnie's ship crashed en route to the Intergalactic Ferris Wheel Convention! After the smoke and dust cleared, Robo-Carnie recognized the planet as QUACK-83, a charted-but-unsettled planet inhabited only by ducks! Luckily, the ship's money-generating carnival bell survived the fall, but it'll take a lot of hard work to raise the money for a new ship. So hop to it! And watch out for those ducks ... they're helpful enough, but they bite!











Melon Bear is a neurotic bear, possessed by an all-consuming desire to devour sentient melons. Eat as many melons as you can while managing your Rage Meter to control your speed, but don't forget to avoid enemy bears and the extra-dangerous Melon Wyrm! Can you survive long enough to capture the legendary Golden Melon?

Hi! I'm attempting to build my first game using PICO-8 and am having some trouble with finding an online tutorial for this specific issue.
I'm looking for a simple function that will help make a defined object spawn periodically according to a timer. I've created a moving sprite and a frame counter that counts to 600 and repeats, and I'd like to have a specific enemy spawn on frame 600, instead of just spawning at the RUN command. Any suggestions?
I've included my code below, but it's admittedly very messy, as this is my first experience with programming outside of HTML. Also, if it's out of line to just hop on the forum and start pleading for help, let me know too! :P
[box=ffeedd]--nessie
player={}
player.x=64
player.y=64
player.sprite=1
player.speed=1
--redbads
redbad={}
redbad.x=flr(rnd(128))
redbad.y=flr(rnd(128))
redbad.sprite=6
--bluebads
bluebad={}
bluebad.x=flr(rnd(128))
bluebad.y=flr(rnd(128))
bluebad.xdir=4
bluebad.ydir=4
bluebad.sprite=5
--timer
frame={}
frame.count=0
--spawncount
spawn={}
spawn.count=0
function _move()
if btn(0) then
player.x-=2
elseif btn(1) then
player.x+=2
elseif btn(2) then
player.y-=2
elseif btn(3) then
player.y+=2
end
end
function _direction()
if btn(0) and
player.sprite<3 then
player.sprite+=2
elseif btn(1) and
player.sprite>2 then
player.sprite-=2
end
end
function _screenedge()
if player.x<0 then
player.x+=4
elseif player.x>120 then
player.x-=4
elseif player.y<0 then
player.y+=4
elseif player.y>120 then
player.y-=4
end
end
function _dive()
if btn(4) and
player.sprite==1 then
player.sprite+=1
elseif btn(4) and
player.sprite==3 then
player.sprite+=1
end
end
function _surface()
if btn(5) and
player.sprite==2 then
player.sprite-=1
elseif btn(5) and
player.sprite==4 then
player.sprite-=1
end
end
function _redchase()
if (frame.count%2==0) then
if (redbad.x-player.x)>0 then
redbad.x-=1
elseif (redbad.x-player.x)<0 then
redbad.x+=1
end
if (redbad.y-player.y)>0 then
redbad.y-=1
elseif (redbad.y-player.y)<0 then
redbad.y+=1
end
end
end
function _timer()
if frame.count<60 then frame.count+=1
else frame.count-=61
end
end
function _spawncount()
if spawn.count<600 then spawn.count+=1
else spawn.count-=601
end
end
function _bluedice()
if frame.count==30 then
if (flr(rnd(128)))>(flr(rnd(128))) then
bluebad.xdir-=2
if bluebad.xdir==0
then bluebad.xdir+=4
end
end
if (flr(rnd(128)))>(flr(rnd(128))) then
bluebad.ydir-=2
if bluebad.ydir==0
then bluebad.ydir+=4
end
end
end
end
function _bluemove()
if (frame.count%2==0) then
if bluebad.xdir==4 then
bluebad.x+=1
else bluebad.x-=1
end
if bluebad.ydir==4 then
bluebad.y+=1
else bluebad.y-=1
end
if bluebad.x<0 then
bluebad.xdir+=2
elseif bluebad.x>120 then
bluebad.xdir-=2
elseif bluebad.y<0 then
bluebad.ydir+=2
elseif bluebad.y>120 then
bluebad.ydir-=2
end
end
end
function _update()
_move()
_dive()
_surface()
_screenedge()
_direction()
_redchase()
_bluedice()
_bluemove()
_timer()
_spawncount()
end
function _draw()
cls()
--clear the screen
rectfill(0,0,128,128,1)
--draw nessie
spr(player.sprite,player.x,player.y)
--draw redbad
spr(redbad.sprite,redbad.x,redbad.y)
--draw bluebad
spr(bluebad.sprite,bluebad.x,bluebad.y)
--draw framecount (del later)
print(frame.count,12,6,15)
--draw spawncount (del later)
print(spawn.count,25,6,15)
end

