1kRL
Made for #Pico1k
It's a traditional roguelike game where you need to explore the world to survive. Since you explore the map, you will gain the maximum hitpoint to make sure you can survive longer.
But be careful, the heart will disappear since you leave the current screen.
x,y=0,0function c(a,b)e={p}if r[a]~=nil and r[a][b]~=nil then l=r[a][b]else t={}for i=-1,11 do t[i]={}for j=-1,11 do u=flr(rnd(20)) t[i][j]=u<5and"#"or"."if u==6then e[#e+1]={x=i,y=j,d="♥"}end end end if r[a]==nil then r[a]={}end r[a][b]=t l=t end p.x%=11p.y%=11 x,y=a,b p.m+=1end p={x=5,y=5,d="@",h=20,m=19}e={p}r={}c(0,0)function _update()p.x+=(btnp(➡️)and(l[p.x+1][p.y]=="."and 1or 0)or 0)-(btnp(⬅️)and(l[p.x-1][p.y]=="."and 1or 0)or 0)p.y+=(btnp(⬇️)and(l[p.x][p.y+1]=="."and 1or 0)or 0)-(btnp(⬆️)and(l[p.x][p.y-1]=="."and 1or 0)or 0)if p.x<0then c(x-1,y)end if p.x>10then c(x+1,y)end if p.y<0then c(x,y-1)end if p.y>10then c(x,y+1)end if btnp(⬆️) or btnp(⬇️) or btnp(⬅️) or btnp(➡️) then p.h-=1end if p.h<0 then del(e,p)end for _,v in pairs(e) do if v.d=="♥"and v.x==p.x and v.y==p.y then del(e,v)p.h+=5p.h=min(p.m,p.h)end end end function _draw()cls(0)for i=0,10 do for j=0,10 do for _,v in pairs(e) do print((v.x==i and v.y==j)and v.d or l[i][j],i*8,j*8)end end end print("♥"..p.h.."/"..p.m,0,100)end

Leave a comment
Log in with itch.io to leave a comment.