INSTRUCTIONS

Follow me? See if you can keep up with this sequencing game of colors and sound. How much memory can you store? This game was made for the PICO1K Game Jam, where the goal is to create a PICO-8 game in under 1KB of compressed memory.

CONTROLS

  • LEFT ARROW = Left Square
  • RIGHT ARROW = Right Square
  • UP ARROW = Top Square
  • DOWN ARROW = Bottom Square
  • Z (or O button) = Center Square
  • X = Start/Restart Game
Download PICO-8 Cartridge

DEVLOG

Lua PICO-8

For the 2023 PICO1K Game Jam, I decided to pay homage to the classic Simon electronic game - with a twist. A fifth square is added to the center of my game where an additional key/button is required to match the center color. The game jam requires that all entries must be less than or equal to 1024 (1K) compressed bytes of code. Only code can be used to create the game, tool, art, or interactive experience. Pre-defined PICO-8 data is not allowed, including pre-created sprites, map, sounds, or external files.

Developers had a month to work on their game jam entries. Over the course of five days during the month, I was able to develop this tiny game. I used an amazing PICO-8 compression visualizer tool, PXAVIZ, created by carlc27843. This slick tool let's you visually analyze the code that's easy to compress versus code bytes that are not reused often and can't be compressed. After my final iteration of developing the game, I was able to get my code for Follow Me? down to 971 compressed bytes. I'm sure there's more PICO-8 coding tricks that might compress it even more, but I met my goal for this fun game jam.

-- you follow?
-- by m4ttbit

l={8,12,11,10,9}
bt=true
function clr()
  for z in all(s) do
  z.show=false
 end
 n=true
end
function snd()
 if en then
  print '\abdf'
  print '\aace'
  else
   for z in all(s) do
    if z.show then
      u=z.pos
     if u==1 then
         print '\ac'
        elseif u==2 then
         print '\ad'
        elseif u==3 then
         print '\ae'
        elseif u==4 then
         print '\af'
        elseif u==5 then
         print '\ag'
        end
      end
    end
  end
end
function rst()
  i+=1
  cl=1
 n=false
end
function _init()
 s={}
 p={}
 cl=1
 st=7
 t=1
 id=1
 n=true
 en=false
 comp=true
 ad=false
 for i=48,72,12 do
   z={pos=t,x=i,y=60,a=i+8,b=68,c=7,oc=l[t],show=false}
  add(s,z)
  t+=1
 end
  for i=48,72,24 do
  z={pos=t,x=60,y=i,a=68,b=i+8,c=7,oc=l[t],show=false}
   add(s,z)
   t+=1
  end
end
function _update()
 if en then
  pt='game over'
  pr='press x to play again'
  if cl%30==0 then
   clr()
  else
   cl+=1
  end
  if btn(5) then
   _init()
  end
 elseif bt then
  pt='you follow?'
  tr='pico1k game by m4ttbit'
  pr='press x to start'
  if btn(5) then
   bt=false
  end
 else
   if cl%20==0 and comp and n then
    pt='my turn'
    tr='score: '..#p
    pr=''
    bt=false
     if ad and i<=#p then
      id=p[i]
      s[id].show=true
      snd()
      i+=1
      cl=1
      n=false
      else
      rn=flr(rnd(5))+1
      for z in all(s) do
      if z.pos==rn then
      z.show=true
      snd()
      add(p,z.pos)
      n=false
      i=1
      cl=1
      comp=false
      end
      end
      end
      end
      if comp and n==false and cl%10==0 then
      clr()
      end
      if comp==false and n then
      pt='your turn'
      if i>#p then
      comp=true
      cl=1
      i=1
      ad=true
     else
      if cl%100==0 then
       en=true
       snd()
      end
      if btnp(0) then
       s[1].show=true
        snd()
        if p[i]==1 then
         rst()
        else
         en=true
         snd()
        end
      end
      if btn(1) then
       s[3].show=true
       snd()
        if p[i]==3 then
         rst()
        else
         en=true
         snd()
        end
      end
      if btn(2) then
       s[4].show=true
       snd()
       if p[i]==4 then
         rst()
        else
         en=true
         snd()
        end
      end
      if btn(3) then
       s[5].show=true
       snd()
       if p[i]==5 then
         rst()
        else
         en=true
         snd()
        end
      end
      if btn(4) then
       s[2].show=true
       snd()
       if p[i]==2 then
         rst()
        else
         en=true
         snd()
          end
      end
    end
   end
   if comp==false and n==false and cl%10==0 then
    clr()
   end
   cl+=1
  end
end
function _draw()
  cls()
  for z in all(s) do
   if z.show then
     rectfill(z.x,z.y,z.a,z.b,z.oc)
    else
      rectfill(z.x,z.y,z.a,z.b,z.c)
    end
  end
  print(pt,64-#pt*2,32,7)
 print(tr,64-#tr*2,96,7)
 print(pr,64-#pr*2,104,7)
end

COMMENTS