0,8e±>S(8u@@PY}]HLLL$D DLډ0@Y@]< P2TvͫgE#2Tv2Tv̻̼ """"  ffff wwww  *"*"*"  `nfnfnf pwww  *"*"    nfnf`` wwpp      Lfmfn nf U PU PUU [ UU UU UU UU UU [ [ [ U[ ݍUUUU *"""""""""""""nfffffffffffffwwwwwwwwwwwww*"""""""""""""nfffffffffffffwwwwwwwwwwwww@MDDDMD@MDDD MD DDDDDD *  n* """ "   n`ffffpwwww """""""""" ""  `ffffffffffff`pwwwwwwwwwwwwp"""""""" ffffffff`wwwwwwwwp """*"""`fffnfffpwwwwww """*"""`fffnfffpwwwwww""ffww"""fffwww"""fffwww *"""""""""""@M*DDD""MD *"""""""""""@M*DDD,"""""MD " *"""""""""""@M*DDD""MD *"""""""""""@M*DDD,"""""MD " nfffffffffff@MnDDDffMDwwwwwwwwwww@M*DDDwwMD UUUUл[ UU = = UUUUл[[U UU = = = ,"""D"""D"""D"" " "!"D"""D""""" "!"","""D"""D"""D"" " "!"D"""D"""D""" "!"lfffDfffDfffDffffnffff fffff,"""D"""D"""Dbfffnf" " "&ff[U[U[Uջ]UUP= = = = ]UUP[U[UջPUUP= = = ]UUP  gzzyh F   =========== =@=P=`=`=p=p=p>p?p?p?p?p?p?p?p?p?p?p?p  *:JZjjpy y yyzzzpppppppppp01o1_1O2?3/44567889:;<===>>>??????? /////////////////////////////?   00@P ` p 0``@p @0`    p X    3    6 * }#0&(-// s-( $  ////////////////////// ##$$$$//////////////////////// @@@@@@@@@@@@@BEGIKLMOOOOOOOOOO (H(H HHH(I III I III II  [e   Ye   [e  [e HHhHHH `l ll l ll l l ]el ` l l l ll l , ,, , ,, , , , , , , ,, ,      LL L LL , , , , , ,M m M m MmMmM mMmMmM m - M - M - M - M M e0@0P0 < ?33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333DD33D333333333333333333DDD333333DDDDD3333333333333DD33333333333333333333333333333333333333333333333333333333333333333333DD33D333333333333333333DDD333333DDDDD3333333333333DD33333333333333333333333333333333333333333333333333333333333333333333DD3D3DDDD33DDDD33333DDD333333DD3DDDD33DDDD3DD3D33333333333333333333333333333333333333333333333333333333333333333DD3D3DDDD33DDDD33333DDD333333DD3DDDD33DDDD3DD3D33333333333333333333333333333333333333333333333333333333333333333DD3DD3DDDDDDDD3DD3DDDD3333DDD3DDDDDDDDD33333333333333333333333333333333333333333333333333333333333333333DD3DD3DDDDDDDD3DD3DDDD3333DDD3DDDDDDDDD333333333333333333333333333333333333333333333333333333333333333333DDD3D3DDDDD333DDDDD3DD3DDD3DDDDD33DDD333333333333333333333333333333333333333333333333333333333333333333DDD3D3DDDDD333DDDDD3DD3DDD3DDDDD33DDD3333333333333333333333333333333333333333333333333333333333333333333D33DDDD3DDDD33333DDD33333DDD3DDDD3DDDD3DD3D333333333333333333333333333333333333333333333333333333333333333333D33DDDD3DDDD33333DDD33333DDD3DDDD3DDDD3DD3D3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333fffff33333333333333333333333333333333333333333333333333333333333333333333333wwww733333333333333333333333333333333fffff33333333333333333333333333333333333333333333333333333333333333333333333wwww73333333333333333333333333333333fffffff33333333333333333333333333333333UUUUUU33333333333333333333333333333333333wwwwww7333333333333333333333333333333fffffff33333333333333333333333333333333UUUUUU33333333333333333333333333333333333wwwwww7333333333333333333333333333333fffffff33333333333333333333333333333333UUUUUU33333333333333333333333333333333333wwwwww7333333333333333333333333333333fffffff33333333333333333333333333333333UUUUUU33333333333333333333333333333333333wwwwww7333333333333333333333333333ffffffffff333333333333333333333333333333333333333333333333333333333333333wwwwwwwww7333333333333333333333333ffffffffff333333333333333333333333333333333333333333333333333333333333333wwwwwwwww733333333333333333333333333̈̈3333333333333333333333333333333ݻ333333333333333333333333333333333܍܍<3333333333333333333333333333̈̈3333333333333333333333333333333ݻ333333333333333333333333333333333܍܍<3333333333333333333333333333DDDDD3333333333333333333333333333333ݻUU333333333333333333333333333333333CDMDM43333333333333333333333333333DDDDD3333333333333333333333333333333ݻUU333333333333333333333333333333333CDMDM4333333333333333333333333333DDDDDDDDf33333333333333333333333333333UݻUUUU33333333333333333333333333333333*BDDDDDDD:33333333333333333333333333DDDDDDDDf33333333333333333333333333333UݻUUUU33333333333333333333333333333333*BDDDDDDD:33333333333333333333333333fffffffff3333333333333333333333333333UݻUUUU33333333333333333333333333333333,"""""""":33333333333333333333333333fffffffff3333333333333333333333333333UݻUUUU33333333333333333333333333333333,"""""""":33333333333333333333333333ffffffffDD333333333333333333333333333UݻUUUU33333333333333333333333333333333CD$"""""""<33333333333333333333333333ffffffffDD333333333333333333333333333UݻUUUU33333333333333333333333333333333CD$"""""""<33333333333333333333333333DffffffffDD3333333333333333333333333333Uݻ33333333333333333333333333333333CD$"""""""B433333333333333333333333333DffffffffDD3333333333333333333333333333Uݻ33333333333333333333333333333333CD$"""""""B433333333333333333333333333DffffffffDD33333333333333333333333333333U3333333333333333333333333333333CD$bfffff&B433333333333333333333333333DffffffffDD33333333333333333333333333333U3333333333333333333333333333333CD$bfffff&B4333333333333333333333333333fffff33333333333333333333333333333333333333333333333333333333333333nfnff63333333333333333333333333333fffff33333333333333333333333333333333333333333333333333333333333333nfnff63333333333333333333333333333ff333ff3333333333333333333333333333333UUUU333333333333333333333333333333333nf633nf63333333333333333333333333333ff333ff3333333333333333333333333333333UUUU333333333333333333333333333333333nf633nf63333333333333333333333333333333333333333333333333333333333333UUUU33UUUU33333333333333333333333333333333393393333333333333333333333333333333333333333333333333333333333333UUUU33UUUU3333333333333333333333333333333339339333333333333333333333333333fff33fff3333333333333333333333333333333UU3333UU333333333333333333333333333333333313133333333333333333333333333fff33fff3333333333333333333333333333333UU3333UU3333333333333333333333333333333333131333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333<<<3<33<333<3333<3333333333333333333333333333333333333333333333333333333333333333333333333333333<33333<33<33<3<3<333333<33<3333333333333333333333333333333333333333333333333333333333333333333333333333333<<333333<3<3333333<<33333333333333333333333333333333333333333333333333333333333333333333333333333<333<3<333<3<3<33333<<33<3<33333333333333333333333333333333333333333333333333333333333333333333333333333<<<3<333333<<33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333:33333333333333:3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333::3:33333:3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333:::33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333::3333333:33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333:3:33:::33::3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333.-- title: Vac-A-Jack -- author: Mr Happy (paul59) -- desc: Made for Bored Pixels Jam 2021 -- script: lua -- saveid: vacajack -- Operator 841-B (Jack) is on his daily round, -- picking up discarded clothing when his -- 'Enviro-Vac' cart malfunctions. -- Collected clothes are usually -- deconstructed into reuseable material -- but a fault in the matter transformer -- is shooting out the collected items -- instead. -- Gameplay: -- Collect clothes using the Enviro-Vac. -- Colours are only revealed -- (and items can only be collected) -- when an item is in scanner range. -- The selector determines TYPE of item -- being collected (but not the colour!). -- The Enviro-Vac uses power as does -- hurrying. Batteries will refill -- your power meter but may overload -- the already damaged circuits. -- Controls: -- Button A (Keyboard 'Z') Enviro-Vac -- Button B (Keyboard 'X') Selector -- Right (Keyboard Right) Hurry -- Scoring: -- For each item collected 10 PTS -- When all colours match: 100 PTS -- When all colours differ: 500 PTS -- TIP: Get repeat bonus scores when you have -- a matching (or all-different) outfit, -- by only collecting identical items! local rnd=math.random local INIT,TITLE,PLAY,START,INSTR,END,INSTR2=11,22,33,44,55,66,77 local PULLRAD=104 local EASING=0.05 local CAP,SHIRT,PANTS,BOOTS=0,1,2,3 local RED,BLUE,GREEN,PURPLE=0,1,2,3 local capcol,shirtcol,pantscol,bootscol local frame local body=288 local state=TITLE local t local powt local interval local px,py local pmoving=false local ppulling=false local ppower local psel local pickups={} local powdrop={} local mxoff local score local scorelist={} local egt local hscore local overload local olt local tmusic=false local blink=false function init() --start with nice uniform :) local r=rnd(0,3) capcol=r shirtcol=r pantscol=r bootscol=r frame=0 t=0 interval=6 powt=0 px=-32 py=112 psel=0 ppower=5 mxoff=0 score=0 powdrop.x=240 powdrop.active=false --end game timer egt=0 overload=false olt=0 --create some pickups for i=1,10 do pickups[i]={} respawnpickup(i) end state=START end function title() --get the last high score hscore=pmem(0) cls(3) print('Vac-A-Jack',66,28,0,false,2) print('Vac-A-Jack',64,26,4,false,2) spr(488,16,48,0,2,1,0,2,2) spr(490,191,48,0,2,0,0,2,2) local ct=time()%240 if ct<120 then spr(492,102,48,0,2,0,0,2,2) else spr(494,102,48,0,2,0,0,2,2) end if rnd(60)==1 then blink=true end if blink then rect(30,58,4,2,12) rect(30,60,4,2,4) rect(38,58,4,2,12) rect(38,60,4,2,4) rect(197,58,2,2,8) rect(199,58,2,2,13) rect(205,58,2,2,8) rect(207,58,2,2,13) if rnd(10)==1 then blink=false end end local tmp='HIGH SCORE '..hscore print(tmp,cprint(tmp),96,12) --tmp='A Suck-em-Up made for Bored Pixels Jam 2021' --print(tmp,cprint(tmp),96,11) tmp='Press [z]' print(tmp,cprint(tmp),128,10) if btnp(4) then sfx(0,'C-3',10) state=INSTR end end function instructions() cls(3) local tmp='CONTROLS & INFO' print(tmp,cprint(tmp),4,4) line(0,15,239,15,9) line(0,15,80,15,13) print('Time Remaining',16,28,13) line(34,26,42,18,4) print('Unscanned',168,24,8) spr(16,188,32,0,2,0,0) print('Scanned',122,36,11) spr(34,136,44,0,2,0,0) print("Jack",24,78,13) line(52,81,68,81,4) spr(480,72,64,0,2,0,0,2,2) spr(492,100,64,0,2,0,0,2,2) print('[Right]',148,78,12) print('Hurry',184,78,13) spr(208,136,77,0) print('[z]',42,46,12) print(' Enviro-Vac',52,46,13) line(98,54,108,64,4) print('[x]',56,108,12) print('Selector',70,108,13) line(109,87,109,105,4) print('Power Level',136,96,13) line(123,87,132,96,4) print('- refill with', 140,104,13) spr(96,208,102,0) print('[z] for more...',88,128,10) if btnp(4) then sfx(0,'C-3',10) state=INSTR2 end end function moreinstructions() cls(3) local tmp='BONUS SCORES...' print(tmp,cprint(tmp),4,4) print('All the same - 100 Points',64,48,4) print('All different - 500 Points',64,96,7) spr(488,32,32,0,2,0,0,2,2) spr(490,32,80,0,2,0,0,2,2) if btnp(4) then sfx(0,'C-3',10) state=INIT music() tmusic=false end print('[z] to start!',88,128,10) end function drawplayer() if frame==0 or frame==2 then spr(256+capcol*2,px,py,0,1,0,0,2,2) spr(body,px,py,0,1,0,0,2,2) spr(320+shirtcol*2,px,py,0,1,0,0,2,2) spr(352+pantscol*2,px,py,0,1,0,0,2,2) spr(384+bootscol*2,px,py,0,1,0,0,2,2) else --frames 1 and 3 are elevated spr(256+capcol*2+8,px,py,0,1,0,0,2,2) spr(body+8,px,py,0,1,0,0,2,2) spr(320+shirtcol*2+8,px,py,0,1,0,0,2,2) spr(352+pantscol*2+8,px,py,0,1,0,0,2,2) --choose from leg animations if frame==1 then spr(416+bootscol*2,px,py,0,1,0,0,2,2) else spr(448+bootscol*2,px,py,0,1,0,0,2,2) end end --draw cart if frame==1 or frame==3 then spr(492,px+14,py,0,1,0,0,2,2) --draw current selection and power --on cart screen spr(128+psel,px+17,py+5,0) if ppower>0 then line(px+25,py+11,px+25,py+11-ppower,12) end else spr(494,px+14,py,0,1,0,0,2,2) spr(128+psel,px+17,py+4,0) if ppower>0 then line(px+25,py+10,px+25,py+10-ppower,12) end end if ppulling then spr(475+frame,px+17,py-8,0) end end function drawpickups() local reveal for i=1,#pickups do --if in range draw coloured icon --otherwise use generic icon if pickups[i].dd#scorelist end --return distance from cart function dist(x,y) local dx=px+24-x local dy=py-y return(math.sqrt(dx*dx+dy*dy)) end function calcscore() if capcol==shirtcol then if shirtcol==pantscol then if pantscol==bootscol then --all the same return(100) end end end local cols={0,0,0,0} cols[capcol+1]=cols[capcol+1]+1 cols[shirtcol+1]=cols[shirtcol+1]+1 cols[pantscol+1]=cols[pantscol+1]+1 cols[bootscol+1]=cols[bootscol+1]+1 for i=1,4 do --more than one the same if cols[i]>1 then return(10) end end --all different! return(500) end function changeclothes() capcol=rnd(0,3) shirtcol=rnd(0,3) pantscol=rnd(0,3) bootscol=rnd(0,3) print('OVERLOAD!',px+32,py+6,rnd(1,15)) end --get x for centred text function cprint(str) local w=print(str,0,-80) return(120-w/2) end function endgame() local tmp='GAME OVER' print(tmp,cprint(tmp),8,2) tmp='SCORE '..score print(tmp,cprint(tmp),32,4) --if higher than saved high score if score>hscore then pmem(0,score) tmp='New High Score!' print(tmp,cprint(tmp),48,12) end --only scan for key after --a delay if egt>200 then tmp='[z] New Game' print(tmp,cprint(tmp),96,10) if btnp(4) then sfx(0,'C-3',10) state=TITLE music() end end end function TIC() if state==TITLE then --start music if not tmusic then music(1) tmusic=true end title() elseif state==INSTR then instructions() elseif state==INSTR2 then moreinstructions() elseif state==INIT then init() elseif state==START then --start of game - move to centre drawscene() drawplayer() local tmp if px>0 then tmp='Cart Malfunction...' print(tmp,cprint(tmp),56,10) end if px>16 then tmp='Reverse gear broken' print(tmp,cprint(tmp),64,1) end if px>32 then tmp='Matter transformer locked to eject' print(tmp,cprint(tmp),72,7) end if px>48 then tmp='Complete shutdown in approximately...' print(tmp,cprint(tmp),80,12) end if px>64 then tmp='3 Minutes!' print(tmp,cprint(tmp),88,12) end if px%4==0 then sfx(3,rnd(20,80),4) end t=t+1 if t==interval then t=0 if px<79 then px=px+1 frame=frame+1 if frame==4 then frame=0 end else --let's go! state=PLAY music(0) sfx(5,'C-4',30) end end elseif state==PLAY then drawscene() drawscore() drawscorelist() drawpickups() drawplayer() t=t+1 if t==interval then t=0 frame=frame+1 if frame==4 then frame=0 end if btn(3) and ppower>0 then pmoving=true interval=5 ppower=ppower-0.025 --continuous sfx sfx(2,'C-7') else pmoving=false interval=6 end end powt=powt+1 if powt%1800 ==0 then --every 30 secs --enable power drop powdrop.x=240 powdrop.active=true end if powt>12000 then --3+ minutes state=END end --pull and select btns work every TIC() if btn(4) and ppower>0 then ppulling=true ppower=ppower-0.005--Fix else ppulling=false end --repeat on ch 1 if ppulling then sfx(6,'G-3',-1,1) end if btnp(5) then psel=psel+1 if psel==4 then psel=0 end sfx(4,'C-6',2) end if pmoving then mxoff=mxoff-1.0 else mxoff=mxoff-0.5 end if mxoff<=-16 then mxoff=0 end if powdrop.active then if pmoving then powdrop.x=powdrop.x-1.0 else powdrop.x=powdrop.x-0.5 end end --check for power pick up if powdrop.x<=px+32 then --reset powdrop.active=false powdrop.x=240 --power up ppower=5 sfx(-1) sfx(2,'C-6',120) --overload? if rnd()>0.4 then overload=true olt=120 sfx(7,'C-4',120) else overload=false end end if overload then --change clothes changeclothes() olt=olt-1 if olt==0 then overload=false end end --check for pickup/player collisions updatepickups() --move any scores in the list updatescorelist() elseif state==END then ppulling=false pmoving=false powdrop.active=false drawscene() drawplayer() drawpickups() updatepickups() endgame() egt=egt+1 end --state selection end