With PostHog's open-source analytics platform, customer data never has to leave your infrastructure.
Featuring product analytics, session recording, feature flags, heatmaps, experimentation, and more - all available for free!
The best part is everything is seamlessly integrated, so you can spend less time configuring different tools and more time getting valuable insight into user behavior.
Sprig is a game console where every user is a creator. It can only be obtained by building a tile-based game in the web-based game editor and shipping it in the community gallery. It's made by Hack Club.
Join thousands of other open-source enthusiasts and developers in the Open Source Hub Discord server to continue the discussion on the projects in this week's email!
Sprig - the fully open-source handheld game console created by Hack Club
Hey Leo, and Cedric! Thanks for joining us! Let us start with your background. Where are you from, how did you learn to program, and what languages or frameworks do you like?
Leo: I grew up in Connecticut and wrote my first program in high school to run Fast Fourier Transforms on Cosmic Microwave Background data. I wrote it in Excel and didn’t really know what I was doing. I studied physics and CS in college but started programming more for fun in Mathematica to do physics problems I couldn’t do by hand. I also got into digital fabrication and started trying to make open-source design tools which I’ve continued doing till this day. After graduating I spent some time traveling around the world visiting makerspaces and working with inventors and saw first hand how putting my tools on the web would open them up to a much wider audience. For that reason JavaScript became my weapon of choice. I like trying frameworks out but at the end of the day often go frameworkless. I joined Hack Club about 1.5 years ago after a mutual friend introduced Zach and me. I was originally attracted to makerspaces because they seemed to embody what schools should be, kind curious creative people sharing things they care about. Zach’s vision for Hack Club resonated with that so I jumped on the ship.
Cedric: I grew up stuck out in the woods with my two little brothers in Catawba, Virginia. I would come up with games and stories to entertain them, and that sort of just became who I was. I stumbled across Codecademy in 5th grade and started turning my stories into text based games. When I sit down to make a game to this day, I imagine playing it with my little brother.
What is Hack Club?
Leo: Hack Club is a global network of teenage technology enthusiasts who are learning to program by making things they care about and sharing them with others. Some teens in the network participate by running local clubs at their high schools or by attending those club meetings, for others they participate by helping maintain or build our open-source projects. Through our work, we spread the values that technology is an expressive thing which should be joyful and playful.
Cedric: Hack Club is a non-profit organization whose mission is to support teenagers in tinkering with technology. They do this through their online community and a global network of school clubs.
What is Sprig?
Leo: Sprig is a handheld console that you build yourself and which you can only get by contributing a game to its game gallery as an open-source contribution. The pithy line is that it’s a console where every player is a creator. Right now we only send Sprigs (for free) to teenagers because that is the core demographic that Hack Club serves. But the online game editor and gallery is available to everyone. If someone other than a teen really wanted a Sprig console they could fairly easily make their own because it’s all open source (of course!).
Why was Sprig Started?
Leo: Sprig started about a year ago when trying to figure out how to help beginner Hack Clubbers learn how to code transition from just studying language features to focusing on projects they were excited about building which they could understand.
In the Fall of 2021, I made a variety of small projects like an interactive editor for a small music programming language, or a simple programmatic drawing environment, and it culminated in a web-based game making tool with a simple 2D physics engine. The physics engine ultimately evolved into a discrete tile engine which seemed to make it much easier for people to focus on making games rather than individual game mechanics. We wanted to help inspire people to follow through with their projects and came up with this idea of giving away consoles which could play games they make after they shared them with the community. We designed the console so people could build it themselves and also reuse the components as a hardware development kit.
We sometimes call the model “you ship, we ship”. We don’t want to be arbiters weighing and measuring people to determine which opportunities we’ll make available to them so instead of asking people to apply for hardware we just give everyone a chance to express their earnest interest by just getting to work. Then we support whoever resonates with it.
Sprig is a type of microworld. It’s a concept developed by one of the father’s of educational technology, Seymour Papert. Papert popularized the idea that people learn best by building things they care about and sharing them with others. He called this pedagogical philosophy constructionism. A microworld is a place for exploring a specific set of ideas by using them to create things. You can learn more about how our work at Hack Club tries to realize these ideas in technological tools in this talk I gave for the Topos Institute.
How has your experience been developing the game engine?
Leo: It’s been a blast. Designing construction kits is one of my favorite things to do. A good API introduces people to a set of ideas which seem simple but which can be composed in expressive ways. Projects end up being unique but having a shared character to them. The most interesting part of building an engine is figuring out what mental model to encourage and what building blocks to provide which fit the model. Then you get to implement it!
Can you tell us more about the hardware?
Leo: Originally we were planning to use a Raspberry Pi Zero but due to chip shortages they just weren’t available on the timeframes we needed them on. Sprig ended up being a much more interesting project to work on having to deal with the constraints of a microcontroller. The Pico also improved the development kit nature of the hardware. Including parts and manufacturing costs each Sprig is about $100 to produce.
Because the whole project is open-source we used open-source tools to design the PCBs. Arguably open hardware isn’t really open if you can’t work with the designs in open software. One of my long running hobby projects has been trying to make open source PCB design more accessible with web-based programmatic board design tools. After designing the boards we manufacture them in China at a board house (in our case ALLPCB). The process is actually pretty accessible to learn and you can order boards for tens of dollars. A somewhat more environmentally friendly alternative for prototyping them though is to cut the boards from copper yourself and stuff them by hand with solder and tweezers.
Why are Sprigs not sold?Why are there only 430 of them?
Leo: The fact that it can’t be bought makes the device special for teenagers. A lot of teenagers don’t have much money or ways of earning it. We want to encourage them to spend time exploring their curiosity so it makes more sense to incentivize that over activities which afford them the opportunity to buy something.
Our aim is to inspire people to learn by making, so we use the hardware to incentivize that. There are 430 specifically because Tom Preston-Werner funded the project for his reverse 43rd birthday gift, but our hope is for Sprig to be a project that continues running in the years to come. As a nonprofit, we rely on the generosity of donors to make Hack Club and open source projects like Sprig free for teenagers. Our finances are 100% transparent at bank.hackclub.com/hq and anyone can donate at hackclub.com/donate.
What was the most surprising thing you learned while working on Sprig?
Leo: I’m not sure it was surprising but it’s always delightful to discover that there are a number of 13 year olds out there who will tremendously impress you with their skill and enthusiasm to contribute to a project like this. We have such contributors from Colorado to Brazil who are spending time everyday helping with the project and making it their own. At first I reviewed every single game that came in meticulously myself. After I discovered a few people with special enthusiasm for the project were quite active in assisting others I asked them to become maintainers/reviewers as well. They beat me to every game which came in! The Hack Clubber in Colorado started making every game which someone could suggest to him and found a number of bugs in the engine (some of which he took the initiative to fix himself!). The one in Brazil began to translate the whole system into Portuguese so he could share it with his countrymen. Young people spend so much time trying to prove themselves worthy of opportunity, part of the beauty of open-source is you just open things up and get to see how people run much farther than you would have imagined possible.
Cedric: I had to do a lot of surfing through the Raspberry Pi Pico forums to figure out how to manage flash memory from C without a file system, etc. and you can learn all sorts of neat things from the people there. I was investigating one issue on the device and found a forum post where someone was talking about how a related bug actually bricked their washing machine.
It was a moment that made me think, “wow, this thing that feels super niche and kinda useless is actually ubiquitous and super important.” It made me laugh later when we posted Sprig to Hacker News and someone told me I was wasting my life playing with “kid shit” like Raspberry Pis. I wonder if his washing machine has this bug.
Did you run into any limitations while working on Sprig? How did you overcome them?
Cedric: One example that I can think of is that the Sprig’s screen is 160x128, and the typical way to do software rasterization is to iterate through all of your sprites in the game and write their pixels into a buffer that’s big enough to hold all the pixels in your screen. But even with 16-bit color, the buffer for the screen ends up taking up like 40kb of RAM, which is entirely too much of the Sprigs’ 256kb total. So I employed a trick I learned from Inigo Quilez’s website when I was writing shaders for games, and rewrote the renderer such that it takes an X, Y for a pixel and indexes into the map and other relevant data structures and returns what color that pixel should be. Then, we didn’t need a 40kb buffer to store the pixels in because we could stream the pixels directly to the screen.
Which is your favorite game that's built using Sprig?
Leo: That’s like picking a favorite kid, haha. I really like the games that have simple mechanics but are just a blast to play. Sometimes when testing games I ended up spending an hour just playing levels that hooked me. Some games that felt that way for me were Pipes Puzzle and Penguin Slide.
Cedric: It was quite fun optimizing the C version of the engine that runs on the Pico so that it could run Omay’s Game of Life implementation without being unusably laggy. I usually statically allocate as much as I can in my C code because it’s simple and efficient, but I actually had to go back and dynamically allocate a bunch of the engine’s internal data structures just for that game so it could scale up to the number of tiles that his Game of Life implementation used and not crash.
Where do you see the project heading next?
Leo: Sprig is still just getting out there into the world. My hope is to see more games come in, more Sprigs go out, and more teenage developers hop into the project more deeply by helping with the repo. I think the web editor for Sprig will have the longest life of the project. The game engine itself is quite separable from the hardware and is easy to maintain. Hopefully it will help people make delightful little projects for years to come. Taking a step back I see Sprig as part of a larger project in developing a library of public good technology. More specifically technology to help people learn through creativity with computers.
Cedric: We’ll maintain Sprig to keep it operational for everybody, but as for what’s next … bear with me.
I think that if you know what you want to make, then you can find a game engine or library or OS/browser API that you can use to make that thing, if you’re determined enough. What people need is to know what to make. I think that is Sprig’s contribution; by being very limited, it gives you little suggestions, little hints about what you could do. Oh, I have tiles, oh I can push them around, hmm … and then the game ideas just sort of present themselves. Sokoban! Cellular Automata!
Because Sprig is so limited, because it’s not trying to be everything to everyone, it can actually be finished. Then Hack Club can keep trying new ways to help people figure out what they’re trying to make. That’s what’s next. That’s the best way to learn to code, you know, just trying to make something. Actually, if there’s not anything you’re trying to make, why even learn to code, right?
How do you balance your work on open-source and your school?
Cedric (age 19): I was never super worried about school. I barely graduated highschool. I was salaried working for Hack Club on this project, but even when I was in highschool, writing code was always more interesting to me, so I just did that. I’m not an edgelord; I feel like I’m supposed to say here that this wouldn’t work for everyone … but actually, I’m not going to. Follow y’alls’ dreams with reckless abandon, y’all. Don’t let nobody stop you.
Leo: I’m out of school and work full-time as an open-source developer at Hack Club. I also maintain a number of personal projects (mostly digital fabrication tools) which I develop with other researchers in the field. Some of them are used in courses at MIT and Harvard so I often have extra maintenance work when semesters start up but I welcome it because it means the tools are finding an audience.
What do you plan to do after graduating Hack Club?
Leo: I think this question is more relevant to our younger contributors. Hack Club is my full time job. In future projects I’d like to introduce young people to a broader set of technology. Right now when people think about tech they think of a small number of Silicon Valley and internet companies. There are lots of resources to learn web development because that’s where the jobs are. But becoming expressive with technology involves learning lots of other skills too.
Cedric: I started writing code because I wanted to make games. I got sidetracked along the way helping people make game engines and programming languages and things like that, and it was fun and I learned a lot, but the biggest thing I learned was … what I really want hasn’t changed. I still want to make games I can play with my little brother. So I’m moving to Mexico where I can live off of my savings for a good chunk of time and just sort of isolate myself and spend a lot of time doing this thing that really calls to me, make these games. Nothing else really matters to me right now, haha.
Want to join the conversation about one of the projects featured this week? Drop a comment, or see what others are saying!
Interested in sponsoring the newsletter or know of any cool projects or interesting developers you want us to interview? Reach out at osh@codesee.io or mention us @ConsoleWeekly!
Happy New Year, and here's to a cracking 2025! 🎊 View on the Web Archives ISSUE 693 January 3rd 2025 Comment Happy New Year, everyone! 🎊 I hope you all had a restful and relaxing break if you took
JSK Daily for Jan 3, 2025 View this email in your browser A community curated daily e-mail of JavaScript news Optimizing Productivity: Integrate Salesforce with JavaScript Scheduler Syncfusion
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Airbnb. Given a linked list and a positive integer k , rotate the list to the right by k
Also: I Used a Temporary eSIM While Traveling and Have Thoughts How-To Geek Logo January 3, 2025 Did You Know There might never have been a Star Wars if not for George Lucas' lead foot and diabetes
Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found
Walmart, Amazon, and China's State Grid generate over half a trillion dollars in annual revenue, driven by their vast global presence. View Online | Subscribe | Download Our App FEATURED STORY
View this email in your browser Issue #574 - January 3rd 2025 Weekly newsletter about Web Game Development. If you have anything you want to share with our community please let me know by replying to
Siri's secret recordings; Is streaming still worth it?; Transform your doodles with AI -- ZDNET ZDNET Tech Today - US January 3, 2025 lm-email-verifaction-tool Could AI make you a billionaire in
THN Daily Updates Newsletter cover JavaScript: Mastering JavaScript from Basics to Advanced Topics ($54.99 Value) FREE for a Limited Time This book provides a comprehensive introduction to JavaScript