Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Etch A Sketch (Pico-1k Jam)View game page

Etch A Sketch for Pico1k Jam 2024.
Submitted by Potatopasty — 20 days, 13 hours before the deadline
Add to collection

Play game

Etch A Sketch (Pico-1k Jam)'s itch.io page

Compressed Bytes used
385

Source Code (OPTIONAL)
function _init()
e={x=4,y=16,w=120,h=100}
n={x=e.x+e.w/2,y=e.y+e.h/2}
i=0
d=true
end
function _update()
if(btn(0))n.x-=1
if(btn(1))n.x+=1
if(btn(2))n.y-=1
if(btn(3))n.y+=1
n.x=mid(e.x,n.x,e.x+e.w)
n.y=mid(e.y,n.y,e.y+e.h)
if(btnp(5))i=15f()
if(i>0)i-=1
end
function _draw()
if i>0then
camera(rnd(5)-2,rnd(5)-2)
g()
else
camera(0,0)
if d then
g()
d=false
end
pset(n.x,n.y,1)
end
end
function f()
rectfill(e.x,e.y,e.x+e.w,e.y+e.h,0)
d=true
end
function g()
rectfill(0,0,127,127,8)
rectfill(e.x,e.y,e.x+e.w,e.y+e.h,6)
rect(e.x-1,e.y-1,e.x+e.w+1,e.y+e.h+1,5)
?"\^wetch a sketch",13,2,10
?"by:potatopasty",37,9,10
?"⬅️➡️⬆️⬇️: draw ❎: clear",5,120,10
end

Leave a comment

Log in with itch.io to leave a comment.

Comments

Submitted

Love the shake effect!

I think you could make this even smaller. Hope you don't mind, but I fiddled around with the code a bit, and got the core drawing area to ~260-chars.

p=6060
i=0
f=rectfill
::r::
f(0,0,127,127,8)
f(6,15,121,101,5)
f(7,16,120,100,6)
::_::
if(btn(0))p-=1
if(btn(1))p+=1
if(btn(2))p-=114
if(btn(3))p+=114
if(btnp(5))i=15
i-=1
flip()
if (i>=0) camera(i/2-rnd(i),i/2-rnd(i)) goto r
i=0
camera(0,0)
pset(7+p%114,16+(p\114)%85,1)
goto _

I think with some bitmasking fun, the btn calls could be compressed even further, if you wanted to try to turn this into a Pico-1/4k demo :)

Developer

Absolutely, fiddle away! I don't mind at all. I'm sure it's possible to make this much smaller, and I'll learn more too. ☺️

Submitted(+1)

Was looking at some of the other entries, and saw the btn-parsing code in WeeblBull's1k-dailhex. Using that, and adding back in the label text, it still Shinko-8s into 264 characters, a tweetcart! 

x=56
y=42
i=0
f=rectfill
::r::
f(0,0,127,127,8)
f(6,15,121,111,5)
f(7,16,120,110,6)
?"\^wpic-o-sketch",17,4,10
?"⬅️➡️⬆️⬇️:draw 🅾️:clear",18,120,10
::_::
b=btn()
x+=b\2%2-b%2
y+=b\8%2-b\4%2
i|=b&16
i-=1
flip()
if (i>=0) camera(i/2-rnd(i),i/2-rnd(i)) goto r
i=0
pset(7+x%114,16+y%95,1)
goto _

Switched to the "o" button instead of the "x"  button for the clear input, since its place in the btn() bitfield is 16, just one off from the number of frames for the shake, so I didn't need a separate constant for that.

Other big difference between this and yours, is that I'm use modular arithmetic instead of mid to constrain things to the field. Saves a few characters.

Developer

That's fantastic! And shake animation is even better.

HostSubmitted(+1)

Ah.. the memories... 😊
This was a lot of fun - great recreation (esp. in such small size).
The "shake" effect is simply... 😚👌
Great entry 👍
P.S. - I tried to represent the Jam in in etch and... kinda failed 😅

Developer (1 edit) (+1)

Thank you for your kind words. And fantastic drawing, it made my day!😊

Submitted

Always loved an Etch-A-Sketch. I only wish there was a way to go really slow, like pixel by pixel or something. I found it pretty hard to stop my lines where I wanted.

I also kind of wish it replicated the x and y separation aspect of the original, I remember a lot of frustration trying to get a nice diagonal line. Though I guess this is tough given the pico-8s limited input.

Was very happy to see the shake on clear!

Overall a lovely entry!

Developer(+1)

Thank you so much for the nice and kind comment. 😊

Making the drawing speed slower is a good point. And something I didn't even considered. I was never good with real etch a sketch, no matter how slow or fast I tried to draw. 

But I agree about the controls. This would be very nice project for example with Arduino, nice display and two potentiometers... And movement sensor for clearing!