Hello everyone. I recently wrote a good article about leaving gamedev. But yesterday I came back with an ambitious idea, only to fail again.😭😭
Let me say right away that I tried using a torrent. trackers... Not for data transfer, but as a signaling server. Enjoy reading, I struggled with all these technical terms, btw!
A little background
A couple of weeks ago I decided to get back to the old ways and launched a multiplayer game of Quake 3 on dos.zone. The site is great, there are a lot of players, and I got really into it. Too much so, in fact, that I decided to learn how browser multiplayer works.
Idea
Guess what. I decided to create my own browser-based multiplayer game, inspired by this project. But I'll tell you right away, it didn't work out. More accurately, I didn't even try.
When I found out about WebRTC, p2p, ipv, and other crap, my tower (head) exploded, to use slang.
I don't know how it all works, but the problem turned out to be that there are two options for connecting with players.
- A central server is the worst option; it's either paid or limited.
- Peer to Peer is the perfect solution, but with one major pitfall. So big, in fact, that it ruined everything.
P2P Problem
With a p2p connection, players connect directly to each other, but you need to know the IP address.
But there's a problem with this: you can't just point your finger at the internet and hope you can connect to someone; you need to know their public IP address and port. To do that, you need a signaling server that tells players they exist. It's essentially the same as a central server, but it's used once to establish a connection, not to transfer data.🤬👹
(This is a huge exaggeration btw)
Another trivial problem
Even if you managed to find the IP and port, don't expect mercy. You probably have a private IP - idk what to call it, but you need to use NAT penetration testing, like STUN, to bypass your router. It sounds crazy, but without it, your router will simply reject the request from the other player because it doesn't know what to do with it.
A brilliant solution
WHAT IF WE USE A TORRENT TRACKER TO DISCOVER PEERS, I.E., PLAYERS? Brilliant, but a failure. This idea is good because when you distribute a file, you can see the IP and port - that's what you need, without signaling servers, but...
IT DOESN'T WORK IN THE BROWSER!!! Or rather, there are workarounds, but I'm running out of RAM (in my brain). So, I've given up.🥱
Discuss
Thanks for such support for the previous article, btw. Do you think my idea makes sense? Or is it just more nonsense?
How would you solve this problem?
And of course, those who know the ropes would be interested in your opinions on the technical implementation.

Top comments (2)
I would recommend starting small first. If you try to be ambitious, it tends to be an issue.
Try following the article I wrote about creating a multiplayer game using MQTT. It might be easier in my opinion and setting it up shouldn't be hard:
I Vibe Coded a Multiplayer ASL Game using MQTT! 🌐
If you are worried about API keys, Tauri hides it automatically since the app uses Web stuff like HTML, CSS, etc. You can build it using React if you like! It's like a website inside of an app is another way of saying it.
Well, I don't know. This doesn't seem to be the idea I had. The problem is that I'm too lazy to do something and that's why I think about my players the same way, lol, that they're too lazy to do something. Laziness breeds ambition. A strange statement, but you are right, you need to start small.👾