This Python online game tutorial will show you how to code a scaleable multiplayer game with python using sockets/networking and pygame. You will learn how to deploy your game so that people anywhere around the world can play against each other.
You will learn and understand the following after this tutorial:
• How a Client/Server System Works
• How to Develop Applications to an External Server
• How to Code a Client
• How to Code a Server
• Sending Encrypted Data Such as Objects Over a Port
• Connecting Multiple Clients to a Server
💻Code: https://techwithtim.net/wp-content/uploads/2019/03/networkTutrorial.zip
⭐️ Contents ⭐️
⌨️ (0:00:51) 1 – Creating a Client Using Sockets
⌨️ (0:16:55) 2 – Creating a Server
⌨️ (0:34:04) 3 – Sending & Receiving Information From Server
⌨️ (0:44:43) 4 – Connecting Multiple Clients
⌨️ (1:03:38) 5 – Sending Objects With Pickle!
⌨️ (1:14:52) 6 – Online Rock Paper Scissors
🔗 How to Install Pygame: https://www.youtube.com/watch?v=AdUZArA-kZw
🔗 Pycharm Download: https://www.jetbrains.com/pycharm/
🎥 Tutorial from Tech with Tim. Check out his YouTube channel: https://www.youtube.com/techwithtim
—
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://freecodecamp.org/news
And subscribe for new videos on technology: https://youtube.com/subscription_center?add_user=freecodecamp
source
Hope you guys enjoyed the video! Make sure to check out my channel for more awesome python content :))
cool, but how i'm turn my socket in a real server?, exemplo: i need a socket for connect two peoples of != wi-fi, how i'm make this? i just can run in localhost
Could someone tell how to make server be accessible across the internet. That is, I want to access the server running in one network from a completely different network. I tried all methods, such as using public IP, etc etc, but nothing seems to work…
Game link?
Just a small hint for everyone watching:
Don't lose time watching/trying to understand this video or code if you don't have GOOD basic understanding in python.
First learn the basics and object oriented programming, then come and watch this video
where is 'start_new_thread'?
hey! I wanted to make a "The Price is Right" game where the opponent chooses a number and the other one has to guess it
depending of the number you pick it tells you "Higher" or "Lower"
could you help me please? thanks in advance! 😀
learning python whilst I am isolating with covid
I have seen a few videos about something called ursina for making 3d stuff – has anyone used it and how hard is it to use
i wish you labeled the code before publishing theres a cool thing in coding called documenting your work for educational purposes
SOCK_STREAM means that the socket uses TCP/IP and holds Connections. SOCK_DGRAM is connectionless and uses the User Datagram Protocol (UDP).
amaizing tutorial gg
deubg time to time pls!
this is super useful and fun thank you TIM!!
Never mind I found start_new_thread. Could you send a link to the files though? I am making a similar game but encountering lots of errors.
how can i play it with my friend now on two different computers?
About 1:23:57
Hope u read it and say ur opinion about this method
There is an easier way
U just make a list:
Priority = ['R', 'P','S']
And then u can just say
If p1 == p2
Return -1
Elif Priority[Priority.index(p1)-1]==p2
Return 0
Else return 1
God.., does this guy know everything?😄
1:23:15 I think this works too: implement moves as circular priority
Move=["R":0,"P":1,"S":2]
if(Move[p1]==Move[p2]):
TIE
elif((Move[p1]+1) mod 3==Move[p2]):
p2 winner
else:
p1 winner
never use try: … except: pass, it's just bad, print error or something
when I execute client file at first video I get a error messge 'video system not initialized' at "keys= pygame.key.get_pressed()".
Is there any problem to execute the program? Why this happen?