Multiplayer without a server using UDP holepunching

preview_player
Показать описание
Imagine a multiplayer game that doesn't suffer from server outages and that doesn't require regular income for the servers to run.

That's what I tried to do for Cubyz. And it actually works.

I'm using UDP holepunching with some modifications to initiate the connection. Because I'm using UDP I also had to effectively reinvent TCP to make sure important packets are received.

Cubyz is an open source voxel sandbox game.

Cubyz will be updated every couple months.

Chapters:
0:00 Intro
0:21 First attempts at Multiplayer
0:48 no public server!
1:15 I got diverted
1:37 UDP holepunching just works
2:03 How holepunching works(animation)
4:24 Problems (symmetric NAT)
6:28 Reinventing TCP
7:32 No cheating/griefing protection needed
8:35 Entity interpolation
10:08 End

Music:
Water Prelude by Kevin MacLeod

#devlog #gamedev #voxel #multiplayer
Рекомендации по теме
Комментарии
Автор

I like that you think of the time when nobody will support the game anymore. I find it sad that some games just stop working, even though you bought them.

benrex
Автор

I love the pixel art demonstrations you make! Really makes it easier for my computer illiterate self to understand

retryin
Автор

that's neat, as someone who doesn't know shit about this kind of stuff, it was actually pretty clear and understandable, you did a good job on the explanations !

dottedboxguy
Автор

In Minecraft, I'm pretty sure that item drops are actually physically simulated by the clients (with position periodically corrected ofc), instead of just being interpolated. This also true for falling sand and maybe some projectiles, to make the game feel a bit more reactive. Most other entities are interpolated though.
Really interesting video anyway, I knew about the concept of hole punching but not in details, and didn't know you could do it without a third-party.

appelnonsurtaxe
Автор

Did some UDP/TCP java programs years ago, for a game, but as a low level project i did just each player a ball that shot each other, WASD to move, space to shot at the mouse position, was funny, not sure why i stop making that after that step work well with a bunch of friends of mine, if you die, respawn, was cool to test. But i guess my friends love to much play stuff, and i was frequently invite at that time, what drives me to not access my code for long periods, what make all confuse when i got back... This is why my new project i started in the beging of 2023 i have a rule to make at least a single line, or modify at least a single image of anything in the project each day, i did it really well so far, maybe i miss some days, but on average i got almost 100% days of at least see something, and time to time i just want to check a single problem and solve a lot, other time i got stock for hours in the same problem...

viniciusschadeck
Автор

Ily :3 *mwahs cheek n hugs* ur wonderfull soul n I feel like u dont get hugs often so have mine

wolfie
Автор

What about local networks and VPN? It works really well for games like terraria, the only problem is that you need third party software like hamachi, but i don't think that installing one of those is hard.

noelka
Автор

in some countries port scanning is illegal

MagicGonads
Автор

I think you got player heads inverted lol 0:13

noblv