I show how to create an online multiplayer game with python using sockets and basic python networking. This is really cool and works on your local network. I use pygame, sockets and threading to accomplish this.
To modify this to work on your computer go to CMD type ipconfig and find the ipv4 addrss of the machine that will be running the server. You must change the host attribute in the Network class to match this value.
Code:
**************************************************************
One-Time Donations:
Support the Channel:
Twitter:
Join my discord server:
**************************************************************
Please leave a LIKE and SUBSCRIBE for more content!
Tags:
– Tech With Tim
– Pygame
– Python Tutorials
– Python Networking
– Socket Programming Python
– Online game in python
– Python multiplayer game
Prem Banker
04.08.2022very good video. Please do a full tutorial of implementing python games through socket programming
Shivam Kumraa
03.08.2022Tim please reply how to put this on Internet so that I can access this from anywhere???????
F0rg
03.08.2022Hey! I just want to say thank you for this tutorial. I have a Distributed System project for my finals and your video helped me a lot on building that. Well, I might even say you just saved my ass back there lol. I just presented it to my professor today and he was impressed. It also makes me understand more about networking too. And it's all thanks to you. You just got another subscriber
test
03.08.2022Is there any other way to do networking without using sockets? Thanks for the video btw, its great.
J_FIT
03.08.2022Thanks
Aidan Birmingham
03.08.2022Thanks dude this helped a lot
Lucas Guns
03.08.2022I loved this, thank you
Annoying Errors
03.08.2022No way to take it to WAN?
Siddhi Pardeshi
03.08.2022Do create more projects on networking!
Reed Viid
03.08.2022how i can contact youi need to speak with you privetly
arpita
03.08.2022Iโm just 11 yr old, I understood all of it
Donโt expect giving up programming by me
-11 yr old who hates age discrimination
M I E B A K A
02.08.2022Good stuff, and philanthropic. Keep it up, Tim.
theguyman232323
02.08.2022Well made. Interesting that you have to start new threads for each client. I thought sockets could handle more than one client per socket. Guess I was wrong
SHUBHAM SHARMA
02.08.2022how can i use this python networking in unty games pls reply asap it really help me thanks in advance
Battlelands Fruits
02.08.2022How to connect with other computer
monoastro
02.08.2022Can this be used to connect multiple computers on different networks?
p5kplamps
02.08.2022bro can you help me to use my socket program on another pc but i just wanna use my pc not third party services plzzzz help
Peter Person
02.08.2022Is there a video in which you talk about how to add an external server?
Mehul Srivastava
02.08.2022Instructions unclear, I accidentally made Fortnite ๐
CMGaming
02.08.2022is this a virus
roni markoos
02.08.2022how can I connect between two computers?
Gufran Ansari
21.07.2022hey can you make a step by step tutorial for this?? so that you can explain why you've used specific module or functions. and with characters instead of boxes if possible.. it'll be easy for you and quite help alot to us (beginners).. thanks in advance.. i love your tutorials bdw and you're very good in teaching..
Prakhar HoW diD yOu EvEN DaRe tO ReAD my SUrNAmE
21.07.2022video: * begins to play after a lot of loading & is now playing peacefully*
Random YT ad: "I'm gonna ruin this man's entire career"
SergeiBabuska
21.07.2022what should i do so that me and my friend( who is in different city) can play together?
Michael Cedeno
21.07.2022About website builders?
gnaanesh ks
21.07.2022thanks tim . please do a full tutorial in AI
zorfrak
21.07.2022How can you make it so that someone on a different network can connect?
yash goyal
21.07.2022can one port handle sending and receiving data with two infinite loops
means :-> two clients are sending data infinitely simultaneously on one port only
Yat Kiu Wong
21.07.2022But how to run it on different computers? Just find the ipv4 address of computer running the server?
Shiny Dewott
21.07.2022Love your videos man, thank you. Though I can't seem to make my game work online. I have a friend in another country and we want to play together but we can't seem to connect. Am I supposed to use my private IP address in Network and Server for it to work?
Rishi Shahi
21.07.2022i don't know how to play with another device
Mohamadamin Yarahmadi
18.07.2022Do u know c#
Can u teach c# too plz
Alitality
18.07.2022Thanks Tim
์ธ๊ธฐ๋ฐ์นด๋ผ
18.07.2022์ธ์ ์ด๋์๋ ์์ฝ๊ฒ ์ฉ๋ ๋ฒ์ด ํก ์ถ๊ฐ์ ๊ฐ์ ๋ณด๋์ค 5๋ง ๋๋ฆฝ๋๋ค ํก:fkbo1
์ปจ์นด์ง๋ ธ
18.07.2022์ธ์ ์ด๋์๋ ์์ฝ๊ฒ ์ฉ๋ ๋ฒ์ด ํก ์ถ๊ฐ์ ๊ฐ์ ๋ณด๋์ค 5๋ง ๋๋ฆฝ๋๋ค ํก:fkbo1
Lasp 10
18.07.2022Is there any way you can play with people who are on the other side of the city or something in python?
Paul Sachers
18.07.2022It works so good I love it๐๐๐๐
GentWorm
18.07.2022I am using Godot Game Engine to make a game. There are no documentations that show how to do straight-up simple multiplayer. I decided to get Python support for Godot, and this works great!
Thank you!
B
18.07.2022This video really helped me, thanks bro
mumblety
18.07.2022Multyplayer Pong! I shall make it.
Gaming Max
18.07.2022Even after 2 years this is still helping me. I have been looking for something like this.
Thank you. One more sub added.
Nero
17.07.2022nice!
Rheumatic Harm
17.07.2022Bruh..that's exactly what I needed.thnx๐
Python Otaku
17.07.2022These are actually much better than full "tutorials",
I don't really believe in code based video tutorials, since code is the visual representation of your logic, and when copying line by line, you cant exactly think the same way as the original creator
Vishal Raj Rai
17.07.2022Thanks for this video i have created many offline games but i want to create a multiplayer game but i was unable to create it you helped me well thank you ๐
Mohi
17.07.2022this is django or flask?
yasmin
17.07.2022You and meguiel are by far the best programming guiders in the whole net.
Would you do a python react ( maby game sparks) multiplayer memory match game?
MaxwellTriesToDev
17.07.2022very useful stuff, will look into this more soon ๐
you vanced
17.07.2022Now that python runs on the browser, can pygame run there too?
einghstein
17.07.2022congrades 1M sub