Live data from Hacker News

Show HN: Sprig, open-source game console and engine, by teenagers for teenagers

github.com

11–20 of 82 posts

Re: Show HN: Sprig, open-source game console and engine, by teenagers for teenagers

#11
post #6

In a way it is funny to see JavaScript vs Python competing for the next BASIC in this kind of platforms. Good work, it looks cool.

We debated running JS (Kaluma) or micropython on the Pico. We started with Kaluma because the editor is in the browser. After we got some game submissions though we realized we'd have to do our own wrapper around Jerryscript for performance reasons which is what the console ships with.

Re: Show HN: Sprig, open-source game console and engine, by teenagers for teenagers

#12
post #5

This obvious age discrimination against non-teenagers is preposterous! Where are the lawers when you need them? Just kidding, this is an awesome project! I wish I would have been that creative and competent in my teenage years... or even now, for that matter. Respect!

Haha thanks. Hack Club certainly has adults involved (like myself) but we structure projects so teens can be core contributors (the rest of the core engineering staff on Sprig are all less than 20 years old and I'd say 95% of the games in the library are from teenagers). As for Sprig itself the only part that is limited to teens is that we give the console away for free to teenagers who submit games to the gallery. O…

Would be nice if you sold them to us old people at a 2x cost so we can get one and pay for one for a teen

Re: Show HN: Sprig, open-source game console and engine, by teenagers for teenagers

#13
Hey everyone, I'm Cedric and part of the Sprig team. I'm 19. I've been trying to make games since middle school.

Right now I'm working on getting Lingdong Huang's - who has made a bunch of really cool interactive experiences[0] (like a human face eating simulator) - he made a Sprig game for us[1], I'm trying to get it working on the physical device - but there's a problem, since the device is Raspberry Pi 2040 based and only has 256kb of available RAM (yet the games are written in JavaScript - we run them using our own little JerryScript based runtime[2]).

The runtime also runs on personal computers, not just arm-eabi-none, to help us test the games to get better error messages than the physical hardware can give (because no operating system). We call this our Sprig emulator, even though it's just the runtime compiled to a different architecture, hooked up to CoreAudio and a minifb window. Thanks to the emulator, we know Lingdong's game theoretically only uses 180kb of RAM, so we should be fine. And it actually works great in the emulator, but when I try to run it on the device it doesn't get past the startup screen ... which hurts because the entire reason we made the emulator was to get better error messages.

All I can do now is puts("") debug everything and figure out what code is reading or writing out of bounds and making the device freeze. I probably configured the heap to be too small again.

I have always loved finding excuses to figure out how things _actually work_, which is why every time I sit down to make a game, one thing leads to another and I'm making a game engine. Working on Sprig has taken this to a whole 'nother level because it's essentially our own operating system, too. Nobody tells you if you overflow the stack, the stack guard is only 32 bytes and disabled by default. It all started as a module for Kaluma, but we hit so many performance, RAM and flash constraints that we found it was better to write our own JS runtime. Apologies to Kaluma which is also trying to frontpage HN right now! We both use JerryScript heavily, but Kaluma connects you directly to the GPIOs and IRQs. We just connect you to the screen and the buttons through the same API as in the web browser, which is handy for making tile-based games.

[0] - https://lingdong.works/ [1] - Lingdong's game. Keep in mind the controls are all WASD and IJKL because the device only has 8 buttons. https://editor.sprig.hackclub.com/?file=https://raw.githubus... [2] - github.com/hackclub/spade

Re: Show HN: Sprig, open-source game console and engine, by teenagers for teenagers

#15
post #9

Except for the bare pcb thing, it looks cool.. I cringe thinking about long-term exposure to bare PCBs, sure RoHS is a thing, but it's R(eduction), not E(liminiation).. And those guidelines are under the assumption that the electronics are packaged and not touched to bare skin.. PCBs are still made with fibers which can penetrate the skin, and I'd be worried about exposure to soldermask, solder and what other chemica…

Oh I thought that was just a cool picture, didn’t realize there is no housing :(

Maybe someone has created a 3d print for one?

Re: Show HN: Sprig, open-source game console and engine, by teenagers for teenagers

#17
post #9

Except for the bare pcb thing, it looks cool.. I cringe thinking about long-term exposure to bare PCBs, sure RoHS is a thing, but it's R(eduction), not E(liminiation).. And those guidelines are under the assumption that the electronics are packaged and not touched to bare skin.. PCBs are still made with fibers which can penetrate the skin, and I'd be worried about exposure to soldermask, solder and what other chemica…

If you look closely at the picture of it in action, there is a clear acrylic shell covering the PCB on the back. They're actually gripping the acrylic shell. In the picture of the individual components, it appears to be the laser-cut wood pieces. That picture includes a pair of pieces that look like they go on the front (there's a cutout for the D-pad/face buttons), but I don't see them installed on the action shots. I think that the shell may be intended to cover both back and front, and they just didn't install it for the action pictures.

Re: Show HN: Sprig, open-source game console and engine, by teenagers for teenagers

#18

Hey everyone, I'm Cedric and part of the Sprig team. I'm 19. I've been trying to make games since middle school. Right now I'm working on getting Lingdong Huang's - who has made a bunch of really cool interactive experiences[0] (like a human face eating simulator) - he made a Sprig game for us[1], I'm trying to get it working on the physical device - but there's a problem, since the device is Raspberry Pi 2040 based…

This looks pretty cool, and takes me back to my early programming days.

> by teenagers, for teenagers

> I'm 19.

Do you plan to continue contributing after you turn 20? I'm not familiar with the project, so I'm not sure what "by teenagers" means in practical terms (e.g. certain types of contributions no longer allowed?).

Re: Show HN: Sprig, open-source game console and engine, by teenagers for teenagers

#20
post #15
post #9

Except for the bare pcb thing, it looks cool.. I cringe thinking about long-term exposure to bare PCBs, sure RoHS is a thing, but it's R(eduction), not E(liminiation).. And those guidelines are under the assumption that the electronics are packaged and not touched to bare skin.. PCBs are still made with fibers which can penetrate the skin, and I'd be worried about exposure to soldermask, solder and what other chemica…

Oh I thought that was just a cool picture, didn’t realize there is no housing :( Maybe someone has created a 3d print for one?

There are some backing covers which are laser cut. It's possible to swap with a 3D printed cover and use the same mounting holes.
Post reply on HN