
Jessica Koehler from Sparkiverse teaching students to code with PICO-8 on PocketC.H.I.P.
SAN FRANCISCO–170,000 Salesforce customers descended upon the massive 700,000 square foot Moscone Center for Dreamforce, the annual Salesforce conference for developers and power users. Tucked away in a corner of Moscone West, 50 of these attendees were middle school students who participated in the first ever Next Thing Co. learn to code camp.

Jake helping a student debug his game
At the request of Salesforce.org, the philanthropic and community service division of Salesforce, Ari and Jake organized the coding camp with Jessica Koehler and our friends at Sparkiverse. Given a one hour session, the goal was to teach a middle school class how to program a basic PICO-8 game using PocketC.H.I.P.. For many of the students this was their first time programming.

Koehler assisting two students with PICO-8 programming
Despite limited formal programming experience, the students were able to code the game in the allotted time and have a ton of fun while doing it. Koehler broke down the game mechanics into small parts and explained how to program each. The students then applied her instructions and worked on their own PocketC.H.I.P.s to create personalized version of the game. Some of the students even finished early and spent extra time drawing fancier character sprites.

The game takes user input from the D-pad to control a character on the screen. You score points by moving the character to collide with the semi-random bouncing yellow ball. This simple game is a great introduction to creating your own games on PICO-8. Read the full source code below and download the handout we used during the event.
And don’t feel the need to stop there. PICO-8 allows you to build in your own code on top of existing games or start from scratch and truly make it your own. For more resources that will help you learn to code, check out our suggested reading, learn how NTC’s very own Richard learned to code using PICO-8, and gain inspiration from the latest PICO-8 game jam, a highlight of some of the best PICO-8 games around.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
dudex = 64 dudey = 64 thingx = 15 thingy = 10 thingdx = 1 thingdy = 1 score = 0 function _draw() rectfill(0,0,127,127,13) spr(001,dudex,dudey) spr(002,thingx,thingy) print(score,5,5,8) if score > 10 then print("you are cool!",10,5,8) elseif score >4 then print("you're pretty good..",10,5,8) end end function _update() movedude() bump() movething() bouncewall() end function movedude() if btn(0) then dudex = dudex -1 end if btn(1) then dudex = dudex +1 end if btn(2) then dudey = dudey -1 end if btn(3) then dudey = dudey +1 end end function bump() if abs(dudex - thingx) <= 3 and abs(dudey - thingy) <= 3 then thingx = rnd(120)+0 thingy = rnd(121)+0 score+=1 end end function movething() thingx = thingx + thingdx thingy = thingy + thingdy end function bouncewall() if thingx < -1 then thingdx = -thingdx end if thingx >121 then thingdx = -thingdx end if thingy < -2 then thingdy = -thingdy end if thingy > 120 then thingdy = -thingdy end end |

Thanks to Sparkiverse for helping us teach the students PICO-8 programming on PocketC.H.I.P. and Salesforce.org for the opportunity to teach them! Happy hacking everyone, and if you know how to code, make sure you take a moment and share your skills with someone else!
Hi,
Very interesting for kids.
I would like to know what is the name of the keyboard please on the above pictures plugged on the PocketCHIP USB?
Thanks in advance.