Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

ghost patrolView game page

solve open-ended puzzles to protect the town!
Submitted by pancelor — 3 hours, 38 minutes before the deadline
Add to collection

Play game

ghost patrol's itch.io page

Compressed Bytes used
1024

Source Code (OPTIONAL)
function f(n,e)if not e then::e::e=17+rnd(14)\1+rnd(14)\1*16for n in all(d)do if n.e==e then goto e end end end return add(d,{d=n,e=e})end cartdata"ghostpatrol"o=-1s=▤::e::s^^=-1fillp(s)if 2>o and 32&▤>0then n=➡️ menuitem(1,"< night "..➡️.." >",function(e)➡️+=e\2%2-e%2menuitem(1,"< night "..➡️.." >")o=0▤=32end)?"⁷d1ea"
o=2d={}h=1r=dget(n)>0and dget(n)*16e=0srand(n/3)for e=0,15do f(4,e)f(4,e*16)f(4,e*16+15)f(4,e+15*16)f(5)end a=f(3)for e=1,min(11,➡️)do f(6).o=1+rnd(4)\1end f(1)f(2)end ▤=btnp()if(▤&16)*o>0then h^^=3end if(▤&15)*o>0then for n in all(d)do if n.d==h then g=n.e::e::i=n.e+cos(▤*.6&.75)-cos((▤*.6&.75)-.25)*16for e in all(d)do if e.e==i then if e.d==4then?"⁷g0e"
elseif h>1then?"⁷d1ea"
e.e=g n.e=i elseif e.d==7then del(d,e)?"⁷d0edgdegd"
goto e elseif e.d==6then del(d,e)?"⁷i6de"
else?"⁷g0e"
end goto n end end n.e=i goto e::n::rectfill((g&15)*8+1,g\16*6+8,(n.e&15)*8+5,n.e\16*6+11,n.d*4+4)e+=o\2end end for n in all(d)do if n.o==e then n.o+=8f(7,n.e).f=e+4end end memset(0,0,10000)for n in all(d)do mset(n.e&15,n.e>>4,n==a and-1or n.d~=7and 1)end l={a.e}for n in all(l)do for e=1,4do if mget(e*32%49-31+n&15,e*32%49-31+n>>4)<1then mset(e*32%49-31+n&15,e*32%49-31+n>>4,mget(n&15,n>>4)-1)add(l,e*32%49-31+n)end end end for n in all(d)do if n.f==e then n.f+=4c,j=1+rnd(4)\1,1for e=1,4do if mget(e*32%49-31+n.e&15,e*32%49-31+n.e>>4)>j then c,j=e,mget(e*32%49-31+n.e&15,e*32%49-31+n.e>>4)end end i=c*32%49-31+n.e for e in all(d)do if e.e==i then if e==a then?"⁷afed"
n.e=i o=0end goto e end end n.e=i::e::end end if n>=➡️ then for n in all(d)do if n.d>5then goto e end end ➡️+=1?"⁷dg"
o=1dset(n,min(r or e,e)>>4)::e::end end flip()rectfill(0,0,127,127,0)rectfill(0,7,127,102,1)for n in all(d)do?(n.d==h and"ᶜ7++³8ᶜ"or"ᶜ")..("8c45536")[n.d]..("웃オ⌂へへホナ")[n.d],(n.e&15)*8,n.e\16*6+7
end if o==1then?"ᶜ7⁶jfe❎⁶j8cthe town survives"
end if o==0then?"ᶜ7⁶jfe❎⁶j8cthe town is lost"
end if o==-1then?"ᶜ7⁶pghost patrol",20,32
?"ᶜ5by pancelorᶜ6⁶jfe❎"
❎+=1for e=0,❎ do srand(e-❎\2)?"ᶜ7⁶.<□Rfd4「ᵉ",e,cos(e-❎>>4)*8+rnd(1000)
end else?e.." moves⁶jm0 ᶜ5night "..n,8,0,5
if r then?"best "..r,48,0
end end goto e

Link to Commented Source Code (OPTIONAL)
https://gist.github.com/pancelor/c60dbe820043ab4bd5c051d1b6440200

Leave a comment

Log in with itch.io to leave a comment.

Comments

HostSubmitted

Really neat idea, that makes you think before you move.
Good use of chars as gameplay items and nice SFX.
Alas, I'm not very good (tho, I did at least survive until the 2nd night)
Good one 👍