13 ain’t bad! Thanks for giving it a try, NLB! :)

## eggnog

### Creator of

### Recent community posts

Hi Claus! My biggest inspirations for game music come from the Game Boy era, so that's a real compliment for me. :) The level timer is indeed a little tight - it's supposed to put the pressure on you to get back to the door, and force you to decide between diamonds and surviving the level, but I suppose I could have made it a second or two longer. :P

Thanks for playing, and thanks for the feedback! :)

Thanks Hugh! :)

I feel like there's a ton of potential in these mechanics when combined with puzzle gameplay or two-player battle situations. The random level generation was honestly just something I'd wanted to try for a while, but it would have been good to incorporate more gameplay elements into the random generation. Thanks for the play, I always appreciate your feedback! :)

And here's the obfuscated code:

::z::e={}f={}

d,xd,yd,p,s,b,t,o=0,0,4,1,0,circfill,btnp,rnd

for i=1,5 do

j,k,q=14+i*16,50+o(35),17+o(10)add(e,{x=j,y=k,r=q})

if(i>1 and i<5)add(f,{x=j+o(q)-q/2,y=k+o(q)-q/2,r=8})

if(i==1)x,y=j-q/2,k

if(i==5)w,u=j+q/2,k

end::_::cls()if t(5) then

if(d<6.28)d+=.1else d=0

xd=sin(d)*4

yd=cos(d)*4

end

if t(2) then

if(p<5)p+=1else p=1

end

if(t(4))s=p

x+=s*xd y+=s*yd s*=.7

for v in all(e) do

b(v.x,v.y,v.r,11)end

for v in all(f) do

b(v.x,v.y,v.r,4)end

b(w,u,2,0)

if(pget(x,y)==0)goto z

if(pget(x,y)==4)s/=3

b(x,y,2,7)b(64,8)b(x+xd,y+yd,0)

?p,63,6,0

flip()goto _

I de-obfuscated my code for Putt, in case anybody is interested. Planning to make this into a proper lil PicoPutt game, but gonna need to spend a LOT of time polishing it.

function _init()

spawn_level()

end

function _update()

move_player()

end

function _draw()

cls()

draw_bg()

collision()

draw_player()

end

-- levelgen

function spawn_level()

grass={}

sand={}

for i=1,5 do

j=14+i*16

k=50+rnd(35)

q=17+rnd(10)

-- make grass and sand

add(grass,{x=j,y=k,r=q})

if i>1 and

i<5 then

add(sand,{x=j+rnd(q)-q/2,y=k+rnd(q)-q/2,r=8})

end

-- make player and hole

if i==1 then

p={x=j-q/2,y=k,a=0,xd=0,yd=4,p=1,v=0}

elseif i==5 then

h={x=j+q/2,y=k}

end

end

end

-- draw functions

function draw_bg()

for v in all(grass) do

circfill(v.x,v.y,v.r,11)

end

for v in all(sand) do

circfill(v.x,v.y,v.r,4)

end

-- hole

circfill(h.x,h.y,2,0)

-- power bar

circfill(64,8,5,7)

print(p.p,63,6,0) end

-- player

function draw_player()

circfill(p.x,p.y,2,7)

circfill(p.x+p.xd,p.y+p.yd,0)

end

function move_player()

-- set angle of shot

if btnp(5) then

if p.a<6.28 then

p.a+=.1 else p.a=0

end

p.xd=sin(p.a)*4

p.yd=cos(p.a)*4

end

-- set shot power

if btnp(2) then

if p.p<5 then

p.p+=1 else

p.p=1

end

end

-- shoot

if btnp(4) then

p.v=p.p

end

-- move ball, apply deceleration

p.x+=p.v*p.xd

p.y+=p.v*p.yd

p.v*=.7

end

function collision()

-- hole/border pixel collision

if pget(p.x,p.y)==0 then

_init()

end

-- sand trap collision

if pget(p.x,p.y)==4 then

p.v/=3

end

end