NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Program with Paint Brushes, Not Pencils (blog.pickcode.io)
q2dg 9 minutes ago [-]
Why not using Processing?
Lerc 3 hours ago [-]
I think there's something to that.

My starter program for 9 year olds was

    print("draw with the arrow keys");
    var cx=320;
    var cy=240;

    function move() {
      if (keyIsDown(38)) cy-=1;
      if (keyIsDown(40)) cy+=1;
      if (keyIsDown(37)) cx-=1;
      if (keyIsDown(39))    cx+=1;
    }

    function draw() {
      fillCircle(cx,cy,6);
    }

    run(move,draw);
I think since then I changed keyIsDown to keyHeldDown [with keyWentDown] as a compliment.

That combined with

https://fingswotidun.com/code/index.php/Keycodes

That gives an etch a sketch program and enough information of how to convert it to WASD which seems to be a universal impulse amongst 9year olds.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 07:30:36 GMT+0000 (Coordinated Universal Time) with Vercel.