Python Online Multiplayer Game Development Tutorial
Why Stack Overflow recommends it
Stack Overflow users link it when they are following along with the tutorial's socket and pygame code and hit errors they ask about.
Recommended by 2 people across 2 different months, 2020 to 2021.
What it is
A 2h21m freeCodeCamp course, taught by Tech with Tim, on building a scalable online multiplayer game in Python using sockets and pygame. It covers writing a client and server, handling multiple clients, sending objects with pickle, and finishes with an online Rock Paper Scissors game.
What people said
Recommends Benjamin Wall · 2020-04 · Stack Overflow · on “pygame TypeError: Rect argument is invalid”
I have read many threads with the same issue as me, but haven't found any that solve my problem, so have decided to ask here. I am currently following this tutorial [this video] . At 1:01:58, when he runs he gets no error, but I receive the error in the title above: Traceback (most recent call last): File "C:/Users/User/PycharmProjects/networkTutorial1/client.py", line 80, in <module> main() File "C:/Users/User/PycharmProjects/networkTutorial1/client.py", line 78, in main redrawWindow(win,p,p2) File "C:/Users/User/PycharmProjects/networkTutorial1/client.py", line 54, in redrawWindow player2.draw(win) File "C:/Users/User/PycharmProjects/networkTutorial1/client.py", line 22, in draw pygame.draw.rec
Recommends Phrase · 2021-06 · Stack Overflow · on “Player not displaying when the code runs?”
The code dose give some errors but I don't understand them. I tried to search them up but nothing! The errors are: File "d:\Python\sendsend\client.py", line 67, in <module> main() File "d:\Python\sendsend\client.py", line 64, in main redrawWindow(win,p) File "d:\Python\sendsend\client.py", line 50, in redrawWindow pygame.display.update() The Code is: import pygame width = 500 height = 500 win = pygame.display.set_mode ((width, height)) pygame.init() pygame.display.set_caption("Client") clientNumber = 0 class Player: def __init__(self, x, y, width, height, color): self.x = x self.y = y self.width = width self.height = height self.color = color self.rect = (x,y,width,height) self.val = 3 def d
Cites Andrew Kruszka · 2020-11 · Stack Overflow · on “Having trouble connecting to a local server in Python”
I'm currently following this tutorial on how to make a multiplayer game using python: [this video] I'm currently trying to connect to a server file with a network file. Running the server file prints out the correct piece of information but once I try connecting to it with the network file nothing happens. Here is my server code. When it runs it prints out "Waiting for a connection, Server started (I have removed my IP address, but I know that I have the right one in for when I run my code) import socket from _thread import * server = "***.***.*.**" port = 5555 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.bind((server, port)) except socket.error as e: str(e) s.listen(2) print("Wai