I Made Multiplayer Gamedev EASY!

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ย. 2024

ความคิดเห็น • 102

  • @bnaZan6550
    @bnaZan6550 ปีที่แล้ว +188

    Tip: never use strings as keys in network messages, use constant numbers or enums, the equals or hashcode operation is much faster and it's a smaller packet to send, while still being readable in code

  • @willwillcode7568
    @willwillcode7568 ปีที่แล้ว +57

    It’s actually fun watching his amazing progression over the years! Good job man!

  • @SuadoCowboy
    @SuadoCowboy ปีที่แล้ว +13

    good to see you learning while also teaching us some useful stuff(I rarely see something this good about networking and games)

  • @Evoleo
    @Evoleo 11 หลายเดือนก่อน +2

    Great video! I have actually been developing my own multiplayer framework for a couple years now, except mine is for GameMaker and Node.js instead of Python and it uses classic messages and responses, but the shared objects approach sounds in fact very interesting!
    Thank you for your unique insight from a fellow multiplayer development enjoyer haha
    This sort of content is incredibly rare to come across on TH-cam

  • @sudipbasak-m7y
    @sudipbasak-m7y ปีที่แล้ว +5

    please create a full online game dev course

  • @edwardrivera8936
    @edwardrivera8936 ปีที่แล้ว +12

    Very impressive and very informative. I am sure whenever you are ready to open source the code, the community will be there to assist with making it the best it can be. Plus it would be awesome to see what else can be done with your network framework.
    I work in python but have not done anything with sockets except for some book tutorials but you really do make python game design shine! Keep up the awesome work!

    • @glitchedpixelscriticaldamage
      @glitchedpixelscriticaldamage ปีที่แล้ว +3

      Now I'm not sure i understood correctly, but from what he explained, his net framework is not really that advanced and it uses a central server.
      Second thing from what he described he tried, csv-like-data or the json-data... it sounded like he just discovered the concept of IPC , in this case network IPC, maybe just my own interpretation of what he described he did.
      Anyway... as yourself said, good progress, nice looking game for 1 dev and made in python. it is pretty amazing.

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว +5

      The earlier networking concepts were from 5+ years ago.

    • @glitchedpixelscriticaldamage
      @glitchedpixelscriticaldamage ปีที่แล้ว

      Sorry , but i do not understand what you mean... by 5+ years ago, IPC as in network communication between 2 or more processes was invented in the 60's. Not 5 years ago.
      2 processes communicating over the network is a form of IPC.
      At a high level like app layer you can create any "protocol" be it using existing http rules or your own csv or json or whatever else does not matter.
      Anyway, again does not really matter, even if it is clear to me you did not learn this in a structured way it is amazing that you did create all these games nonetheless which look very good. So, good job.

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว +6

      I was saying that the stuff you were complaining about was what I was making 5 years ago. lol
      I have a lot more experience now.

  • @SquirrelTheorist
    @SquirrelTheorist ปีที่แล้ว +2

    Honestly, this almost rivals MariokartDS even. The quality and camera control looks amazing. I can't wait to see when this releases. Thank you for the epic gamedev video!

  • @diamondwhite5208
    @diamondwhite5208 ปีที่แล้ว +6

    As an aspiring game dev,you and others like you inspire me a lot
    And I hope I get to the same skill level as you one day.

  • @walkingpuppy3282
    @walkingpuppy3282 ปีที่แล้ว +15

    I gotta say this game is really fun and the idea of making a networking engine in python sockets is just crazy I'm waiting for the next playtest and the game to be released, quick suggestion i like the trees in the field you should make palm trees too in the pirates docks map and the mushroom trees from drawn down abyss in the volcano map.

  • @tomsterbg8130
    @tomsterbg8130 5 หลายเดือนก่อน +1

    I always took multiplayer for granted simply because I learned game dev with Roblox Studio, but now I'm switching to Godot after 6 years and I plan to stay with Godot for at least 10 years since it's a direct upgrade from Roblox Studio and seems to pick up popularity for a reason.
    You are constantly inspiring me because I know how difficult it is to use code from scratch by making your own assets/libraries in order to abstract stuff. Every abstraction has to be well thought out or modified for every project.

  • @FlareGunDebate
    @FlareGunDebate ปีที่แล้ว +3

    I plan on making a web based game and I was curious about the particulars. This is great information. Thanks for sharing.

  • @KubinWielki
    @KubinWielki ปีที่แล้ว +5

    Great video, and a cool game cooking up!
    Entirely unsolicited idea: Perhaps consider turning that "oil spill" power-up from a small puddle, into a line that your kart spills over the course of 1-2 seconds, that carries the kart's momentum. That'll require some driving skill from the player, but also be more rewarding to use if they choose to deploy the oil while drifting, to strategically cover more area behind them.

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว +5

      I'll be keeping oil spills the same, but that could be an idea for a different item.

    • @KubinWielki
      @KubinWielki ปีที่แล้ว

      @@DaFluffyPotato Sweet! Variety is spice of life, as they say :D

  • @seyproductions
    @seyproductions ปีที่แล้ว +2

    Love the explanatory art! Makes it easy to understand what you are talking about somehow while being funny xD

  • @mr_minepiesek
    @mr_minepiesek ปีที่แล้ว +4

    I just can't wait for your network framework

  • @sercrets9531
    @sercrets9531 ปีที่แล้ว +2

    Say it with me guys: "Release, Release, Release, Release, Release"! Nice work, keep it coming!

  • @emperor8716
    @emperor8716 ปีที่แล้ว +5

    this dude is a genuine genius man

  • @sweettea-hv1ls
    @sweettea-hv1ls 8 หลายเดือนก่อน +1

    It is definitely easy to make multiplayer games if there are no high-level physics interactions and not a lot of units/npcs/projectiles and no fast-paced competitive games. Once you are making the next rocket league, valorant, or starcraft, you will be faced with a lot of pitfalls on current free technologies.

  • @hermit97
    @hermit97 11 หลายเดือนก่อน +2

    I have a solid carrer as a python data engineer, but every time I watch your videos I have the desire to retire and become a python / godot game developer XD. Keep going, your content is awesome.

  • @MrTast
    @MrTast ปีที่แล้ว +1

    I would never had imagine that you had dabbled with HLA, thats awesome! Best gamedev content on youtube!

  • @eboatwright_
    @eboatwright_ ปีที่แล้ว +4

    Very cool! I've never used Python for multiplayer games, although I'm currently working on a small MMO in Dart :)

  • @bigwhoopgames
    @bigwhoopgames ปีที่แล้ว +1

    Nice choice of ports!

  • @ProteusWasTaken
    @ProteusWasTaken ปีที่แล้ว +2

    A True Pioneer.

  • @EzaguiDark
    @EzaguiDark ปีที่แล้ว

    currently im not programing but since i started with python, watching this channel motivated me to make games and continue with python...

  • @kokonut9456
    @kokonut9456 ปีที่แล้ว

    The game is so beautiful! Wow

  • @cerocero2817
    @cerocero2817 ปีที่แล้ว +1

    Is Pixkartz inspired by Circuit Breakers for the PlayStation by any chance? Man, what a fun game that was.

  • @sushismitcher225
    @sushismitcher225 ปีที่แล้ว +1

    can you make a new pygame shader tutorial / update the existing one to be adapted for Macs? Great video!

  • @therayvenn3482
    @therayvenn3482 ปีที่แล้ว +2

    i love you so much

  • @MsTatakai
    @MsTatakai ปีที่แล้ว

    Oh my... make a Lobby with all ppl riding the car just for the fun BUT all cars are ghosted so you can't bump into each other ... make a Lobby to have fun XD

  • @kbabe3915
    @kbabe3915 ปีที่แล้ว

    I'm not sure I agree that 100 players per server is very scalable, but the game seems enjoyable. I'd consider possibly using native socket bindings or a library which does so. Even in python, however, 100 seems low. I suspect that attempting to generalize different patterns of sending and receiving has led to over-sending. It's either that or you could be over-sending a very frequent packet, possibly sending all players' positions to everyone every tick. If so, limiting what is sent to what can be seen by each player can help if the cost of that calculation is less than just iterating and sending to all players. A simple solution could be to subdivide the map and only send changes which occur in the regions surrounding the player. I'm also not sure that you fully explained the packet structure, but I noticed that you said updates are streamed as bytes, which is good to begin with. However, if the bottleneck is the server, and not via over-sending, then I would suggest stripping every packet to it's barest minimums and to try to be using the smallest data types for everything possible (e.g. sending floats over doubles, shorts or bytes over ints), however I'm not sure how possible that is in python. It's also worth noting that Python may be coaxing you into allocating much more than is necessary, as is the case with most languages, but it's probably possible to write it with less allocation without many sacrifices in code quality.

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว

      1. The servers are very cheap. Just a single core for processing. 2. Every player in a racing game lobby needs to know every other player's location for minimap updates, so 100 is a lot. It can be optimized, which is why I mentioned optimization. 3. As mentioned in the video, everything already is compressed down to the base datatypes since there's only a couple types of messages being sent. Overall, I'd say handling thousands of active players on less than $100/mo is pretty good. The same servers I'm using can't even run a Minecraft server with 2 people on it without the tickrate dropping. Keep in mind that renting even a low end VPS is quite expensive compared to running one yourself.

  • @rx97_mc
    @rx97_mc ปีที่แล้ว +2

    I had no idea you were in troy's videos lmaooo, GOAT

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว +3

      My friend and I were messing around with alts as Logan and Jake Paul and happened to end up in some of his games. lol

  • @notagamer8782
    @notagamer8782 ปีที่แล้ว

    Dude great work

  • @adam-the-dev
    @adam-the-dev ปีที่แล้ว +1

    Wait why is TCP preferred? Doesn’t that incur a ton of bloated network handshaking? I would have expected UDP? But I’ve never built a networking framework.

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว

      TCP is fine in most cases. People overestimate the overhead.

  • @alteredorange
    @alteredorange 8 หลายเดือนก่อน +1

    @DaFluffyPotato is there any client side prediction and interpolation? Or all updates are just done by the server? Thanks!

    • @DaFluffyPotato
      @DaFluffyPotato  8 หลายเดือนก่อน +2

      There's interpolation, but no prediction. I prefer the simplicity of no prediction (it also looks cleaner).

    • @alteredorange
      @alteredorange 8 หลายเดือนก่อน

      @@DaFluffyPotato gotcha! Looks cleaner code wise, or racing wise?

  • @Dorbellprod
    @Dorbellprod ปีที่แล้ว

    This is very interesting! Looking forward to see how your game and framework take shape. Also, is that the GBA Bowser Castle map in your game 😳

  • @geofferyblackard5841
    @geofferyblackard5841 ปีที่แล้ว

    This is awesome and reminds me of Rock n' Roll Racing.

  • @costelinha1867
    @costelinha1867 ปีที่แล้ว +3

    As always, your projects are insane.
    I just wish I could get out of my coding burnout already. I guess I'll just have no choice but to try to force myself into working on my projects again, otherwise they'll never be finished.
    Although I'm kinda lost to be honest... I don't know if I want to make a game now, or if I want to do web development as my next project, or just some other thing like networking..... I'm not sure if you or anyone here can relate to that, but damm it sucks. I was so confident after finishing a computer science course, so happy, but now I can't bring myself to work on anything lol.
    But enough of my personal problems, this game looks so good. Will you ever make a video showcasing your networking stuff, or a basic tutorial on networking like you did with pygame + opengl?

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว +1

      I'll probably make a tutorial for my networking framework if/when I release it.

    • @costelinha1867
      @costelinha1867 ปีที่แล้ว

      @@DaFluffyPotato Thanks.

    • @odiverso4407
      @odiverso4407 ปีที่แล้ว

      ​@costelinha1867 are you Brazil costela? I passed through the same phrase as you, try to do something different like a sport, don't force it.

  • @dlanodspot
    @dlanodspot ปีที่แล้ว +1

    A new video🥹

  • @bobyjoegames2
    @bobyjoegames2 11 หลายเดือนก่อน

    Your networking solution sounds like you implemented your own rpc?

  • @futuremapper_
    @futuremapper_ ปีที่แล้ว

    Can’t wait to see a release of this library :) oh and the game aldo

  • @JonGamer16
    @JonGamer16 ปีที่แล้ว

    Have you considered using a free oracle server for it? I hear you can run a Minecraft modpack survival server on one

  • @Samuell1998
    @Samuell1998 ปีที่แล้ว +1

    Would you like to share some resources to learn these sort of networking optimizations, I am planing on building a game server with python but everyone keeps telling me its sloww.

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว +2

      It's mostly intuitive, I didn't use any resources for it. The main mistake people make is putting the netcode and the game code on the same thread, which is a hard bottleneck.

    • @Samuell1998
      @Samuell1998 ปีที่แล้ว

      @@DaFluffyPotato oh that's a nice advice, thanks

  • @darthryking
    @darthryking ปีที่แล้ว +1

    Neat! So clients actually push shared state updates in this system rather than having state changes being purely server-authoritative? (Presumably there's some kind of anti-cheat logic to prevent clients from pushing bogus updates?)
    Is server/client state desync ever a thing this system needs to deal with in that case, or does it just kinda trust TCP to do its thing correctly? (Or are all updates just purely idempotent in a manner such that that wouldn't actually matter in the long run?)

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว +1

      In optimal cases, the server is pretty much just forwarding the updates to clients authorized to see them. Anticheat would basically proofread the updates and block them if necessary. Clients work with whatever the latest data is. TCP should make it so updates aren't dropped (only sometimes delayed), but if it's really important, you can add in some extra steps to make 100% sure something was received.

    • @darthryking
      @darthryking ปีที่แล้ว

      @@DaFluffyPotato Cool stuff. I'm mostly curious because in my experience anti-cheat logic for dropping bogus packets that can contain arbitrary updates can sometimes get a little bit insane depending on the game lol. The engines I've been working with recently simplify that a little by only accepting forwarded I/O inputs from the client (rather than actual state updates), and having state updates only being computed on the server and pushed to the clients, but that kind of architecture leads to a whole bunch of other complications that you then need to design systems to compensate for...
      IMO having a shared state model is definitely the right move in any case!

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว

      Games that need a 100% server authoritative model base on IO are usually structured much differently overall, but yeah, the shared object abstraction could still be used for it.

  • @ratefort319
    @ratefort319 ปีที่แล้ว

    What design patterns you use the most?

  • @electricimpulsetoprogramming
    @electricimpulsetoprogramming ปีที่แล้ว

    how do you deal with progamming burnout?

  • @therayvenn3482
    @therayvenn3482 ปีที่แล้ว +3

    have my children

  • @watahapolyka
    @watahapolyka ปีที่แล้ว

    What if you run server in PyPy insteaf of Cpython? Wouldn't that significantly improve performance?

  • @ToxifirateGaming
    @ToxifirateGaming 11 หลายเดือนก่อน

    hello. how did u actually start game dev? did u do any cource or r u self taught

  • @Fezezen
    @Fezezen 11 หลายเดือนก่อน

    Why would you use TCP for a real-time game..

  • @dicember92
    @dicember92 ปีที่แล้ว

    I didnt understand much... but it's been beautiful

  • @pietraderdetective8953
    @pietraderdetective8953 ปีที่แล้ว

    Great video!
    I've been wondering if you will do a tutorial series on Godot 4 game engine?

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว +2

      No because I don't have much experience with Godot at the moment.

  • @odiverso4407
    @odiverso4407 ปีที่แล้ว

    Hi, did you rent a server, or did you use your own computer as the server?

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว

      Both work, but I rent

    • @odiverso4407
      @odiverso4407 ปีที่แล้ว

      @DaFluffyPotato I wanted to use my own computer as a host to play with my friend who lives in another neighborhood. I'm just afraid a hacker would be able to get access to my machine.

  • @parv1304
    @parv1304 ปีที่แล้ว

    Can u pls make a video on your planet shader

  • @tkjo64
    @tkjo64 หลายเดือนก่อน

    im not sure if th game is 2d or 3d

  • @deumnoctis
    @deumnoctis ปีที่แล้ว

    Do you host your own server or where is the server code running

  • @maixior123
    @maixior123 ปีที่แล้ว

    Do you try to implement rollback netcode?

    • @DaFluffyPotato
      @DaFluffyPotato  ปีที่แล้ว

      That would exist at a higher level than the framework.

  • @intricate9666
    @intricate9666 ปีที่แล้ว +1

    Listen bro, You might change python multiplayer forever, as soon as you publish it pls drop some tutorials bro🙏

  • @ZooHair
    @ZooHair ปีที่แล้ว

    Sugoi

  • @spenceabeen
    @spenceabeen ปีที่แล้ว +2

    Gonk :D

  • @프로즐겜러-u7b
    @프로즐겜러-u7b ปีที่แล้ว

    if you can write in korean, please write korean subtitle.
    But it isn't here, I will see your video because it is very useful for me

  • @Jim_96504
    @Jim_96504 8 หลายเดือนก่อน

    Did you not consider UDP even once?

    • @DaFluffyPotato
      @DaFluffyPotato  8 หลายเดือนก่อน

      I believe I mentioned it in the video, but there's not much of an advantage. TCP mostly just causes slowdowns when packets are out of order or corrupted and need to be resent. If I want packets in order and guaranteed to be received, I'd just be writing that myself for UDP which would be more tedious and slower.
      If you watch the playtests, the networking performance is fine.

  • @naturep1x3ls
    @naturep1x3ls ปีที่แล้ว

    W rizz 🗿

  • @kosbebot6360
    @kosbebot6360 ปีที่แล้ว

    :D

  • @Andres-gq3zp
    @Andres-gq3zp ปีที่แล้ว +1

    first

  • @stromxplays9715
    @stromxplays9715 ปีที่แล้ว

    Second

  • @Kyrok
    @Kyrok ปีที่แล้ว

    5s ago lol

  • @basicallybrand
    @basicallybrand ปีที่แล้ว

    First comment

  • @prezadent1
    @prezadent1 ปีที่แล้ว

    lol, python game dev

  • @童貞翻訳サービス
    @童貞翻訳サービス ปีที่แล้ว

    first