Multiplayer Killed my Voxel Game

Поделиться
HTML-код
  • Опубликовано: 25 ноя 2024

Комментарии • 150

  • @arthur7280
    @arthur7280 12 дней назад +129

    We miss you buddy

  • @juanmacias5922
    @juanmacias5922 12 дней назад +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. :)

  • @diadetediotedio6918
    @diadetediotedio6918 12 дней назад +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.

  • @lievenpetersen
    @lievenpetersen 12 дней назад +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 6 дней назад

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

  • @chonkusdonkus
    @chonkusdonkus 12 дней назад +144

    Bro finally remembered his password!

  • @shadamethyst1258
    @shadamethyst1258 2 часа назад +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 12 дней назад +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!

  • @Loafwad
    @Loafwad 12 дней назад +18

    Glad to see you still kicking!

  • @BradenLehman
    @BradenLehman 10 дней назад +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.

  • @GreatVoid29A
    @GreatVoid29A 12 дней назад +2

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

  • @PhilipModDev
    @PhilipModDev 12 дней назад +3

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

  • @ilyabasisty
    @ilyabasisty 12 дней назад +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)

  • @MrA6060
    @MrA6060 12 дней назад +9

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

  • @Mint25pop
    @Mint25pop 12 дней назад +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.

  • @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.

  • @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.

  • @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

  • @sean_vikoren
    @sean_vikoren 12 дней назад +2

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

  • @n3y
    @n3y 12 дней назад +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

  • @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

  • @fastmovingvolcanomatter
    @fastmovingvolcanomatter 12 дней назад +2

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

  • @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

  • @YA-gp7fw
    @YA-gp7fw 12 дней назад +7

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

  • @eineatombombe
    @eineatombombe 12 дней назад +3

    Its fine! Take as long as you need

  • @Sslack_
    @Sslack_ 12 дней назад +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

  • @izwe794
    @izwe794 12 дней назад +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.

  • @niuage
    @niuage 10 дней назад

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

  • @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.

  • @kelownatechkid
    @kelownatechkid 10 дней назад

    Super cool, no breakthroughs needed for an interesting video!

  • @Benox-Dev
    @Benox-Dev 5 дней назад +1

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

  • @bargledargle7941
    @bargledargle7941 8 дней назад

    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.

  • @commanderguyen
    @commanderguyen 12 дней назад +3

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

  • @SuboptimalEng
    @SuboptimalEng 11 дней назад

    He’s finally back!

  • @bagofmanytricks
    @bagofmanytricks 8 дней назад +1

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

  • @sbr27287
    @sbr27287 12 дней назад

    good to see you back on here man

  • @barzinlotfabadi
    @barzinlotfabadi 11 дней назад

    Absolutely love your energy and your content 👀

  • @ThyTrueNightmare
    @ThyTrueNightmare 6 дней назад

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

  • @DanKaschel
    @DanKaschel 10 дней назад

    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.

  • @Randalandradenunes
    @Randalandradenunes 12 дней назад

    Is this a dream? Glad to see you back

  • @xardiodrack1798
    @xardiodrack1798 12 дней назад

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

  • @FlashBreakerOfficial
    @FlashBreakerOfficial 12 дней назад +1

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

  • @beppvis
    @beppvis 12 дней назад

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

  • @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

  • @randomlegodev
    @randomlegodev 12 дней назад +1

    tantan is alive!!

  • @Soulzjd2
    @Soulzjd2 12 дней назад

    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.

  • @stevomc
    @stevomc 12 дней назад +1

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

  • @iSneeeze
    @iSneeeze 12 дней назад

    Tantan lives! Missed your videos!

  • @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 😊

  • @mar0uane
    @mar0uane 12 дней назад

    Your videos encouraged me to learn graphics ❤

  • @titaniumtomato7247
    @titaniumtomato7247 12 дней назад +1

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

  • @jasondiesel-ug8ki
    @jasondiesel-ug8ki 5 дней назад

    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

  • @stendaneel4879
    @stendaneel4879 11 дней назад

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

  • @rinoturtle738
    @rinoturtle738 7 дней назад

    Keep going, I love your videos

  • @Xeros08
    @Xeros08 12 дней назад +1

    BABE WAKE UP!

  • @loubev
    @loubev 12 дней назад

    godspeed, crazy Rust man

  • @moose6459
    @moose6459 12 дней назад +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 9 дней назад

      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 6 дней назад

      @ 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

  • @minegeymer
    @minegeymer 12 дней назад

    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?

  • @albusdandelion719
    @albusdandelion719 12 дней назад +6

    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

  • @PickTwizt
    @PickTwizt 4 дня назад

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

  • @letronix6243
    @letronix6243 12 дней назад

    TANTAN TANTAN HE LIVES

  • @jutn2
    @jutn2 12 дней назад +1

    Which networking library are you using?

  • @blue_phoenix7488
    @blue_phoenix7488 12 дней назад +4

    ✌🏻

  • @GoldbergToastyBred
    @GoldbergToastyBred 12 дней назад

    what network protocol are you using for multiplayer?

  • @victornas91
    @victornas91 12 дней назад

    The legend returns!

  • @knaxel
    @knaxel 11 дней назад

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

  • @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.

  • @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

  • @warrenhenning8064
    @warrenhenning8064 12 дней назад

    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?

  • @AnthonyGedeon
    @AnthonyGedeon 12 дней назад

    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.

  • @juiceboxhero3576
    @juiceboxhero3576 11 дней назад

    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?

  • @newclarity4228
    @newclarity4228 12 дней назад

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

  • @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.

  • @Turtoise16
    @Turtoise16 12 дней назад

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

  • @solmateusbraga
    @solmateusbraga 12 дней назад

    yay new rust voxel engine game!

  • @osakitsukiko
    @osakitsukiko 12 дней назад

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

  • @lubba64
    @lubba64 12 дней назад

    Have you considered bevy_replicon or lightyear?

  • @chaineddepths9523
    @chaineddepths9523 7 дней назад

    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

  • @MiriadCalibrumAstar
    @MiriadCalibrumAstar 12 дней назад

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

  • @owdoogames
    @owdoogames 11 дней назад

    451.
    Are you making an immersive sim voxel game?

  • @someonespotatohmm9513
    @someonespotatohmm9513 9 дней назад

    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.

  • @BigSmokke-pj8zz
    @BigSmokke-pj8zz 11 дней назад

    Long time no seen

  • @SquidsTv
    @SquidsTv 11 дней назад

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

  • @abrarmasumabir3809
    @abrarmasumabir3809 12 дней назад

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

  • @ActiveArtify
    @ActiveArtify 12 дней назад

    amazing video :)

  • @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

  • @grzesiek9514
    @grzesiek9514 12 дней назад

    I believe in you

  • @bigmistqke
    @bigmistqke 10 дней назад

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

  • @ohimdabiggestbird
    @ohimdabiggestbird 12 дней назад

    insert account password joke here*

  • @joshfield
    @joshfield 12 дней назад

    Look into event sourcing.

  • @ironaleks7617
    @ironaleks7617 9 дней назад

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

  • @kurtisknodel
    @kurtisknodel 12 дней назад

    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

  • @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 12 дней назад

    Maybe a community member could help you with fixing this!

  • @lifespell-omega
    @lifespell-omega 10 дней назад

    you're on pop os?

  • @OxAA00
    @OxAA00 12 дней назад

    Yea, with networking you have not only one problem but system distributed problem have you.

  • @surr3ald3sign
    @surr3ald3sign 10 дней назад

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

  • @dallintg6299
    @dallintg6299 12 дней назад

    As someone who does not donate to you. I think you should not refund the people that have donated to you