5 ms·
Show HN: I built a multiplayer Gameboy
Still very much a work in progress, but really wanted to share this even in it's early state. Had heaps of fun building it to learn more about WebRTC.
- trh0awayman 3y agoYou should add "democratic mode" - every button push counts as a vote for that control. An election is held every X frames.
- tholm 3y agoGood idea! Adding that to my to-do list.
- sharkjacobs 3y agoTwitch Plays Pokemon (2014)
- tholm 3y agoThat's exactly what inspired me to make this, I wanted to learn about WebRTC and used that idea as a base but also wanted the potential to play more real-time titles as well.
- daveidol 3y agoCurious what is the advantage/disadvantage of WebRTC for an application like this vs WebSockets?
- tholm 3y agoGreat question my original implementation was actually with WebSockets for this. I ended up going with WebRTC as I'm using AWS APIGateway and streaming data for things like audio and video end up being very chatty or you end up buffering to reduce chattiness (and cost) but introduce lots of latency. I decided to shift to a peer to peer model to try and keep the latency down and use the websockets implementation I'd written as a signalling server instead. Websockets are way easier to comprehend and implement than WebRTC (learning the connection negotiation process for NAT traversal isn't much fun). But in the end using WebRTC meant I could host a more cost effective demo that could still scale reasonably well.
- gberger 3y agoI can't believe it has been almost 10 years since Twitch Plays Pokémon.
- wesapien 3y agoBest mode is where decision makers are given power without any accountability. We just finished "The Legend of Gain of Function" and we were all surprised to not finish the game.
- sen 3y agoAlso “anarchy mode” where it switches to a new random player after every button press. Would be pretty fun once there’s more than a couple people connected.
- oneandonley1 3y agoVery cool what games work with it? Have you tired Pokémon battles
- tholm 3y agoI haven't exhaustively tested the emulator, but haven't found anything that doesn't work so far. Pokemon battles work well, was testing it with some friends today, with shuffled controls it was pretty fun.
- pjerem 3y agoThat’s cool :)
- noduerme 3y agoSo... this doesn't have head to head (i.e. where you'd connect two gameboys with a cable and play Tetris)?
- tholm 3y agoNot at the moment, but that's possible to implement by extending the emulator and this webapp. This implementation was more inspired by something like twitch plays pokemon (multiple users competing for control), but on a smaller scale and also playable with more realtime titles.
- indeyets 3y agoSo, there's no actual device, right? It's not a gameboy, but a custom web-ui for emulator
- hauxir 3y agovery cool. uses similar ideas to https://snes.party https://snes.party and https://nes.party https://nes.party
- tholm 3y agoThanks for sharing this, wasn't even aware these existed, it's actually something I was thinking to working on next.
- bejd 3y agoGreat work! It would be nice if the demo page had a game ROM ready to go. You could probably find something free and/or open source on itch.io.
- dandigangi 3y agoShocked the Lambdas are good enough for perf needs.
- tholm 3y agoThe lambdas themselves do very little, most of the work is actually done by the game host. The bulk of the work for the lambdas is to process websocket events for signalling to establish peer connections.
- dandigangi 3y agoMakes sense. Thanks for clarifying.
- birdyrooster 3y agoIts just RPC
- vapidness_is 3y agoThis is super cool! What emulator did you use? Would be cool to add this to https://afterplay.io https://afterplay.io
- tholm 3y agoI used https://github.com/roblouie/gameboy-emulator https://github.com/roblouie/gameboy-emulator which I forked and made a very minor tweak to allow streaming audio over WebRTC. Code was super well organized and easy to understand. Was also very easy to integrate into the webapp.
- deleted 3y ago[deleted]
- seabass-labrax 3y agoI get a 'oops not ready' message when trying to load a ROM file on Firefox (Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0). Here's where I got the ROM from: https://radicorn.do.timdeve.com/ https://radicorn.do.timdeve.com/
- tholm 3y agoLooks like the linked game is a GBA game, for now this is just a GB emulator (can probably play some GBC titles as well). Was considering making a GBA version of this though.
- seabass-labrax 3y agoThank you for the explanation :)
- sen 3y agoFor people who were expecting online multiplayer with physical game boys, check this out: https://youtu.be/KtHu693wE9o https://youtu.be/KtHu693wE9o It uses the Link port to simulate local multiplayer over an RPi Pico. I’ve bought the kit (https://stacksmashing.gumroad.com/l/gb-link https://stacksmashing.gumroad.com/l/gb-link) and it works great.