0,]']±>S™}WÿÍu@48·d%qy)6o;]ÉA¦öÊ¥�ôôôYUUVl†333UUPUUPµ[Pº«P»»P[µP5SUUDD@DD@´K@·{@»»K´äN@ÝÝÐ½Û ½»»Û½¾ëÛ½»»Û½»»ÛÛ½° DD@´K@»»@¸‹@»»@+²@»»@° 330C40DD0Gt0DD0$B0@@ÝÝÐ½Û Ý»»ÝÝ·{ÝÝ»»ÝÝë¾Ýа а ÝÝÐÝÝ Ðµ[ PWuе[ Ð+² »»° îîàNäàDDàI”àDDîAîîNäîîNäîÝÝÐµÛ ½[»Û½¾UU½»UÛ½»»ÛÛ½° """ """ »+"°·{"°»» °»» {·»»ÿÿðÿÿÿð3ÿÿ07sÿ033ÿ033ÿ0ƒ8ó33""°»» Ð½Û }ÝÝ×Ð½Û °»» {·° »»°»» °»» °¸‹ °»» °»» 0ë¾0³;ÌÌÀÌÌ ˆˆ€ˆˆ€ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆff`ff`ffffffffffffffffffffffîîàîîàîîîîîîîîîîîîîîîîîîîîîîwwpwwpwwwwwwwwwwwwwwwwwwwwww"" "" """"""""""""""""""""""ÝÝÐÝÝ ÐÝÝ ÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÌÝÝÌUUPUUPUUUUUUUUUUUUUUUUUUUUUU™™�™™ �™™ ™™™™™™™™™™™™™™™™™™™™ªª ªª  ªª ªªªªªªªªªªªªªªªªªªªªÝÝUÝÝUUÝÝUÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝÝݪªðÿÿðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿªÿÿª™™�™™ �™™ ™™™™™™™™™™™™™™™™™™™™ffpffpwwffffffffffffffffffff"" "" %%""""RRRR""""%%%%""""NBBâ/$$ôïþïþïîîþÿÿÿÿÀ À @@ $B@   À À À À @@ÀÌÌ ÌÌÀ À À À @DDDD@@@ÌÌÀ ÀÁ ÁÁÁÀ À À À À À À À À À À ÀÀ À À À `dF@```À ÀÀ À À À À À À À À À À À ÀDD�™™ ™™� � �  ""   "  """ "PQRSTUVW ! # p ` ` ` P P @ 0   ð à à à Ð À À °   � � € € € € €0012345678899:;<<==>>???????>>V 5  012P2034°5 6 7°7À8à8p9@999 :À:ð: :;P;;`;0;ð;Ð;À;à;ð;ð A00P000PP P^ePˆ1111�ˆQˆQ 0PPP 0PPPpp6c�`‹1 1‹1 1†1Q1Q pp pp qq qq pp p]ep�1 1 1 1 1 1  1PòòòòýPPPppppp]e��1 1 1 1MD1 @1  1­QQQq¥qq§qq]eQtPppPpp P p p P p p P p p P p p P P P P P Pt³ b “ ³³ ³³PœI³e�p�pqq…qHr(È0”Î.@ˆ�H  ´.DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDÿÿ/DDDDDDDDDDDDDDDDDDDDDDîþÿÿÿÿÿÿî/BDDDDDDDDDDDDDDDDDDDDDîîîîîîîîî/BDDDDDDDDDDDDDDDDDDˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆDDDDDˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆDDDDˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆDDD„ˆˆÈŒÈÈÈÌÀ€ŒÌ Œ Ȉˆˆˆˆˆˆˆˆˆˆˆ8DD„ˆˆ ÀÈÀÀÈ È€ ÌÀ€ˆˆˆˆˆˆˆˆˆˆˆ8DD„ˆˆ ÈÀÀÀ ÈÀ È€ Ì€ˆˆˆˆˆˆˆˆˆˆˆ8DD„ˆˆ ÌÀÀÀ€È È€ È€ˆˆˆˆˆˆˆˆˆˆˆ8DD„ˆˆÈÌÀÌÀÌÀ€ È€ È€ˆˆˆˆˆˆˆˆˆˆˆ8DD„ˆˆˆ€€€€€€ˆˆˆˆˆˆˆˆˆˆˆ8DD„ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ8DD„ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ ˆˆˆˆˆˆˆ8DD„ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆÈÀ€ˆˆˆˆˆˆˆ8DD„ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆŒˆˆˆˆ8DD„ˆˆˆˆˆˆÈÌÀÌȈÈÌÈÌÈÌÈ€ŒÈ€ Ì€ˆˆ8DD„ˆˆˆˆˆˆˆ ÈÀÀ€ÈÀÀÀÀÀ  ˆˆˆ8DD„ˆˆˆˆˆˆˆ ÈÌÀ€ÈÌÀÌÀ ÈÀ ˆÌ€ˆˆ8DD„ˆˆˆˆˆˆˆ ÈÀÀ€ÈÀÀÈÈ€ ˆÀ€ˆˆ8DD„ˆˆˆˆˆˆÌ ÈÀÀÌÀÀÀ€ÈÌÀ€ Ȉ̀ˆˆ8DDDˆˆˆˆˆˆˆ€€€€ˆ€€€ˆ€ˆˆCDDDˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆCDDD3ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ3DDDD4333ÿÿÿÿÿÿÿÿÿ3333333333333DDDDDDDDD®êîîîîîîî/BDDDDDDDDDDDDDDDDDDDDD®îîîîîîîî/"DDDDDDDDDDDDDDDDDDDDäîîîîîîîîîþRBDDDDDDDDDDDDDDDDDDD.îîîîîîîîî"/"DDDDDDDDDDDDDDDDDDä"""îîîîî.""ò"DDDDDDDDDDDDDDDDDD.""""""""""%/BDDDDDDDDDDDDDDDDä"""""%"""""""ò"DDDDDDDDDDâìÂDDD.""""""""""""""/BDDDDDDDDì"îâUUå""R"""""""""!""ò"UUUUUUUåî."âUU."""""""""%"""!"/RUUUUUU,îî"îUå"""r"$""""""""""òRUUUUUå.âî"îUå"""""""""%"""""""òRUUUUUåîâî.îUå"""""""""""""""Rò"UUUUUì..î.îUå3""""""""""%"""""ó"UUUUUîâîâªêUå3#"""""""""""îî%3ó"UUUUîîî® ªUå333333333333ãNä^3ó"UUUUUå31333333333ãDD^3ó"UUUUUU"""""Uå313331313ãI”^3ó"UUUUUUUUU""Uå313111113111ãDD^3ó+UUUUUUUUUU%Uå31331113111îAî5ó"UUUUUUUUUUUUå31111111111îNäî5ó"UUUUUUUUUUUUå33311333îNäî5ó"UUUUUUUUUUUUå3333333333333DD53ó"UUUUUUUUUUUUå333333333333£ÌÌZ3ó"UUUUUUUUUUUUå33333333333ÊÌ̬5ó"RUUUUUUUUUUUå333133ªÌ̪5ó"RUUUUUUUUUUUå331333ªÊ¬ª5óâ"UUUUUUUUUUUå33313ªÊ¬ª5ó"""UUUUUUUUUUå21333ªÊ¬ª5ò""""UUUUUUUUUå"3333ªÊ¬:"_%""UUUUUUUUUU."2333333333ªÊ<"òUU""""UUUUUUUUUå.","'"""R"""%ò_UU"""""UUUUUUUUUå."""""""""²"ò_UU%"""""RUUUUUUUUUå.!""""""%ò_UUU%²"""""UUUUUUUUUUõÿÿÿÿÿÿÿÿÿ_UUUUU""""r"UUUUUUUUUUUUUUUUUUUUUUUUU%"R"""RUUUUUUUUUUUUUUUUUUUUUUUU%""""UUUUUUUUî&-- title: Crowd Sauce -- author: paulr(paul59/mr_happy) -- --Crowd Sauce -- --Made for the Low Rez game jam, August 2021 --Copyright Paul Robinson 2021. -- -- --In the near future, climate change and over-population have increased pressure on food supply, calling for drastic measures. In a cunning bid to solve both problems simultaneously, governments around the world are discretely funneling travelers from airport queues into a different kind of departure lounge! --As a processing facility operative, your task is simply to control the circular saw and ensure that the required ingredients for the world's favourite range of sauces is efficiently harvested. -- -- --Gameplay: -- --Move the circular saw left, right and between rows to hone in on the required 'ingredient'. --Complete as many recipes as you can before your shift ends (green timer bar). A short siren sounds when each recipe is complete - use the 'view recipe' key to see what's required next. -- -- --Tips: -- --The saw takes time to recharge (blue charge bar), especially after prolonged use but gets an instant recharge when a new recipe is issued. --Points are awarded for each completed recipe but don't worry about collateral damage - full use will be made of resources from anyone accidentally slaughtered! --Kill two birds with one stone, even if they're not both on the ingredients list. -- --Controls: --Keyboard 'Z' (Button 'A') to start game/operate saw --Up/Down/Left/Right to move saw --Keyboard 'X' (Button 'B') to view recipe --Keyboard'S' (Button 'Y') to silence the in-game music local rnd=math.random local abso=math.abs local DEBUG=false local OX,OY=88,36 local TRATE=0.005 local BLADESPEED=0.5 local TITLE,INIT,PLAY,GAMEOVER=111,222,333,444 local GRAV=0.6 local RED=2 local WHITE=12 local particles={} local state=TITLE local pop={} local t=0 local timer, charge local bladex,bladey local collected local recipeflag local bladeflag local musicflag=true local score local scoredisptime local recipes ={ {name='Low Rez', no=5, desc={'One Eye','or','Glasses'}, flag=0}, {name='Tomat-oh', no=4, desc={'Red','Hair'}, flag=1}, {name='G-Syrup', no=6, desc={'With Gold','Buttons','or','Chains'}, flag=2}, {name='Mansauce', no=6, desc={'A Beard'}, flag=3}, {name='Smacker', no=5, desc={'Red Lips'}, flag=4}, {name='BluBlood', no=8, desc={'Blue','Clothes'}, flag=5}, {name='Nut Job', no=3, desc={'A Bald','Head'}, flag=6}, {name='Blondie', no=3, desc={'Blond','Hair'}, flag=7} } local rec={} --current recipe function init() cls(1) --stop title music --start game music music() music(1) --create pops in 3 rows local i=1 for y=16,56,16 do for count=1,3 do pop[i]={} pop[i].y=y respawn(i) i=i+1 end -- end count end --end y bladex=28 bladey=32 recipeflag=false state=PLAY sfx(-1) rec=recipes[rnd(#recipes)] --set charge charge=56 --none collected so far collected=0 score=0 scoreflag=0 scoredisptime=0 --start shift timer timer=56 end function title() if musicflag then music(0) musicflag=false end cls(0) -- blank screen clip(OX,OY,64,64) spr(128,OX+0,OY+0,-1,1,0,0,8,8) if btnp(4) then state=INIT music() end end function gameover() rect(OX+2,OY+16,60,40,15) print('Shift Over',OX+5,OY+20,4) print('Sleep Well!',OX+3,OY+36,2) rect(0+OX,50+OY,64,6,15) print('Score:'..score,OX+4,OY+50,4) if btnp(4) then --stop game music, set for title music music() musicflag=true state=TITLE end end function respawn(n) --choose new head etc --start off screen to left or right, keep same y (ie maintain z order) pop[n].head=rnd(256,270) pop[n].body=rnd(272,286) pop[n].other=rnd(288,302) pop[n].off=2 if rnd()>0.5 then pop[n].x=64 pop[n].dx=-1 else pop[n].x=-8 pop[n].dx=1 end pop[n].hp=100 pop[n].spatter=false pop[n].t=rnd(8,16)--update time (frames) end function draw() --draw map(0,0,8,8,OX,OY) --show blade position first spr(287,OX+bladex,OY+bladey,0) spr(287,OX+bladex,OY+bladey-8) local bladef=false for i=1,#pop do --y coord is bottom left spr(pop[i].body,OX+pop[i].x,OY+pop[i].y-8,0) spr(pop[i].other,OX+pop[i].x,OY+pop[i].y-8,0) spr(pop[i].head,OX+pop[i].x,OY+pop[i].y-16+pop[i].off,0) if pop[i].hp <50 then spr(305,OX+pop[i].x, OY+pop[i].y-8,0) elseif pop[i].hp <100 then spr(304,OX+pop[i].x, OY+pop[i].y-8,0) end if DEBUG then end end -- draw blade if active if bladeflag then spr(271,OX+bladex, OY+bladey-8,0) end --draw time and charge bars line(OX+8,OY+58,OX+8+timer,OY+58,6) line(OX+8,OY+62,OX+8+charge,OY+62,9) --show score if required if t0 then particles.draw() end --show recipe if required if recipeflag then spr(137,OX+4,OY+4,-1,1,0,0,7,7) print(rec.name,getx(rec.name),OY+16,5)--OX+6,OY+16,5) local rem='Any '.. (rec.no-collected)..' with' print(rem,getx(rem),OY+24,5) --print each line of description local ty=OY+31 for i=1,#rec.desc do local tx=getx(rec.desc[i]) print(rec.desc[i],tx,ty,5) ty=ty+7 end end end function getx(str) width=print(str,0,-6) --print offscreen --return print position for centred text return((OX+32)-width/2) end function updatepop() for i=1,#pop do --movement if t%pop[i].t==1 then pop[i].x=pop[i].x+pop[i].dx if pop[i].x<-8 or pop[i].x>63 then respawn(i) end if pop[i].off==2 then -- head bounce pop[i].off=3 else pop[i].off=2 end end --check for damage if bladeflag then --6 is a bit tighter if abso(bladex-pop[i].x)<6 and bladey==pop[i].y then pop[i].hp=pop[i].hp-1 particles.add(bladex+4, bladey-4,4,RED) --died? if pop[i].hp<=0 then --sound and splatter sfx(1,'C-7') particles.add(bladex+4, bladey-4,30,RED) particles.add(bladex+4, bladey-4,30,WHITE) --score 50 for any kill, in addition to completing recipes --briefly show this score score=score+50 scoredisptime=t+125 --collect any flags from head/body/button collectflags(i) respawn(i) end end end end end function collectflags(i) local f=fget(pop[i].head, rec.flag) if f then collected=collected+1 end f=fget(pop[i].body, rec.flag) if f then collected=collected+1 end f=fget(pop[i].other, rec.flag) if f then collected=collected+1 end --check for recipe complete if collected==rec.no then --inc and display score/set timer score=score+rec.no*100 --scoreflag=true scoredisptime=t+250 -- display for 250 frames ~ 4sec --play sound sfx(2,'C-6',40,0) sfx(2,'D-6',40,1) sfx(2,'E-6',40,2) sfx(2,'F-6',40,3) --new recipe rec=recipes[rnd(#recipes)] --reset charge charge=56 --reset number collected collected=0 end end function input() if btn(2) and bladex>-4 then bladex=bladex-BLADESPEED end if btn(3) and bladex<60 then bladex=bladex+BLADESPEED end if btnp(1) and bladey<47 then bladey=bladey+16 end if btnp(0) and bladey>16 then bladey=bladey-16 end --saw'Z' if btn(4) and charge>0.5 then bladeflag=true sfx(0,'C-2',10) charge=charge-0.5 else bladeflag=false end --recipe hold down 'X' if btn(5) then recipeflag=true else recipeflag=false end --'S' (button Y) to silence game music if btnp(7) then music() end end -- add n particles around x,y function particles.add(x,y,n,c) local s=#particles for i=s+1,s+n do particles[i]={} particles[i].x = x+rnd(-2,2) particles[i].y = y-2-rnd(4) if rnd()<0.5 then particles[i].xacc=-rnd() else particles[i].xacc=rnd() end particles[i].yacc=-2*(rnd()+1) particles[i].color=c particles[i].die=time()+rnd(1000,1500) end end function particles.update() local t=time() local i=1 repeat particles[i].yacc=particles[i].yacc+GRAV particles[i].x=particles[i].x+particles[i].xacc particles[i].y=particles[i].y+particles[i].yacc if particles[i].x<0 or particles[i].x>63 or particles[i].x<0 or t>=particles[i].die then -- delete this one, replace with last local temp=particles[#particles] particles[i]=temp particles[#particles]=nil end i=i+1 until i>#particles end function particles.draw() for i=1,#particles do pix(OX+particles[i].x,OY+particles[i].y,particles[i].color) end end function TIC() if state==TITLE then title() elseif state==INIT then init() elseif state==GAMEOVER then gameover() else --frame counter t=t+1 --shift timer timer=timer-TRATE if timer<=0 then state=GAMEOVER end input() draw() updatepop() if #particles>0 then particles.update() end if charge<1 then charge=charge+0.02 elseif charge<56 then charge=charge+0.1 end end end