Log In  


Cart #loom-4 | 2025-09-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
28

Loom 1.3

A Laser-packed game, how long can you survive?
This game was made in two days. If anyone wants to make some good music then please do so, thanks.
You can pause to go to clean mode or enable quick death. Also you can reset your highscore.
My best is 65 seconds. I just updated the game, is it better with the more askew lasers?

Stages

Stages will be added to the game the more score you get. if you are at the very beginning, its easy.
But the longer you survive, the more things will be added to the game to make it harder.

  • Just lasers

  • Aim Lasers

  • Super Lasers & even more Aim Lasers

  • Cluster drop-Lasers & even even more Aim Lasers

  • ...

controls

  • arrow keys to move

  • player 2 can use esdf to move

Current Highscores

90s - ericb
65s - cheesemug
63s - SLIGHT681
60s - Hell_Cat
37s - joealarson
34 - 851523

those are the people who have the best time, I hope its fine that your name is here, if not please let me know.

Working on 1k vesion:

--loom
--cheesemug

function _init()

 players={}  
 lasers={}
 effects={}

 score,bg,cx,cy,dt,dtt,menuu=ups"0,0,0,0,0,0,true"

end

function _update()
 if not menuu then 
  gameu()
 end
end

function _draw()

 for i=1,1200 do
  circ(rnd(128),rnd(128),2,bg)
 end

 camera(cx,cy)

 pal(ups"15,130,1")
 pal(ups"15,128,1")

 --21
 local r=sin(time())+1
 rect(r,r,127-r,127-r,1)
 --rect(1,1,127,127,1)

 if menuu then 
  menu()
 else
  game()
 end

 dr(lasers)
 dr(effects)

 if #players<1 and not menuu then
  dtt=lerp(dtt,8)

  if dtt==8 then
   dt=lerp(dt,100)
   circfill(64,64,dt,15+dt/100)

   if dt==100 then
    ?"you survived "..score\1 .." seconds\^"..8,ups"20,50,8"
    best=max(score\1,best)
    _init()

   end
  end
 end

end

function menu()

 if btnp(❎) then
  for x=1,130,8 do
   laser(x,ups"55,50,2")
  end   
 end

 if #lasers!=0 then
  w=lerp(w,28)
  if lasers[1].dt<20 then
   menuu=false
   make_player(ups"24,24,0")
   make_player(ups"94,94,1")
  end
 else
  w=lerp(w,9)
 end

 ?ups"𝘢 𝘤𝘩𝘦𝘦𝘴𝘦𝘮𝘶𝘨 𝘱𝘳𝘰𝘥𝘶𝘤𝘵𝘪𝘰𝘯\nmade for 1k jam.,3,114,15"

 for i=1,9 do
  print("\^w\^t"..("- start -")[i],cos(t()+i/9)+(63-w*5)+i*(w),50+sin(t()+i/9)*2,8,2)
 end

end

function gameu()
 lt=lerp(lt,10)
 score+=0.03

 if rnd(10)>9.8-(score/40) and #lasers<75 and #players>0 and score>10 then
  local a=ceil(rnd(#players))
  aim(players[a].x,players[a].y)
 end

 if lt==10 then

  for z=1,rnd(5) do
   local pp,typ,sp,l=rnd(128),rnd{1,2},rnd(10)>9 and score>17,rnd(20)+40   
   for i=1,130,8 do
    laser(typ==2 and i or pp,typ==1 and i or pp,l,typ,sp)
   end

   if rnd(10)>3 and score>34 then 
    local x,y=rnd(128),rnd(128)
    for i=0,1,.25 do
     aim(x+cos(i)*4,y+sin(i)*4,9)
    end
   end

   lt=0
  end

 end

end

function game() 

 line(0+lt*6.4,0,128-lt*6.4,0,8)
 dr(players)

end 

function make_player(x,y,i)

 player={
  x=x, dx=0,
  y=y, dy=0,
  i=i, c=c,
  draw=function(o)   

   --42
   o.dx+=2*(tonum(btn(➡️,o.i))-tonum(btn(⬅️,o.i)))
   o.dy+=2*(tonum(btn(⬇️,o.i))-tonum(btn(⬆️,o.i)))

   o.dx*=.5
   o.dy*=.5

   move(o)

   o.x%=128
   o.y%=128

    --white
   crect(o.x,o.y,6,8,o.c1)  
   crect(o.x,o.y,8,6,o.c1) 
    --color
   crect(o.x,o.y,5,7,o.c)  
   crect(o.x,o.y,7,5,o.c)

   ?"..",o.x-3+o.dx,o.y-4+o.dy,1

   o.c=i+11
   o.c1=o.c

  end

 }

 par(x,y,0,0,10,1,i+11)

 add(players,player)

end

--functions ●

function rrnd(num)
 local num=num or 2
 return rnd(num) - num/2
end

function crect(x,y,w,h,c)
 rectfill(x+w/2,y+h/2,x-w/2,y-h/2,c)
end

function col(a,b,w,h)
 w,h=w or 8,h or w
 return abs(a.x-b.x)<w and abs(a.y-b.y)<h
end

function lerp(x,e,w)
 local x,w=x or 0,w or 10
 if(abs(x-e)<.05)return e
 return x+(e-x)/10 
end

function move(o)
 o.x+=o.dx
 o.y+=o.dy
end

function ups(str)
 return unpack(split(str))
end

function dr(t)
 for o in all(t) do
  o:draw()
 end
end

--lasers ▥

-- x,y, d=life/delay, dir=1 | dir=2 , w=warning? ,s=super laser
function laser(x,y,d,dir,s)
 las={
  x=x, y=y, dt=d, dx=0, dy=0, w=w or 1,
  draw=function(o)   

   o.dt-=1
   local si,c,c1,wc=ups"1,8,14,2"
   if(s)si,c,c1,wc=ups"2,10,7,10"

   if o.dt<d/2 then 

    crect(o.x,o.y,8*si+o.dt/4,8*si+o.dt/4,c)   

    if dir==1 then
     o.dx,o.dy=0,1

     line(o.x+2,o.y,o.x+2,o.y-8,c1)
     line(o.x+3,o.y,o.x+3,o.y-8,7)
    elseif dir==2 then
     o.dx,o.dy=1,0

     line(o.x,o.y+2,o.x-8,o.y+2,c1)
     line(o.x,o.y+3,o.x-8,o.y+3,7)   
    end

    if s then
     --sfx
    else
     --sfx
     par(o.x,o.y,rrnd(4),rrnd(4),5,1,c)
    end

    bg=s and 2 or 15   
    cx,cy=rrnd(),rrnd()
    cx*=.9
    cy*=.9

    for p in all(players) do

     if col(p,o,9*si,9*si) then
      del(players,p)

      local dir=rnd{-1,1}
      for i=1,5 do
       par(p.x,p.y,((rnd(7)+3)*o.dx+rrnd())*dir,((rnd(7)+3)*o.dy+rrnd())*dir,rnd(5)+5,rnd(.5)+1,p.c)
      end

     elseif col(p,o,16*si,16*si) then
      p.c1=7
     end

    end
   else

    if s then
     if(dir==1)?"!   !",o.x-9,o.y
     if(dir==2)?"- \|1-",o.x,o.y+5 
    end 
    line(o.x,o.y,o.x+7*tonum(dir==2),o.y+7*tonum(dir==1),wc)

    bg=0

   end

   if(o.dt<0)del(lasers,o)

  end

 }

 add(lasers,las)

end

function aim(x,y,c)

 add(lasers,{
  x=rnd{0,128}, ax=x-8, t=0,
  y=rnd{0,128}, ay=y-8, c=c or 8,
  draw=function(o)
   circ(o.x,o.y,8-o.t/10,o.c) fillp()

   o.x+=1+(o.ax-o.x)/8
   o.y+=1+(o.ay-o.y)/8
   o.t+=1

   if o.t>40 then
    rectfill(o.x-1,o.y-128,o.x+1,o.y)
    circ(o.x,o.y,12,7)
    del(lasers,o)
    laser(o.x,o.y,8)
   end
  end
 })

end

function par(x,y,dx,dy,t,dt,col)

 add(effects,{
  x=x,y=y,dx=dx,dy=dy,
  draw=function(o)  
   move(o)  
   t-=dt  
   if(t<0)del(effects,o)
   circfill(o.x,o.y,t,col)
  end
 })

end

Have fun and comment your best time :)

28


well done - nice effects!


1

really reminds me of undertale for some reason but very nice visuals ;)

34s


28 seconds - quite hard, but fun! I know that I read about that effect, but I don't remember exactly how it works.


37 seconds. I wonder if a minute is possible.


Yes, I recently had 65 seconds, thanks for playing.


1

(highscore is on the topleft)

this game is super fun! it was really intense when i got far enough into it. this would probably be even more fun with a friend, having each of us try to one-up the other :D

that said, it's kind of annoying how quick death and clean mode reset to "off" every time you lose and want to play again (i don't use the latter, but i do get annoyed by the former turning off)... another small thing is that you can't see how long the first player who died had survived, only the second player's. it'd be cool to compete over having the higher times with friends!

obviously, these are both small problems that don't affect the game that much; regardless of whether you end up dealing with those things or not, this is still great fun!


1

Congrats getting 63 seconds, im working on a update, with a few new things. I wanted to add the score for both players, but i just couldn't find a visually a good way to show both scores on the end screen. Also I will fix the reseting menustats, but why do you restart the game completly, you just need to wait a bit, then you get send to the main menu anyway


1

Fun game! I do find that when there are a lot of red lasers going off, it can sometimes be hard to see the dotted circles coming on screen and predict exactly when they're going to go off, so you kind of just need to keep moving. Tap dodging helps when you don't have a lot of space.


This game is amazing!
Pure art.


90 seconds, thats a achievement, well done!
You can toggle clean-Mode in the pause menu, it clears the screen nicely, removes screenshake and make the circles clear.


1

@cheesemug i didn't say anything about restarting the cart myself? it just reset the settings to off when it sends me to the menu. (i guess it doesn't really matter since you fixed it anyways)


1

Ohhhh thats what you meant, thanks for clearing it out. I even made it store the setting when the game is closed and opend again. thanks :)


that's great! i forgot that pico-8 lets you store your options, haha.
you're welcome!


1

nice


very th for this game and th for my reaction game


Really cool effects! I like the little highlights when you get close to a beam. Though I didn't manage to stay alive more than 32 seconds... Nice game!


39 seconds! (top left)


1

Nice, i added you to the leaderboard :)


I've got it to 60 now!


Added little improvements: preview line now flickers, added timer in-game (enable in the pause menu), improved the snake-border effect, improved the menu, improved pause menu.


Quick death keeps resetting for me, even without exiting or resetting the cart.



[Please log in to post a comment]