Making a Multiplayer Game from Scratch in Python

Поделиться
HTML-код
  • Опубликовано: 30 мар 2023
  • In today's video we learn how to make a multiplayer version of the game "Snake" using Python. It uses asyncio for the networking and graphics.py for the visuals, but everything else is made from scratch. There's a crash course in networking at the end and a good explanation of the observer pattern, but currently the client is broken and can't listen to the server. Huge points if you can fix it :)
    Source Code: github.com/Shifty-The-Dev/Mul...
    Client vs Server by ‪@LiveOverflow‬: • What is a Server? (Dee...
    Icons by Icons8: icons8.com/
    Music:
    chill by sakura Hz
    Hall of the Mountain King
    Edited in Davinci Resolve
  • НаукаНаука

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

  • @slidanu2b
    @slidanu2b Год назад +4

    Man you’re really talented, keep the pace

  • @rafelsv4844
    @rafelsv4844 Год назад +12

    Tomorrow I have an Object Oriented exam at uni. I was so hyped that I could understand you were using a Design Patter (Observer) in this project. It felt like what I was studying had a purpose xdddd Great content!

    • @ShiftyTheDev
      @ShiftyTheDev  Год назад +3

      OO patterns are always really satisfying when you can find places they improve your code. Good luck on your exam!

  • @maskangel
    @maskangel Год назад +28

    good video, you should add gameplay at the end

    • @ShiftyTheDev
      @ShiftyTheDev  Год назад +9

      Good idea for next time, there's a bit in the intro

    • @mrozyyev2853
      @mrozyyev2853 Год назад +7

      yep, agreed on that. Viewers should get the "reward" they've been waiting for.

    • @B3R34L
      @B3R34L Год назад +1

      yes exactly

  • @kieraisverybored
    @kieraisverybored Год назад +9

    Cool video! I enjoyed your previous one can’t wait to watch this!

  • @tullman3craggs102
    @tullman3craggs102 10 месяцев назад +2

    Vid style is a work of art! Pythons simplicity at its best! I still don't understand half of it but hey, I'll just rewatch it until I think I do!

  • @JacksHQ
    @JacksHQ Год назад +2

    Very informative and I love how you simplified things to the extent that you did. I recently graduated with a computer science degree and can say you concisely covered several things that took my professors a lot longer to, lol.

  • @ScarletEnder
    @ScarletEnder Год назад +2

    Amazing video, super great explanation of the code and very visually pleasing! I was able follow along and understand your code even though I didn't know anything you talked about and I've never used Python either.
    I started learning programming in my free time about 8 months ago and I found both of your current videos super informative and entertaining. I can't wait to see what you do next. Keep up the great work!

  • @ilanlee3025
    @ilanlee3025 Год назад +5

    Great vid. I can only imagine how much work went in to that. Like and subscribed. Keep it up :)

  • @michaelscott6214
    @michaelscott6214 Год назад +2

    So glad I stumbled upon this video! I have been looking for good examples of asyncio streams for a while!

    • @michaelscott6214
      @michaelscott6214 Год назад

      Hi! I read some of the source code and I have a quick question: It looks like the client sends a request and then after it gets one response the connection is closed. Then when the server wants to send a message to the client, it opens a new connection (based on info from an Observer instance), sends the data, and then closes the connection again. Are there any pros or cons of doing it this way vs. just keeping all of the client connections open? Or maybe even using the web sockets protocol to add framing?

  • @webstercharly
    @webstercharly Год назад

    Really like the style and how you present your videos. Thank you for creating them and looking forward to more.

  • @idkbruh173
    @idkbruh173 Год назад +4

    I recently tried something like this, rlly curious as to both how you implement it (I haven't watched the video yet) and how the sub counter on this channel is going to continue. I feel like your video's have the perfect balance between code and sometimes a break in the music or a joke to hold your attention! Really cool, can't wait to see this channel blow up.

  • @mrozyyev2853
    @mrozyyev2853 Год назад

    Great stuff! Will be waiting for your next video.

  • @frensyyo
    @frensyyo 7 месяцев назад +1

    you are heavily underated

  • @duhby
    @duhby 8 месяцев назад +1

    11:23 the "what?" made me laugh for no reason

  • @Kynatosh
    @Kynatosh Год назад +1

    Hehe you mentioned our lord LiveOverflow
    Very high quality and effort video btw, wow

  • @mgoksu33
    @mgoksu33 7 месяцев назад +1

    Awesome video! Really. The amount of effort put in the video to show things clearly, made me immediately subscribe to your channel and check your other videos.

  • @bgubs07
    @bgubs07 Год назад +2

    I don't think I'll ever forget UDP/TCP now 😳

  • @grantkimbell6797
    @grantkimbell6797 Год назад +2

    So fucking informative, i wish they would started my networking class with your explanation

  • @motsyrhc7436
    @motsyrhc7436 Год назад +1

    this is such a informative video :D

  • @chroma1001
    @chroma1001 Год назад

    Commenting for algorithm, great editing!

  • @thinggggggggg
    @thinggggggggg Год назад +1

    bro love the vids, how have u not blown up yet :c

  • @mr.alkenly889
    @mr.alkenly889 Год назад +1

    How do I keep watching big youtubers before they become big, remember me lol
    Also loved the video, good job giving the basics on the networking, I'm learning networking rn and alot of the things you said are pretty accurate, nowadays it would probably be safer to use a reverse proxy than a port forward especially when connecting a server to the internet, something like cloud flare makes that easier to do, or better yet a small cloud computer like aws or linode, networking is complex though especially securing the network
    Of course I haven't programmed any networking stuff so your a step ahead of me when it comes to actually doing it

  • @wx11-v
    @wx11-v Год назад

    really good content !

  • @qwertypopo100
    @qwertypopo100 Год назад +1

    Amazing video, subbed because of it! How are you making those animations? They're top notch

    • @ShiftyTheDev
      @ShiftyTheDev  Год назад

      Thank you! I'm using Davinci Resolve to animate

  • @greenin5537
    @greenin5537 Год назад +1

    can't believe Mr Beast ate a live hamster again

  • @pab2020
    @pab2020 Год назад

    Nice video

  • @pokora666
    @pokora666 Год назад

    Good video! Can I ask what software do you use to edit?

  • @cgyh68748
    @cgyh68748 Год назад

    cool

  • @emna904
    @emna904 Год назад

    Hello, I hope you doing well, What courses should I take, to have knowledge like you?

    • @ShiftyTheDev
      @ShiftyTheDev  Год назад +3

      Thank you! This is a really good question, but I think it really depends what you know now. Here's a few general recommendations:
      Python: mCoding on RUclips, r/python, and r/learnprogramming
      Networking: Deepdive series by LiveOverflow on RUclips
      Patterns: Design Patterns book by Erich Gamma et al
      If there's enough interest, I may make some general tutorials like an introduction to programming, problem solving and design, etc. Hope you are doing well too :)

  • @Russos3
    @Russos3 Год назад

    Hey! I was looking for a way to contact you but didn't find any. I would like to know if it's possible to automate discord accounts? For example if I want it to login to a certain account and send a message per say.

    • @ShiftyTheDev
      @ShiftyTheDev  Год назад +1

      100% possible with Discord's API :) discord.com/developers/docs/intro

  • @meditaters144
    @meditaters144 Год назад +1

    Nice!!!!!!!!!!!!!!!!!

  • @learnlinuxwithmellwm
    @learnlinuxwithmellwm 3 месяца назад +1

    Mr beast eat What 😂😂😂

  • @tall_guy81
    @tall_guy81 Год назад

    WHY!! You just say "you need the port forward, bye!" Seriously?! How do I do that?! How to do port forward? Is it possible to do that with just python?

    • @ShiftyTheDev
      @ShiftyTheDev  Год назад

      Port forwarding is typically configured in your router settings. I didn't get too specific because it can be different based on your router or network setup. Here's a good resource to try: www.noip.com/support/knowledgebase/general-port-forwarding-guide

    • @tall_guy81
      @tall_guy81 Год назад

      @@ShiftyTheDev Thank you, but that's a bit not what I was looking for. You know, in games like RoR2, Portal 2, Don't Starve Together, Raft and so on you can create your own lobby and server, where people from all over the world can come. Is it possible to make sth like that in python?