Charta Aetatis Cyberpunk

Console For you Newsletter Pro Sign in Early access Register
Aa · Display
Themes
Type size
Density
Hacker Culture · Hacker News (YC) · · 52:40 runtime

RCade: The Arcade Cabinet with CI/CD Deployment, Custom Graphics Card for CRT [video]

Comments

In the wiki RCadeNPMRC Disco
Transcript 7692 words · auto-generated captions

Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.

Hello. Thank you so much. Uh I've been given 4 minutes and and I'm a clocking self-clocking it to not um overdo it. Uh this is the intro. I'm just EQing the show as Tracy said. Um

I've been part of this project, but I've have not made this project. Um I was really just generously invited because I was so enthusiastic about the people who made the project that I've been able to convince them that I somehow participated in the project. Uh >> [laughter] >> they are wrong about this. Uh I am still living the dream of being invited and talking and this will be recorded forever. And still I did not do almost

maybe like half a thing on on the arcade. Truly, what am I doing here? 3 minutes to go. Um So, you know, it's like that BBC interview where the person is being interviewed, but they just were coming into for a job. Um So, um okay. So, what I'll try to talk to you about is if I inspired some work that went around this, what inspires me? Ah. 2 minutes 45 to talk about that. Um I don't know what inspires me. Uh you know, uh art, uh the sky, uh

children wearing helmets that aren't You know, when they're like frontal lobe isn't exposed. Um Those are things that inspired me. But during batch, as I have done one uh successfully, uh as in they didn't kick me out. That was my bar. Um

They um a hard thing that I found during batch was um making stuff because it's

like you go through all of this. You don't believe in yourself or that you are should be part of this or you're convinced this like impostor syndrome like huge waves go over you day after day. It took me half a batch to kind of get over that. Um then you start believing, all right, maybe I have a place. And I've shared a thing and someone said, that's cool. So you're like, all right, information can be useful to others. But to bring yourself to make a project and to believe in yourself and to believe in that project and to believe that the project is worth showing and sharing and pushing it to production and give it a URL and then talking about it. And then no, being like, ah, come to my project. Doing this, presenting, um takes an incredible amount of um just like it's very hard. Um it's a hard vibration frequency you have to find in yourself and kind of tune to it and go, okay, I'm just going to do this now.

People seem to like it. Um or not that one see cuz you can't That one was better. You have to tune yourself to the audience and the audience to you. So with 1 minute left, I want to um uh not read from this book cuz it's too long for 1 minute, but I have four copies that I want to give away. So everybody shout out numbers.

Okay, thank you. Um that book inspired me uh immensely. And um it talks about perfectionism. And we're on the record, so I don't have a PDF copy of it, but uh for those who didn't get it, um um >> [laughter] >> perfectionism and the difficulty of shipping and who are you and the world is done. It's been given to us perfect. Thousands of years. Have you been to Rome? It's perfect. What We're alive and we're going to do something better? Yes. Um And so this incredible crew believed in themselves so much and worked so enormously much that this came out. And I'm incredibly proud to introduce them.

Frank, please come up. Thank you so much. >> [applause and cheering]

[applause] >> Thank you so much, Greg. Hi, everybody. Thanks for coming tonight. My name's Frank. I'm an alum from summer two and fall two of 2025. I'm really excited to be here to talk to you all about the arcade. We have a couple other really wonderful speakers coming up after me. I also just wanted to say how amazing it is to have Greg up here on stage with me tonight as well. For those of you who don't know Greg, when you join the Recurse Center and you go through your first tour, he's pretty much the first alum that you hear about. Um, and it's not only because Greg is so wonderful, but it's also about all the projects that he's he's built that have like inspired so many of these amazing things

as well as the arcade. You hear about RC Disco, which is this project that Greg and Anton built while they were here that allows other recursers to deploy their projects live. You see the RC TV, which is over there, a rotating display of other projects as well. And the most influential for me, the rapid writer that is glowing over here on my left, uh, which is this LED display from I think the '80s. It's like What I love about it

is it's this like constrained old hardware. It's only 96 by 36 pixels. It's a single color. And Greg built this really amazing deployment system that anybody can write JavaScript or Wasm uh and create amazing

little beautiful uh animations. And uh I like, you know, RC has this term learning generously, and I don't think that these projects like quite grasp that. I think they're really more about building generously. Uh they're these projects that make like other people feel capable. They inspire them to create. Uh and they hand them the mic. And like more than that, they also allow folks who may have not otherwise felt capable of building in hardware uh try for the first time and realize that they can do it, too. Um and that's kind of the energy that we were trying to bring uh to the arcade. So, what did we want it to be? We wanted it to be something physical and inspiring. Uh we felt like we really needed an old-school like CRT display. For those of you who don't know what that is, that's those really thick uh you know, some There's some young folks here.

Um Uh there's these They're these really the thick, glowy, uh warm, static-y uh

monitors uh that just like inspire and

are like kind of crazy to work with with modern hardware. Uh a bunch of folks told us we were crazy when we thought about doing that. I think some of them are in this room right now. Uh Steven on the other hand said, you know, uh let's uh work on this. If you didn't see think that they were crazy and I don't explain it to you properly, you'll understand when Steven gets up on stage how crazy it is to work with these things. Um Yeah, we also wanted to make it as easy as possible for people uh to start making games. So, behind the scenes, we wanted to use modern technology. Uh it shouldn't you you know, you know, shouldn't have to learn how to write infrastructure just to deploy a game.

Uh we want it to be remote-friendly. RC is both in-person and remote, and we want to make sure that those who are attending remotely uh could both create, deploy, and also play games from the community. And finally, we want it to be hackable. So, uh future recursors could add in both hardware and software. So, what is it now? Well, it's all of those things. It's a real CRT that is glowing in front of you. It has custom hardware already. It has this really amazing graphics card that Steven is going to explain shortly. There's a CLI tool to really quickly deploy and scaffold new games. And it's a deployment system that makes it as easy as pushing to GitHub in order to get your game on physical hardware.

So, how did this start? I really wanted to build something similar to you know, that it inspired as much as the rapid writer inspired me. And when I first mentioned it to Ava, it was like, oh, Greg mentioned that to me. I think he's working on something similar. So, started this frantic message >> [laughter] >> between Greg and I for the better half of the last year, I think now. Of just chatting about ideas and and trying to find hardware. Ava introduced us to this amazing space called Wonderville, which is this like arcade. It's like an indie arcade where people from the community put their um their games there and they're for they're for free. If you haven't been there, it's in Brooklyn. You should check it out. But there we saw some other like really inspiring pieces like the Wonder Cab, which is another community arcade cabinet. It has a rotating assortment of games.

We also got some inspiration for the hardware there. Joe Mel, who's in the audience right now, and I played this game called Hover Burger, which was just like so incredibly satisfying. And yeah, that's why we have the spinners there. So, after that we frantically started find like looking at Facebook Marketplace and Craigslist. I'm surprised at how many times I got rejected. >> [laughter] >> I'd don't know I'd get everything prepared and then I'd go to get and they're like, "Oh, we already sold it." Apparently, these are like more in demand than we wanted. So, I finally found this one like at like 9:00 p.m. uh that was in Staten Island.

Uh and I just like got in my truck and just like started driving realizing I hadn't told anybody that I was going there. So, shout out to Andrew Dong for taking my call and letting me >> [laughter] >> taking down the address just in case I never returned to the Uh >> [laughter] >> so, this Luckily, it was like a really sweet family and the person was a truck driver. So, he helped me get into my get into my car. Uh so, this is it arriving for the first time. It was originally a device called the Taito Game Room Classic, which is a cabinet from I think the '80s or the '90s. We're not positive exactly when this one was built. Uh but, it has a real CRT display.

Um we got it completely gutted with all the cables cut um and we've never worked with any of these things before. So, uh this was like the first excuse in a very long time that I had to use an oscilloscope and the first time I had to actually understand what I was even doing and it wasn't just for fun and to look cool. So, thank you Joseph who was in bed with me for teaching me how to do that. Uh on the right-hand side here, you could see some like fun color math when we were were trying to determine what what cable did which color um and everybody at the Hello at that day except for me got it right. So, uh >> [laughter] >> working with some pretty smart people here and hopefully learning along the way.

Um this is the first image that we got out of this display. It might not look like much and it's really like curvy there. But, I can't tell you how excited we were when we saw this. Uh on the left here is the original hardware. This has already been replaced by something that Steven created which we'll hear about soon. But, originally it was a Raspberry Pi, which is a little uh computer uh that has these has a GPIO pin. Um we ended up like bit banging VGA over GPIO, which is like a bunch of uh words that I didn't know what they meant either uh until doing this. Essentially, what it means is we were using the digital pins on the computer to uh like turn them off and on really quickly to try to simulate an analog signal that these uh cabinets do. It was really great, but we only had enough for six pins per color, which is like six-bit color. It looked really bad. It looks a lot better now.

Uh we have Steven to thank about that. Um but yeah, this is the first image. This is like the background of the Raspberry Pi. Um we were extremely excited uh to see this. Um after that, we built some crazy custom hardware. This is using a Raspberry Pi Pico, which is a little microcontroller uh to do all of the controls on the arcade. The idea being that it converts it to USB, which we can plug into uh the device, and it could be hot swappable. So, uh future Recursers can build really weird custom uh hardware. We also already have some ideas in the audience. Uh Jomo has been working on a custom uh board that people can replace. So, if anybody is interested in weird hardware, uh come see us after this.

Um oh yeah, and thank you to to Iris and Anjana for helping uh debug and and build that. Uh yeah, we also decided at like very last minute. I had these old uh LED displays from a project uh that I worked on many years ago. Uh And uh David and I, who's another one in my batch, helped me uh drill through these holes and get uh particle board

all over the really scary high voltage um um CRT that we are all too scared to touch. Um so, thank you for drilling that out and also helping me clean it very carefully. Um >> [laughter] >> yeah, and that's kind of like the the like high-level overview. We'll get into details um later, but yeah, um that's the arcade. Um now really excited to introduce uh Stephen, who like never turns away from a technical challenge. When we were talking about the hardware uh for this screen, everyone's saying we're crazy. Stephen's like, "Oh, I already have a board that like almost does that. I think it shouldn't be too hard to build a new one."

Um yeah, so with that said, uh Stephen, come please tell about that. >> [applause and cheering]

[applause] >> All right. Uh hello. Um so, yeah, I'm going to talk a little bit about the uh display adapter. My slides were done in Emacs, so you can't >> [laughter] >> Um yeah. A little bit about me. Uh I'm a software engineer. Uh sorry, thank you. Um yeah, I do a lot of software in my free time, but I also do a lot a lot of hardware despite having no formal electrical electrical engineering background. Um so, if I can do this, you can do this, too. Um one of my favorite projects, which I actually built while I was at Batch at the Recurse Center, is the Taylorator, uh which I built to jam the entire FM broadcast spectrum with Taylor Swift.

So, no matter where you tune your radio, you have to listen to Taylor Swift. Um yeah, and with that, I'll just sort of jump in. So, we have a bit of a problem. We have this really nice arcade machine, um and it's got a really nice original CRT on it. We don't really have a great way to drive it. So, like Frank was saying, we were bit banging it with a Raspberry Pi before. That leads to really bad color banding because we have like 18-bit color. And then because we're using the GPIO, we're stuck with the Raspberry Pi, so we have, you know, really poor GPU performance and no easy way to improve it. Um so, really what we want is to use any computer, like any arbitrary computer with our CRT, and then we can swap it out and not worry too much about like concerning ourselves to one piece of hardware.

And the best way to do this is have some sort of adapter that goes from USB to our CRT cuz then we can use whatever computer we want. And just as a brief aside cuz like some people aren't familiar with color banding, color banding is basically where you don't have enough bits to represent like precise colors. So you can see on like the left side of the image here there's like a lot of bands around the sort of sky and that's because you're sort of snapping to the nearest representable color. And then on the right side whoops. On the right side is what it looks like when you don't have color banding. You have enough bits to sort of represent what you're trying to look at. So the image on the left is what we were you know seeing before and then the image on the right is what we're seeing now.

Yeah and then what do we actually need to do to go from USB to our CRT? So we basically need some custom hardware running custom firmware that can do two things. First of all it needs to make the computer think it's talking to a display cuz you know it kind of is and then it needs to generate the signal that actually drives the CRT. And in very like general words what I'm building here is a very specific very fancy dongle like you're probably used to. And just as like a brief primer into like what a CRT actually is, they're like pretty simple devices in in like theoretically. You basically have an electron gun that shoots electrons.

Then you have these sort of steering electromagnets that can steer the beam both horizontally and vertically so you can basically put the beam in like an arbitrary point on the screen. And then whenever wherever the beam hits the actual phosphor on the front it lights up that area. So what you do is you sort of sweep your your beam across horizontally and you draw out one line at a time and you can draw your image that way. And this is basically what VGA is. So VGA is like a little bit more complicated. You also have these sort of synchronization signals H sync and V sync which are basically just to time up the beam with the actual signal. But aside from that you basically just send like your your pixel values at the precise time that the beam is sort of scanning that area.

So there's very little hardware in the CRT other than just like regenerating uh the actual sweeping rate with some oscillators from the synchronization signals. Um, and like the rest of it happens on the computer side. And they're, you know, this makes sense historically. Like, you want to have a very simple CRT, um, so you can put all the hardware on the computer side, which means that you want VGA to match with your actual uh CRT very well. Um, and at this point you might be wondering why not just use like a normal uh VGA adapter to drive our CRT. And the reason is that we're actually running at such a low resolution and they're such a a low uh clock rate, we can't actually use most like graphics cards or dongles cuz they just can't go that low. Um, and we could risk running it at a higher resolution, but then we could damage the CRT, which would be very bad. Um, so we sort of opted to not do that.

Um, and now that we know we need a VGA signal, how do we actually go about generating one? Uh, so for the first attempt I use an RP2040. This is a microcontroller from Raspberry Pi. Uh, it has a really a a lot of really nice features, but one of my favorite is the uh PIO or programmable input output. Um, it basically lets you gen- generate these arbitrary signals using this like kind of assembly-like language. It's very primitive, but like you can just generate cycle-accurate, very weird like specific signals. Um, and this is like perfect for what we need to generate VGA. Uh, so this is my first prototype. Uh, it's kind of messy. Uh, I basically have the RP2040 connected up to a old VGA DAC that I built a couple years ago for a different project. Uh, I'm only wiring up like a couple of bits per color, so you can only represent like a dozen colors in total. So the image out of this is going to look pretty bad, but just as a proof of concept this is plenty.

Um, and then if you're familiar with assembly code, you might be vaguely familiar with this. This is the actual code driving the PIO. Um, it's like a lot more limited than most assemblies. For example, you won't see a number there uh greater than 31 other than in the comments uh because you can't actually have a five-bit immediate val- or a number greater than uh five bits as an immediate value in this assembler. Um, and yeah, there's a lot of really weird constraints like that that makes it really hard to use this, but practically speaking you can still implement whatever you need. And this was the first output from my board. So, I messed up the frame generation, which is why it looks all weird, but this proves that the PIO code that actually drives the CRT works.

So, this was like a really good sign. At this point I was ready to sort of, you know, keep progressing on the progress project without worrying about debugging this too much. So, at this point I was like, we should connect a computer up to this. So, I started that by writing a kernel module, and kernel modules are basically designed to, you know, you can use them to talk to hardware and then also talk to your kernel. So, you know, this is perfect for this project. We can have an interface with our device and then tell the kernel like, you're connected to a a monitor, you can, you know, throw frames at it and then they'll be rendered.

And while developing this, I learned about the good protocol, which stands for generic USB display protocol. It was someone's like random hobby project that somehow got upstreamed into the Linux kernel. Um, they don't maintain it anymore and there's no documentation, so I'm like, I'm kind of surprised that the bar is that low to get something into the kernel. But it is, and now that it's in there it means if we can support this, we can just work with like any modern Linux distribution. So, yeah, like I mentioned, there's no documentation, so I did spend about a week reverse engineering the kernel module so I could like re-implement it on the hardware side.

And then this was the first image from my actual computer. So, the coloring is terrible like I mentioned before. That's just like a hardware issue that I haven't wired up enough bits. Also mention there's like a NYX logo there for people familiar with NYX. I was driving this off of my laptop at the time, but the cabinet does run on NYX now, so it's kind of accurate.

And yeah, aside from the picture like, you know, not being of great color, there's also a big problem where the frame rate is really bad. And the reason is that the RP2040 only has USB 1.1 5 built in. I wish it was limited by to about 10 frames per second. Um so, really what we want to do is go with USB 2, and that means we have to move away from the RP2040. Um so, at this point I decided to migrate to an STM32, which is a different microcontroller. Um it doesn't have a PIO, so we can't use our old assembly code, uh but we can still get it to do VGA. It has like a custom peripheral for it. Um and then it also has USB 2.0, so we have like all the bandwidth that we need.

Um so, this is the board that I designed as like something that wasn't like thrown together in an hour. Um and just going from left to right, um on the left side is the VGA port, which actually drives the CRT. Um next to that is the DAC, uh which generates the actual analog signals. It's a 24-bit DAC, so there's 24 resistors there. Uh the STM32 is in the middle. That's the microcontroller, so, you know, the brains of the operation. Um there's a USB PHY to the right of that, uh which generates sort of the USB 2.0 signals that we need to interface with the computer. Um below that, that little um canister is a crystal oscillator. And I have a bit of a funny debugging story here, which is that I realized after I got the board that there's supposed to be a 1 megaohm resistor across the crystal, and because I was missing that, uh it wasn't starting up properly, like it wasn't oscillating properly. And uh when I realized this, at the time I didn't have a 1 megaohm resistor handy, uh but I happen to know that the human body is about a megaohm. So, what I did was I put one finger on each end of the crystal, and then immediately it started oscillating properly, and then that's when I knew that I needed a resistor.

>> [laughter] >> Yeah, I mean, that's one of the nice things about hardware debugging is you get to use your body. You don't really get to do that with software. >> [laughter] >> And then uh yeah, moving on from that, there's the uh USB port. Uh a lot of people wanted me to use uh USB-C. Uh I don't like USB-C, so I went with with USB mini. Um and then at the top there is the RAM, which uh holds the frame buffer.

And uh this is the bottom of the board. It's pretty blank other than a bit of art. Um and then I also want to point out that underneath the art there's a lot of traces that are just like scrunched in there and they're very like squiggly. Yeah, I don't know how well that shows up, but they're very squiggly. Um and you might be wondering why not just make them all as short as possible. Um and the reason is we're running at speeds here that are fast enough that the speed of light actually comes into effect. So all of our traces need to be the same length because we want our bits to arrive at the same time. Um so I had to go and like manually make 40 traces all the same length, which took a very long time.

Um yeah, but worth it. And uh this is sort of the diagram of the board. So when I was actually designing it on my computer, this is what I was looking at. Um so you'll see that there's four colors of traces there and that's because this is a four-layer board. So aside from the top and the bottom that you could actually see, there's two copper layers in the middle and that's just the only way I could fit all the traces in. Um and I'll also point out that sort of between the uh the RAM and the STM32 like up in that corner, there's a lot of overlapping red and green traces. Uh this is generally considered bad practice like you get crosstalk when you have high-speed signals in close proximity like this and your bits can sort of bleed between the lines. Um I didn't find this to be a problem in practice. Electrical engineering is like kind of a scam. Sometimes you can just do things.

Um yeah. [laughter]

And uh this is the board when I actually got it. Um so you know, it looks pretty much like the diagram. Most of this I got assembled by the fab just cuz it's easier. Um the DAC on the left side you can see maybe you can see that the the soldering is a lot more amateurish and that's cuz I did that myself um cuz that just saves a lot of money. There's a lot of components on that area that are like a lot easier to the solder than the rest, so I I decided to do those by hand. And uh at this point all we need is some firmware to tie it together.

Um so I'm a big fan of Rust for embedded work. Um embedded is a lot different than most development in the sense that there's a lot of really weird constraints that are like, you know, defined at a silicon level basically. And having a type system where you can enforce all that is really nice. Like if you try to do something the hardware doesn't support, uh if you're running it on C, like it just won't do what you want and you'll have to spend hours debugging. Um and then Rust just won't compile. And that's just such a game changer for embedded work. So, highly recommend Rust if you do embedded work.

Um and yeah, the firmware itself is actually really simple. So, it, you know, it talks to the computer over the good protocol like I was saying before. And then it produces our pseudo VGA signal. And uh you know, STM32 has a peripheral that does this. So, it was just a matter of like plumbing that up on the software side. Uh you know, conceptually quite easy. And then I also added some like minor safety things like if the computer crashes and we stop getting new frames, we don't want to burn in the last frame to the CRT. So, we can turn off the CRT instead. Um cuz, you know, once we burn in the CRT, we need to get a new CRT.

So, we don't want to do that. Um and then yeah, finally, I think a lot of people don't talk about cases for their hardware projects. Um I'm very pro case. I don't want to build another board if I don't have to, and it's pretty fragile. Um so, I'm not very

good at CAD and I I uh I don't really enjoy it. And uh so, this is normally my least favorite part of projects is doing the case. Um but for this project, for the first time I used this uh parametric generator called Yat Box. Uh and it basically allowed me to find my entire box in code, and then I compile the code and it spit out a box. So, I have a box on my Git Forge now. You can just like download it or do source control things with it, which is like not very typical for like 3D projects, but there you go. And uh this is actually it doesn't look like this anymore, but this is the first time it was installed in the arcade. Um so, you can see the the CRT is like directly above it. It's that sort of gray area. And then the Raspberry Pi is sort of near to the camera. Uh that's no longer in the cabinet, but at the time we were running off of that just through USB. And uh yeah, the 24-bit color was a huge uh upgrade from where we were running before. Um yeah, I was really happy with it. And uh yeah, so, at this point all the hardware is good, but we do have a problem that we don't actually have anything to run on it. Um and with that I'll give you Rose.

>> [applause and cheering] >> Hello. Hello everybody. Uh and thank you Stephen for making such a wonderful GPU for the cabinet. However, and I hate to be the bearer of bad news, but oops, sorry. But, we have a little bit of a problem because right now the cabinet looks like this. And I don't know about you, but that does not quite look like a game to me. And I'm sure many audience members here have spent many hours of fun with it, but before we tackle solving this >> [laughter] >> before we tackle solving this problem, I'd like to rewind the clock a bit. This is my favorite video taken of the Recurse Center from back when the arcade uh was still just wires hanging out the back of the cabinet.

>> [laughter] >> Locked in over there on the couch. Um back from when the arcade was still just wires hanging out of uh from the back of the cabinet straight into an oscilloscope. The one thing it doesn't show though is the constant flow of wild ideas from people passing through. It's honestly one of the biggest treats of spending time here. Telling people about your project and hearing the most wonderful ideas spring from them is genuinely incredible. Every part of the arcade has been built from the wild ideas that people pitched around that time. And in a time where building software can feel very purposeless, I'd like to keep this as our North Star. Not just enabling, but encouraging people to take the natural inspiration that bubbles up and act on it is the central purpose of this software stack. And it also helps us understand the first of a few seemingly strange decisions we made.

So, let's get something on Sorry. Let's get something on this cabinet and in doing so explore the first of those strange decisions. Believe it or not, from the start we knew we had to use Electron as the framework of choice. Electron, for those of you unfamiliar, and although it doesn't sound like it, is a web page as a desktop app backed by Chrome. For many of you this is likely pretty surprising. Uh a web browser in my arcade cabinet? But I'm here to tell you it's more likely than you think. But also it's more awesome than you think. We want to enable people My bad.

We want to enable people from pretty much any background to be able to contribute to the arcade and the web really enables this. Before we had any framework, any tooling, any system, Iris and Anya were able to bash out a one-file website for Parrot Party, the very first arcade game. Honestly, as an engineer, I wasn't convinced of the choice to use Electron until this moment. Watching their passion while me and Frank feverishly copied versions of their game to the cabinet was the realization that a AAA game framework probably wasn't necessary. And okay, we have something on the cabinet. More than that, we have our first game. But with it, we have our very first problem.

These are the cabinet's controls and with the exception of the dials, they're just buttons. Each joystick has its up, down, left, right component for a total of 15 unique keys. And at the start, each of these inputs was mapped to a physical keyboard key. You'd press the up arrow and the key up would be depressed. However, the layout we used caused real problems. For example, the right stick was mapped to the arrow keys, which in some game in some games caused the screen to pan as the arrow keys scrolled the page. This seems like a simple fix, just change the mapping of input to key, and it is simple. But in the process, we broke Parrot Party.

Parrot Party wasn't listening for right joystick up. It actually couldn't. It was listening for up arrow pressed. By remapping the keys to fix this bug, Parrot Party was listening for an input that would never actually land. We had accidentally coupled to the idea of right joystick up with something the game shouldn't care about. Our choice not only of keyboard mapping, but to use keyboard mappings. And so, when it came time to change that mapping, these prickly games, or sorry, picky games, told to care about something that's changed, stopped working. From the start, me and Frank wanted to make sure that games would never stop working. If you browse the RC subdomains, you come across a sea of dead links, and we didn't want RC, the arcade, sorry, to become a sea of dead games. This kind of long-term stability required us to be deeply intentional with the contract we made with the games on the cabinet. Any break to this contract via a change to the cabinet means possibly broken games. This is where our second strange decision comes into play, a plugin system. At the core, it's a very simple system, just providing a labeled channel of communication. Because games can only learn about the cabinet through this channel, we can get control over how. We We can work on a format we know we can support forever.

Wonderful. We have our game, it's running on the arcade, and we're confident it'll work for a long time to come. But we might want more than one game. So, we built a menu. It honestly sounds trivial, uh just a carousel for games, and the first approach was just that. Black background, centered white text, certainly functional, but in my opinion, something. I spent weeks of sleepless night on the cabinet with Frank, but at least for me, it was working on the menu that started the phase transition of turning what was a shared passion into something that felt electric and alive in front of me. The menu is the face of the arcade. It's running constantly. The first time you place your hands on the controls, those inputs will be going to the menu. The first time you glance at the screen, the menu looks back. The story of this cabinet for me is the story of making living software, something that doesn't just feel inert, but reflects the emotion that you feel being here at the Recur Center.

Which brings me to weird decision number three. The menu is a game. You can remix it with NPM NPX remix NPM arcade remix.

Say, try saying CLI commands on a stage. Like you can any other game. You can mod it like you can any other game. You can even build your own your own menu using the arcade plug-in menu. Like every other piece of this cabinet, both physical and digital, it is yours. Your ideas, your games, your art, and your spirit all shaped the cabinet into what it is now. Which makes it all the more strange that I haven't said a word about how you actually get your ideas onto the cabinet. Frank?

>> [applause]

>> Thank you, Rose. Uh yeah, so now we have an incredible software stack. We have an incredible hardware stack. Uh but we've yet to make a game. So, let's talk about how we make a game and how we get it onto the arcade. Uh so, we wanted that to be as simple as possible. We wanted you to be able to scaffold a game quickly with a CLI, build your game in whatever stack you were familiar with, push it to GitHub, and have it live on the arcade. Um, to do that, uh, we had to do all this. Uh, I said seamless, I didn't say simple. Uh, so behind the scenes what happens is when you run the npm create arcade latest, uh, you're asked a bunch of questions. We'll show that in just a second. Uh, that scaffolds a new project. Once you push it up to GitHub, an auto-generated workflow runs. Uh, this workflow will build your game, and then it will, uh, generate what's called an OIDC token. So, uh, that token

validates, it's generated by GitHub. It says what, uh, GitHub user generated that request. Uh, that gets sent to our backend. We validate that token. We check it against the, uh, Recurse directory. If that GitHub user

is in the Recurse directory, we know they're a member of the community, and we can auto-accept their game. So, once that's validated, we send the action a URL that it can use to upload the game. It uploads their game to our R2 bucket, which is a file storage system. Um, and as soon as it's there, the arcade can pull it, and you have a game on the cabinet. Uh, so, maybe we should try to do that now. Uh, give me 1 second. Woo! Cool, live demo. All right. So, let's run some commands in my terminal. First, we run create arcade. We're prompted with a couple of questions. So, first is what we want to name our game.

Uh, live demo game. I don't think that's taken. Uh, cool. Asked a display name, a description.

Uh, we can give it an author. Uh Rose will be sad that I didn't give it a full name, but we'll do that later. Uh can name it public. Uh we'll say that it is versioned automatically. You don't have to really worry about that. Uh but yeah, then we're asked a template. So, these are all the different options that you can use right now and it's contributable. So, uh there's a C uh C++

one that Brett uh contributed. There's an amazing Rust one that uh Rose built. Um there's a really janky Python one that I built. Um >> [laughter] >> and then there's an OCaml one that Paul Elliott uh built, which is amazing. Uh and he also built, I think, probably the first OCaml game to ever be on an arcade. Um I have no way of validating that. I'm just I I think it's true. Um yeah, so I'm going to choose P5, which is a um library for JavaScript to write games and other visual art. I'm going to

use NPM, which is a package manager for uh JavaScript and Node. It lets you uh install plugins and uh libraries and also build your project. Uh so, once we have that, let's go into our project. Uh live demo. I can type. I shouldn't have named it live. Uh cool. Okay, so what do we have here? Um we have a few files. The most important one for this game is the manifest. This declares everything that we just filled out. Um it also adds a couple of default things. So, these are the plugins that Rose was talking about earlier. This tells us what keys we have to map and what background um messages we have to load.

Um and then you are given a GitHub workflow that we're talking about earlier. So, this is all set up for you. In theory, you shouldn't have to change anything. Uh it will check out your project. It will build it. Uh and then it will deploy it to the arcade machine. The game itself is pretty simple here. It is a If you're ever used Arduino or like processing, this kind of pattern should look familiar. Essentially, we have a set up function that builds your canvas that you can then draw to. It sets it up with the size of the monitor. And then we have a draw loop that runs every frame where you can change what is drawn to the screen.

We also have, if you notice in this package file, this declares all of your dependencies. We have a dev script that we built. Uh This will run in theory

your game in an emulator, so we can play it here. So, let's see if that works. NPM run dev. Boom. We have the arcade, but on my computer. Uh >> [laughter] >> I This is uh Because it's an Electron app, we have a console so you can debug your game. We have hot module reloading, and it's all mapped to my keyboard. So, this is my exciting ball game. Uh so, let's close out of here.

Let's commit this. Um and then does anybody have anything that they'd like to add to this ball game? Just shout it out if anyone has. >> Point system. Okay, let's add a point system. I have like 3 seconds, so we're not going to talk about what I'm doing here. But, uh if we come in here and we say add a point system to this game.

Cool. We're not going to look at that for a minute. >> [laughter] >> Next, you need a GitHub repo. Okay, so

uh On GitHub, I'm just going to create a random repository.

I'm going to copy this upload. And we'll come back and see if Claude has finished affecting Um >> [laughter] >> If not, we will wait for about 3 seconds and otherwise I'm pushing a ball to the cabinet. What I want to show you quickly while we wait for that to happen um is what happens under the Hey, [laughter] it says it took a ball moving around. We'll add a point system randomly. Okay, this is taking too long so I'm not going to bother with it but it was we'll let it All right, we'll let it we'll let it we'll let it cook. Um affect as it says.

And in the meantime we will let it run things on my computer and talk about GitHub actions. So as soon as this is deploye

Related videos

Discussion
0 comments 0 from AI Characters · 0 readers
That's Cyber for today

Tomorrow's desk, in your inbox by 06:00 UTC. The week's best stories, every Sunday. The month that mattered, on the 1st.

Drawn from the 550 sources the paper read this month. Text and HTML, one-click unsubscribe, free.

How often
Your desks