Multiplayer Killed my Voxel Game

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 150

  • @arthur7280
    @arthur7280 13 днів тому +129

    We miss you buddy

  • @diadetediotedio6918
    @diadetediotedio6918 13 днів тому +106

    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 12 днів тому +5

      👆👆👆 this also distributed authority feels like it could be
      a nightmare

    • @JamesThomas-kx5sj
      @JamesThomas-kx5sj 12 днів тому +2

      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 12 днів тому +6

      @@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 12 днів тому +1

      @@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 12 днів тому +2

      @@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 13 днів тому +47

    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. :)

  • @lievenpetersen
    @lievenpetersen 13 днів тому +118

    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 12 днів тому +7

      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 7 днів тому

      @@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 6 днів тому

      ​@@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.)

  • @shadamethyst1258
    @shadamethyst1258 8 годин тому +1

    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.

  • @VivekYadav-ds8oz
    @VivekYadav-ds8oz 13 днів тому +22

    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!

  • @chonkusdonkus
    @chonkusdonkus 13 днів тому +144

    Bro finally remembered his password!

  • @Loafwad
    @Loafwad 13 днів тому +18

    Glad to see you still kicking!

  • @BradenLehman
    @BradenLehman 11 днів тому +4

    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.

  • @Mint25pop
    @Mint25pop 13 днів тому +12

    Tantan finally uploaded let's go!

  • @laycookie-f6i
    @laycookie-f6i 12 днів тому +16

    6:02 “The game is working fine!” *Bunch of errors and warnings in the console* love seeing it.

    • @patryk3772
      @patryk3772 12 днів тому +3

      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 12 днів тому +5

      @@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 12 днів тому +1

      @@laycookie-f6i Yeah, me too in fact.

  • @ilyabasisty
    @ilyabasisty 13 днів тому +3

    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)

  • @GreatVoid29A
    @GreatVoid29A 13 днів тому +2

    We're here for the journey, not just the end goal. Happy to see a new video from you!

  • @Jack-lb5ih
    @Jack-lb5ih 9 днів тому

    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.

  • @PhilipModDev
    @PhilipModDev 12 днів тому +3

    Yoo, you're back. Welcome man. 😁
    Good job. You'll get through it, have perseverance.

  • @n3y
    @n3y 13 днів тому +4

    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

  • @fastmovingvolcanomatter
    @fastmovingvolcanomatter 12 днів тому +2

    6:53 THAT'S THE WAY I LIKE IT AND I NEVER GET BORED

  • @Kry0000
    @Kry0000 12 днів тому +1

    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.

  • @MrA6060
    @MrA6060 13 днів тому +9

    Yesterday i was thinking "damn this dude hasn't uploaded in a while I wonder what's up"

  • @pixel7071
    @pixel7071 6 днів тому

    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

  • @sechmascm
    @sechmascm 9 днів тому

    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

  • @eineatombombe
    @eineatombombe 13 днів тому +3

    Its fine! Take as long as you need

  • @bagofmanytricks
    @bagofmanytricks 8 днів тому +1

    Networking can truly kill inspiration, it's never something you just slap on.

  • @Skeffles
    @Skeffles 11 днів тому

    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.

  • @evandrofilipe1526
    @evandrofilipe1526 12 днів тому

    I think you should post because you're just delightful. This definitely made my day better

  • @sean_vikoren
    @sean_vikoren 13 днів тому +2

    it's nice to see your face! my favorite channels are just the journey...'finished' is a pernitious delusion

  • @kelownatechkid
    @kelownatechkid 10 днів тому

    Super cool, no breakthroughs needed for an interesting video!

  • @bargledargle7941
    @bargledargle7941 9 днів тому

    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.

  • @izwe794
    @izwe794 13 днів тому +2

    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.

  • @Benox-Dev
    @Benox-Dev 5 днів тому +1

    @Tantandev Captain, what should I use raylib with cpp or bevy for my 2d game 😊

  • @ThyTrueNightmare
    @ThyTrueNightmare 7 днів тому

    I need to learn all of this, its the level of programming that I should be at with my 5 years in the industry

  • @Sslack_
    @Sslack_ 13 днів тому +3

    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

  • @DanKaschel
    @DanKaschel 11 днів тому

    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.

  • @Soulzjd2
    @Soulzjd2 13 днів тому

    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.

  • @SuboptimalEng
    @SuboptimalEng 12 днів тому

    He’s finally back!

  • @barzinlotfabadi
    @barzinlotfabadi 11 днів тому

    Absolutely love your energy and your content 👀

  • @morthim
    @morthim 11 днів тому +1

    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.

  • @titaniumtomato7247
    @titaniumtomato7247 13 днів тому +1

    Hey Tantan, while working on networking code do you ever make use of Wireshark to keep track of or inspect packets?

  • @YA-gp7fw
    @YA-gp7fw 13 днів тому +7

    I can wait as long as you want.
    Take as long as you need.

  • @commanderguyen
    @commanderguyen 13 днів тому +3

    (0:55) ngl i wasn't expecting you having the same editor + theme as me (pls config owo)

  • @FlashBreakerOfficial
    @FlashBreakerOfficial 13 днів тому +1

    what if you make no player to player physics? if players have no collisions between you only have server objects that moving?

  • @randomlegodev
    @randomlegodev 13 днів тому +1

    tantan is alive!!

  • @stendaneel4879
    @stendaneel4879 11 днів тому

    6:53 thats the way i like it and i never get bored

  • @Xeros08
    @Xeros08 13 днів тому +1

    BABE WAKE UP!

  • @beppvis
    @beppvis 13 днів тому

    less go a tantan vid my bi annual dose of motivation for game dev is complete

  • @niuage
    @niuage 10 днів тому

    Just hearing your voice is nice tbh :p You can share whatever, it's better than nothing!

  • @mar0uane
    @mar0uane 13 днів тому

    Your videos encouraged me to learn graphics ❤

  • @loubev
    @loubev 12 днів тому

    godspeed, crazy Rust man

  • @sbr27287
    @sbr27287 13 днів тому

    good to see you back on here man

  • @iSneeeze
    @iSneeeze 12 днів тому

    Tantan lives! Missed your videos!

  • @xardiodrack1798
    @xardiodrack1798 13 днів тому

    w video the struggle is part of making a game i really wish good luck

  • @letronix6243
    @letronix6243 13 днів тому

    TANTAN TANTAN HE LIVES

  • @stevomc
    @stevomc 13 днів тому +1

    Actually wanted to code a ML API with rust and now learning bevy wich is killing me. 😅

  • @jasondiesel-ug8ki
    @jasondiesel-ug8ki 6 днів тому

    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

  • @PickTwizt
    @PickTwizt 4 дні тому

    how the fuck can somebody be so smart!!! damn i feel dump!

  • @Randalandradenunes
    @Randalandradenunes 12 днів тому

    Is this a dream? Glad to see you back

  • @Kobra8220
    @Kobra8220 12 днів тому

    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 😊

  • @warrenhenning8064
    @warrenhenning8064 13 днів тому

    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?

  • @moose6459
    @moose6459 13 днів тому +5

    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 10 днів тому

      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 7 днів тому

      @ 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

  • @gsestream
    @gsestream 9 днів тому

    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 12 днів тому

    take ya time! quality over quantity any time. no pressure

  • @grzesiek9514
    @grzesiek9514 12 днів тому

    I believe in you

  • @newclarity4228
    @newclarity4228 12 днів тому

    you've definitely heard of veloren, but have you tried looking at how they handle things?

  • @rinoturtle738
    @rinoturtle738 8 днів тому

    Keep going, I love your videos

  • @solmateusbraga
    @solmateusbraga 13 днів тому

    yay new rust voxel engine game!

  • @minegeymer
    @minegeymer 13 днів тому

    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?

  • @chaineddepths9523
    @chaineddepths9523 8 днів тому

    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

  • @GoldbergToastyBred
    @GoldbergToastyBred 13 днів тому

    what network protocol are you using for multiplayer?

  • @osakitsukiko
    @osakitsukiko 13 днів тому

    Tantan the type of guy to forget he had a youtube channel

  • @victornas91
    @victornas91 13 днів тому

    The legend returns!

  • @juiceboxhero3576
    @juiceboxhero3576 12 днів тому

    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?

  • @jutn2
    @jutn2 13 днів тому +1

    Which networking library are you using?

  • @owdoogames
    @owdoogames 11 днів тому

    451.
    Are you making an immersive sim voxel game?

  • @Weetunet
    @Weetunet 4 дні тому

    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.

  • @johnviljoen271
    @johnviljoen271 12 днів тому +5

    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

  • @bigmistqke
    @bigmistqke 11 днів тому

    From my pov patreon is for people investing in an artist's process and not in their results. Process includes non-productive moments.

  • @AnthonyGedeon
    @AnthonyGedeon 13 днів тому

    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.

  • @someonespotatohmm9513
    @someonespotatohmm9513 10 днів тому

    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.

  • @lubba64
    @lubba64 13 днів тому

    Have you considered bevy_replicon or lightyear?

  • @MiriadCalibrumAstar
    @MiriadCalibrumAstar 13 днів тому

    Arent there any open source thing that you can slap with tape?

  • @Turtoise16
    @Turtoise16 12 днів тому

    Can this be true?
    Is it really my favourite rust youtuber posting a new video about his rust development? :)

  • @ohimdabiggestbird
    @ohimdabiggestbird 12 днів тому

    insert account password joke here*

  • @blue_phoenix7488
    @blue_phoenix7488 13 днів тому +4

    ✌🏻

  • @BigSmokke-pj8zz
    @BigSmokke-pj8zz 12 днів тому

    Long time no seen

  • @albusdandelion719
    @albusdandelion719 12 днів тому +7

    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

  • @Gwilo
    @Gwilo 12 днів тому

    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

  • @abrarmasumabir3809
    @abrarmasumabir3809 12 днів тому

    Putting all these in a 7 and half minute video is tougher than making the game.

  • @ActiveArtify
    @ActiveArtify 12 днів тому

    amazing video :)

  • @joshfield
    @joshfield 12 днів тому

    Look into event sourcing.

  • @knaxel
    @knaxel 11 днів тому

    im just happy your still with us and its all just bonus that youre still working on the game

  • @MEMUNDOLOL
    @MEMUNDOLOL 10 днів тому

    ez way to learn is to download unreal engine and check how they implemented server side authority with client side prediction, not that hard but you need to know cpp a bit

  • @kurtisknodel
    @kurtisknodel 13 днів тому

    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?

  • @stan547
    @stan547 9 днів тому

    Tantan is fun fun

  • @surr3ald3sign
    @surr3ald3sign 11 днів тому

    Cubeworld mentioned in 2024? Bro im still pissed at what that idiot did to ruin that game... somehow went from one of the most fun and enjoyable, albeit unfinished, games ever to a god awful mess of unbalanced garbage that literally removed everything that made the game fun and unique...

  • @lifespell-omega
    @lifespell-omega 10 днів тому

    you're on pop os?

  • @ironaleks7617
    @ironaleks7617 10 днів тому

    i would just use tcp, minecraft uses it, and it's relatively good

  • @seoulpeterson432
    @seoulpeterson432 8 днів тому

    I'm not a huge fan of the clickbaity title.
    Keep pushing through with your game though, and eventually you'll make it past the slog. Don't be afraid to ask for help either! 🙂

  • @earomc
    @earomc 13 днів тому

    Maybe a community member could help you with fixing this!

  • @stray1239
    @stray1239 13 днів тому

    I will never make a multiplayer game

  • @AediusFilmania
    @AediusFilmania 12 днів тому

    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 )