Multiplayer Killed my Voxel Game

  Рет қаралды 26,833

Tantan

Tantan

Күн бұрын

Пікірлер: 155
@shadamethyst1258
@shadamethyst1258 27 күн бұрын
TanTan, this isn't TV where your show has to air every saturday. You do cool stuff, and I'm here for that cool stuff. Programming requires creativity, and there is never a steady stream of creativity. Breaks are okay, sometimes the creativity source is just running low. As you said, the more you stress yourself to be more productive, the less productive you become.
@arthur7280
@arthur7280 Ай бұрын
We miss you buddy
@lievenpetersen
@lievenpetersen Ай бұрын
It isn't surprising to me that it's difficult to - implement networking - with a fancy client / host / relay architecture thingy - with a fancy distributed simulation (??) - with a fancy prediction system for the future, past and present IN RUST no less! It just seems like delays and frustrations are pre-programmed. I'm very happy to see WIP updates and be along for the journey, doesn't have to be only finished things ;)
@clonkex
@clonkex Ай бұрын
To be fair the prediction/rollback/reconciliation system is a standard part of most multiplayer games. You can't move your local client in realtime without also doing rollback and then resimulating the world based on recorded inputs.
@PokeComm
@PokeComm Ай бұрын
@@clonkex You have no idea what you're talking about. Online games that let you move your client in real-time predate rollback by decades.
@clonkex
@clonkex Ай бұрын
​@@PokeComm I know exactly what I'm taking abuot. Decades? Rollback was a thing in 1996 with Duke 3D. The original Quake didn't have clientside prediction, but Carmack admitted it was a mistake because waiting for your inputs to go over dialup internet before you see a result is unplayable. The only networked multiplayer games that don't do clientside prediction are client-authoritative ones (i.e. casual or coop games where cheating is less of an issue) and games where realtime response isn't necessary (i.e. RTS games like Age of Empires, RPG games like WoW, and MOBAs like Dota and League). The simple fact is, it's not possible to have server authority AND realtime response on the client without prediction, rollback and reconcilliation. (Actually, it may technically be possible, and I did some experiments on this, but I gave up because it was so extremely difficult to ensure a stable simulation that could never result in the player getting permanently stuck that it simply wasn't worth the effort.)
@diadetediotedio6918
@diadetediotedio6918 Ай бұрын
There is nothing wrong with having an authorative server, you just need to architecture your game in a way that the server is always the mediator between you and the game itself (like minecraft does, even in singleplayer it is always a "server" coordinating things). For 20 players this is hardly something very heavy, and you can allow for players to host themselves their servers (like games used to do back in the time) so they can have their own sessions with friends.
@PennyEvolus
@PennyEvolus Ай бұрын
👆👆👆 this also distributed authority feels like it could be a nightmare
@JamesThomas-kx5sj
@JamesThomas-kx5sj Ай бұрын
I miss when singleplayer wasn't an internal server. The game ran better. Nowadays I sometimes get block lag in single player which was a multiplayer problem exclusively for like a decade
@diadetediotedio6918
@diadetediotedio6918 Ай бұрын
@@JamesThomas-kx5sj I don't remember a time where singleplayer had not an internal server, which version was that? But anyways, I don't think it is to blame for the lag you feel, a singleplayer server can be very well optimized and was the choice of mojang to not do so, I sincerely can't see any kind of reason for why the block lag would be caused by it if not a lazy and/or bad implementation of the concept.
@JamesThomas-kx5sj
@JamesThomas-kx5sj Ай бұрын
@@diadetediotedio6918 I'm not sure when they changed it. It probably is just a clunky implementation. Mojang is not known for being good at optimization.
@diadetediotedio6918
@diadetediotedio6918 Ай бұрын
@@JamesThomas-kx5sj This is what I think. Because this architecture obviously adds some overhead, but it also simplifies a lot the programming of multiplayer, and the overhead should not be at the level of mc (which is milliseconds to seconds in some cases). With proper handling of memory and using a in-memory fake server when running singleplayer the final result should be very good and the overhead minimal.
@juanmacias5922
@juanmacias5922 Ай бұрын
Honestly, I think your problem is thinking you need to always be solving, there is nothing wrong with showing us your dead ends, and how you are actively working. :D Best of luck, try to not be so hard on yourself. :)
@VivekYadav-ds8oz
@VivekYadav-ds8oz Ай бұрын
Wow just yesterday I rewatched an old video of yours and was wondering if the channel suffered from the fate of a newly published Rust crate -- dead within a year. Glad to have you back buddy!
@Loafwad
@Loafwad Ай бұрын
Glad to see you still kicking!
@chonkusdonkus
@chonkusdonkus Ай бұрын
Bro finally remembered his password!
@ilyabasisty
@ilyabasisty Ай бұрын
I am very glad that you posted a new video. You've done a great job and I'm sure everything will work out. Thank you for supporting my motivation to continue studying rust and bevy)
@Kry0000
@Kry0000 Ай бұрын
Your amazing. Your uploads are always a delight. Listening to you talk about your programming experiences is insightful and very much welcomed, no matter how small you may think they are.
@BradenLehman
@BradenLehman Ай бұрын
I"m also been trying the exact same network structure of shared authority so the servers can run on $2 VPS's and its a trip 😅 My favorite prediction / interpolation change to smooth character movement at high speed has been: 1. Storing the last 3 position updates from the player and the time of those updates. 2. Predicting where they will be next update. 3. Using those 4 positions to make a spline and interpilate along it. Simple lerping helps smooth movement a lot at low speeds but once they more fast you can still see them speed up and slow down as the position updates become further apart.
@laycookie-f6i
@laycookie-f6i Ай бұрын
6:02 “The game is working fine!” *Bunch of errors and warnings in the console* love seeing it.
@patryk3772
@patryk3772 Ай бұрын
These are not actual errors. He wanted to separate various of info types, but rust logging has only info,error,trace and warn. If you read log messages on this video, you won't see any error at all.
@laycookie-f6i
@laycookie-f6i Ай бұрын
@@patryk3772 I get it but I still just find it funny that as he is saying "there are no errors", his console is half red.
@patryk3772
@patryk3772 Ай бұрын
@@laycookie-f6i Yeah, me too in fact.
@Mint25pop
@Mint25pop Ай бұрын
Tantan finally uploaded let's go!
@chronixchaos7081
@chronixchaos7081 2 күн бұрын
Even a video of you not doing stuff is still entertaining. Motivation is the hardest thing. Go You!
@Skeffles
@Skeffles Ай бұрын
Always a pleasure to see a new video from you. It's looking really fantastic, you're so close! I cannot wait to see it all together.
@Jack-lb5ih
@Jack-lb5ih Ай бұрын
I went down a similar route with networking in bevy. Ended up biting the bullet and using an authoritative server and saved my brain in the process. Would recommend. Edit: WIP is just as (if not more) interesting than finished products! Great to see you back with a video.
@pixel7071
@pixel7071 Ай бұрын
0:57 omg the music, your accent and the fact that you're kinda on beat sounds so much like Synthet's videos, I love it
@PhilipModDev
@PhilipModDev Ай бұрын
Yoo, you're back. Welcome man. 😁 Good job. You'll get through it, have perseverance.
@evandrofilipe1526
@evandrofilipe1526 Ай бұрын
I think you should post because you're just delightful. This definitely made my day better
@MrA6060
@MrA6060 Ай бұрын
Yesterday i was thinking "damn this dude hasn't uploaded in a while I wonder what's up"
@sean_vikoren
@sean_vikoren Ай бұрын
it's nice to see your face! my favorite channels are just the journey...'finished' is a pernitious delusion
@fastmovingvolcanomatter
@fastmovingvolcanomatter Ай бұрын
6:53 THAT'S THE WAY I LIKE IT AND I NEVER GET BORED
@n3y
@n3y Ай бұрын
I think that even if you don't have an exciting video full of triumphs, the time spent making those things won't have been wasted since you most likely learned a bunch of things from it if you succeed, it's experience if you fail, it's a lesson
@sechmascm
@sechmascm Ай бұрын
Currently restarting my project for the millionth time. Some iteration of an idea. In this one, I'm going to make a really deep simulation first. Like I want many systems acting on the game and generating complex behaviors from simple building blocks. I'm implementing a few patterns from the start this time. First, separate data from logic from rendering completely, and always deal with world states as stuff you modify and present the changes. It might help greatly with a multiplayer implementation, because everything will have a reproduceable world state from the beginning. And second, commands. Everything will go through commands. So, you can capture a list of commands and pass them in order to anyone, even for testing bugs from testers. Might abandon later, idk lol
@Benox-Dev
@Benox-Dev Ай бұрын
@Tantandev Captain, what should I use raylib with cpp or bevy for my 2d game 😊
@FlashBreakerOfficial
@FlashBreakerOfficial Ай бұрын
what if you make no player to player physics? if players have no collisions between you only have server objects that moving?
@sbr27287
@sbr27287 Ай бұрын
good to see you back on here man
@barzinlotfabadi
@barzinlotfabadi Ай бұрын
Absolutely love your energy and your content 👀
@BeastBishop
@BeastBishop 19 күн бұрын
I share in your love of voxel engines. I plan to use your greedy mesh algorithm to speed up my engine. Keep up the great work, networking is messy.
@kelownatechkid
@kelownatechkid Ай бұрын
Super cool, no breakthroughs needed for an interesting video!
@morthim
@morthim Ай бұрын
how you choose to solve a problem determines the implementations details. it might be better to think about the problem without the concept of lag. i suggest you first get a local game to work with controler support. then you take your controler inputs and send those with accumulated meaning over the network. what you need isn't a synchronous world, but a world which appears synchronous. if you put in arrows, what matters is whether a player hits a target and feels the reward for having hit the target. what matters is not the accurate aggreement of game state for both players. another input related thing is to have slurring of player inputs, presume a player is continuously doing what they were doing, until updated. this creates lag, but also means it can be buffed over with animation. if you were to make a fighting game, having the animations have the player's character wind up the punch, means that you can tween or spline into the animation if a packet is dropped. if players were able to jump up like dragonflying in wow, and you have them animate or forcast their intent, minimally with cast bars but better with just unique animations, then you create new options. one option is related to culling.the same way you can cull data which is far away, you can prioritize events with proximity to the player, and you can also prioritize whether the player is looking. if you want to have long distance bow fights, and the bows create entities which are arrows, you need to have the player request visual information from other players. think og what the camera is looking at as a cone of vision, and ask for updates around the player and in the cone. in this spirit one can think of different types of player actions as causing very different baud frequencies of how quickly and precisely processing needs to occur. again with archery, if you have the drawing of the string calculate and share the tragectory of the arrow when the palyers starts drawing it back, then the packet is recieved before the entity has to be animated. player movement would be fast baud, arrows medium baud, and world updates slow but massive -especialyl if you put in explosives. is it better to put in multiplayer first and then to do the game? i don't think so. the problem with doing the game is that you can get into optumization, and find clever solutions which make for more work later. if you want an interface, and you don't have the idea of a user account doing the action, then it would be frustrating to have multiple players press "a" and both see it for themselves but not the other. it is more inspiring to do the big picture of the type of game as well, so you can go back and forth between the ugly netcode task you find grueling, and the joyous task of creative projection. animations may just be a cheat code for your situation.
@niuage
@niuage Ай бұрын
Just hearing your voice is nice tbh :p You can share whatever, it's better than nothing!
@eineatombombe
@eineatombombe Ай бұрын
Its fine! Take as long as you need
@bargledargle7941
@bargledargle7941 Ай бұрын
I made a much simpler multiplayer than you're cooking. What you do there is impressive as hell and perfecting the multiplayer! What I've used though is good enough for my purposes. What I did is using TCP (since UDP is known to be a little less predictable? I don't know how to phrase it correctly) I gave players speed based on where they want to be. If a player moves he wants to go to x1 y1 z1. The "server" will simulate moving to that point, in the maximum speed allowable for that player. The client who sends where he wants to go to - is taking to account slowing down after finishing movement. That way we can have a nice little slow down on the client side and the server will know where that client is supposed to move. Perhaps it's wrong or obvious, or both... But it feels good and looks nice. I didn't experience teleporting but teleporting might be mandatory when I have more complex environments soon...At least with flat surface there's absolutely 0 teleporting in my case.
@YA-gp7fw
@YA-gp7fw Ай бұрын
I can wait as long as you want. Take as long as you need.
@Randalandradenunes
@Randalandradenunes Ай бұрын
Is this a dream? Glad to see you back
@jayleo500
@jayleo500 19 күн бұрын
As a developer I've really been struggling with this too. I would spend so much time OBSESING over "compleating" a task that I did not properly define before starting. "it need to exist first" is what I need to remind myself.
@SuboptimalEng
@SuboptimalEng Ай бұрын
He’s finally back!
@commanderguyen
@commanderguyen Ай бұрын
(0:55) ngl i wasn't expecting you having the same editor + theme as me (pls config owo)
@titaniumtomato7247
@titaniumtomato7247 Ай бұрын
Hey Tantan, while working on networking code do you ever make use of Wireshark to keep track of or inspect packets?
@xardiodrack1798
@xardiodrack1798 Ай бұрын
w video the struggle is part of making a game i really wish good luck
@DanKaschel
@DanKaschel Ай бұрын
One of the worst feelings is realized that i bit off a bigger chunk than i could chew and now I need to reset and reassess. One my my best friends in those moments is aource control discipline. Using a good pattern of branched and commits makes it easier to salvage or segment work done on a wild goose chase. Anyhow. It seems like it'd be even harder if you feel external pressure to produce. I don't envy you.. So be gentle with yourself -- even though thats easier said than done.
@ThyTrueNightmare
@ThyTrueNightmare Ай бұрын
I need to learn all of this, its the level of programming that I should be at with my 5 years in the industry
@iSneeeze
@iSneeeze Ай бұрын
Tantan lives! Missed your videos!
@izwe794
@izwe794 Ай бұрын
Getting stuck, losing motivation, feeling like you should have more to show because time passed, having a problem too technical to share, feeling the split demands of making a project that serves another project and videos about those projects. That's the game my dude. If you aren't feeling that shit the problem is either unimportant or, worse, unimportant to you. We aren't going anywhere. Keep fighting that battle in your head.
@bagofmanytricks
@bagofmanytricks Ай бұрын
Networking can truly kill inspiration, it's never something you just slap on.
@juiceboxhero3576
@juiceboxhero3576 Ай бұрын
I find that my programs run much slower when I'm printing a lot to the console. Is that what is causing the lag between the client and server?
@loubev
@loubev Ай бұрын
godspeed, crazy Rust man
@arjentix
@arjentix 25 күн бұрын
Well, we can think of network lag as the time it takes for light to pass distance between object and our eye. So nobody sees everything just in time it happened, there is always a lag
@stevomc
@stevomc Ай бұрын
Actually wanted to code a ML API with rust and now learning bevy wich is killing me. 😅
@rinoturtle738
@rinoturtle738 Ай бұрын
Keep going, I love your videos
@MiriadCalibrumAstar
@MiriadCalibrumAstar Ай бұрын
Arent there any open source thing that you can slap with tape?
@GoldbergToastyBred
@GoldbergToastyBred Ай бұрын
what network protocol are you using for multiplayer?
@beppvis
@beppvis Ай бұрын
less go a tantan vid my bi annual dose of motivation for game dev is complete
@warrenhenning8064
@warrenhenning8064 Ай бұрын
Would it be worth it to build more debugging and visualization tools for analyzing prediction errors so you don't have to manually read through logs as much?
@Sslack_
@Sslack_ Ай бұрын
Can we just show some respect for him refunding 3 months of patreon when he did not have to. Looking forward to your next vid brother
@mar0uane
@mar0uane Ай бұрын
Your videos encouraged me to learn graphics ❤
@stendaneel4879
@stendaneel4879 Ай бұрын
6:53 thats the way i like it and i never get bored
@newclarity4228
@newclarity4228 Ай бұрын
you've definitely heard of veloren, but have you tried looking at how they handle things?
@randomlegodev
@randomlegodev Ай бұрын
tantan is alive!!
@wizzerinus2034
@wizzerinus2034 23 күн бұрын
Game network programming is purely dark magic - coming from a developer constantly trying to push boundaries of game networking that being said I am surprised youre not using TCP over UDP or something to at least have consistent message order because having to work with random message order is just way too jank lol
@jutn2
@jutn2 Ай бұрын
Which networking library are you using?
@Tantandev
@Tantandev Ай бұрын
laminar
@Xeros08
@Xeros08 Ай бұрын
BABE WAKE UP!
@Soulzjd2
@Soulzjd2 Ай бұрын
You can do it! With lots of time and luck and a comma where a period should have been and one or two infinite loops we don't talk about.
@owdoogames
@owdoogames Ай бұрын
451. Are you making an immersive sim voxel game?
@PickTwizt
@PickTwizt Ай бұрын
how the fuck can somebody be so smart!!! damn i feel dump!
@jasondiesel-ug8ki
@jasondiesel-ug8ki Ай бұрын
Can I just ask some questions? Are you using UDP or TCP or both. If you are using udp, are you trashing old values? Else great video, I hope you can get it working so I can see a great multiplayer voxel game! :D
@minegeymer
@minegeymer Ай бұрын
It's sad to be stuck, I myself do not like such moments, but how nice when they end, ah ... in fact, I also thought somehow to make multiplayer and the problem of synchronization and the truth in the thought sounds difficult, but even more scary to me that you so long with this torture, the Internet has not found any options to solve such a problem of asynchrony?
@lubba64
@lubba64 Ай бұрын
Have you considered bevy_replicon or lightyear?
@partlyawesome
@partlyawesome 5 күн бұрын
It almost sounds like you want rollback netcode in your life
@knaxel
@knaxel Ай бұрын
im just happy your still with us and its all just bonus that youre still working on the game
@letronix6243
@letronix6243 Ай бұрын
TANTAN TANTAN HE LIVES
@blue_phoenix7488
@blue_phoenix7488 Ай бұрын
✌🏻
@AnthonyGedeon
@AnthonyGedeon Ай бұрын
I don’t know too much about multiplayer but I feel like making a networking debugger with egui to see what’s going on could help you.
@kurtisknodel
@kurtisknodel Ай бұрын
You mentioned you wanted to use a relay server because of hosting costs. Any reason why you didn't go with community-hosted, authoritative servers?
@RandJ.Hamzah
@RandJ.Hamzah Ай бұрын
With rust you say???
@Tantandev
@Tantandev Ай бұрын
indeed Rust + bevy game engine
@victornas91
@victornas91 Ай бұрын
The legend returns!
@Kobra8220
@Kobra8220 Ай бұрын
could you go more in detail why you're implementing your own multiplayer system instead of using some of the existing crates or other self hostable multiplayer gameserver systems out there? 🤔 love your videos btw. nice that you posted a info video 😊
@UltimatePerfection
@UltimatePerfection Ай бұрын
Then why did you implement it?
@gsestream
@gsestream Ай бұрын
sounds fun. thats called iir filter btw. finite variant is called fir filter. yep its pure math and signal physics. glhf. if you want fancy content, use ai to learn the correct network movement action lag prediction algorithm, from the data.
@SquidsTv
@SquidsTv Ай бұрын
take ya time! quality over quantity any time. no pressure
@AediusFilmania
@AediusFilmania Ай бұрын
Please show us your troubles, why a solution doesnt work for you, it could still work for some of us. ( you are one of the reason of me rebooting my game project )
@lifespell-omega
@lifespell-omega Ай бұрын
you're on pop os?
@solmateusbraga
@solmateusbraga Ай бұрын
yay new rust voxel engine game!
@osakitsukiko
@osakitsukiko Ай бұрын
Tantan the type of guy to forget he had a youtube channel
@grzesiek9514
@grzesiek9514 Ай бұрын
I believe in you
@someonespotatohmm9513
@someonespotatohmm9513 Ай бұрын
Honestly, networking took years, if not decades, to get right in game def. Don't beat yourself up that it is taking you time! Also share the problems you ran into from a design or implementation point of vieuw. We are all humans and make mistake, if you share them you can atleast hope others seeing them won't have to make them again.
@joshfield
@joshfield Ай бұрын
Look into event sourcing.
@bigmistqke
@bigmistqke Ай бұрын
From my pov patreon is for people investing in an artist's process and not in their results. Process includes non-productive moments.
@albusdandelion719
@albusdandelion719 Ай бұрын
bro, refunding patreon is such a bold move. but at the same time I am thinking you shouldn't do that. it's okay, when you are stuck at something, just communicate don't disappear and people are going to be fine with that
@moose6459
@moose6459 Ай бұрын
This is why I rely on a single game instance having a true authority. Many have claimed peer to peer is simpler, but in reality it's far easier to have a single user have a "true" state. I give the other clients reasonable margin of error, however if a client claims to be 8 meters off the mark, the authoritative user steps in and say "Your wrong, return to where I know your accepted". It's so much easier to code when you know somebody has accurate data. Beyond this, I have no idea how a client could reliably know where to teleport when doing a level change.
@someonespotatohmm9513
@someonespotatohmm9513 Ай бұрын
From what I heard you make a single simulation authorative. But accept reasonable claims by client simulations. So if a client gives an input and world state which disagrees with you own (because you are 1 tick in the future compared to the update of the client) you accept that update and push it as correction to the other clients. This creates some teleporting, but with high enough tick rates the jumps in state will be minor.
@moose6459
@moose6459 Ай бұрын
@ Instead of updating an entire world state from client to server, I instead simply Rpc anything that will alter the world. For example a gun. The client will go through the process of shooting (they check if have ammo, play the animation, play a sound effect), but the method creating a bullet only gets called on the server, which will again check that the ammo exists
@Weetunet
@Weetunet Ай бұрын
Making progress videos on incomplete things is completely fine, and could even be helpful to your development. Someone might just make that one comment that contains the idea that allows you to proceed.
@BigSmokke-pj8zz
@BigSmokke-pj8zz Ай бұрын
Long time no seen
@Turtoise16
@Turtoise16 Ай бұрын
Can this be true? Is it really my favourite rust youtuber posting a new video about his rust development? :)
@johnviljoen271
@johnviljoen271 Ай бұрын
Damn I’ve never considered funding a patreon, but this dude being so self critical for not uploading that he’s refunding patrons for that time might make me change my mind
@chaineddepths9523
@chaineddepths9523 Ай бұрын
bro's trying to make distributed authority 💀 terrible idea. At best you get the authority to designate tasks to the children to process then relaying it back to the others if you wanna take pressure of the centre
@ActiveArtify
@ActiveArtify Ай бұрын
amazing video :)
@ohimdabiggestbird
@ohimdabiggestbird Ай бұрын
insert account password joke here*
@Gwilo
@Gwilo Ай бұрын
you are working hard on voxel engines. you do not need to apologize for taking your time and trying to get everything right refunding everyone's payments for the last 3 months? people can just unsubscribe if they're unhappy with the amount of content they're delivering! you are such a good guy Tantan but you need money too
@ironaleks7617
@ironaleks7617 Ай бұрын
i would just use tcp, minecraft uses it, and it's relatively good
I made a horror game that's IMPOSSIBLE to SCREENSHOT!
3:52
Branta Games
Рет қаралды 1,8 МЛН
ChatGPT makes Voxel Engine with Rust
12:20
Tantan
Рет қаралды 99 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Minecraft, But It's An RTS
20:13
Bruteplanet
Рет қаралды 495 М.
Videogames Have Terrible Worldbuilding
26:44
Adam Millard - The Architect of Games
Рет қаралды 170 М.
Elden Ring Frame Data Is Completely Insane
26:12
Babe1Babe2
Рет қаралды 429 М.
How One Change MASSIVELY Improved My Indie Game
5:39
Mos Nassar
Рет қаралды 7 М.
The Problem With Procedural Generation
17:57
Acerola
Рет қаралды 268 М.
I Scraped the Entire Steam Catalog, Here’s the Data
11:29
Newbie Indie Game Dev
Рет қаралды 547 М.
100 DEVS Make a GAME without COMMUNICATING! (1-25)
17:14
Blackthornprod
Рет қаралды 2,1 МЛН
My game is 262,000 times faster than Minecraft. I'll show you how.
12:20
IGoByLotsOfNames
Рет қаралды 1,3 МЛН
AI Learns to Play Dodgeball
10:59
AI Warehouse
Рет қаралды 1,1 МЛН
Sparse Voxel Octrees
3:25
Ozown
Рет қаралды 45 М.
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН