How to Make Multiplayer Python Games - Tutorial
Making multiplayer games takes the surprisingly simple functionality utilized with socket programming and makes use of powerful abstractions in order to communicate game states/events. This tutorial covers a basic netcode case for a Tic-Tac-Toe Pygame game through the use of the built-in Python socket library.
Base Tic-Tac-Toe Pygame implementation built on in the video:
https://dafluffypotato.com/static/scripts/networking_tutorial/tictactoe.py
Finished Client/Server:
https://dafluffypotato.com/static/scripts/networking_tutorial/tictactoe_client.py
https://dafluffypotato.com/static/scripts/networking_tutorial/tictactoe_server.py
Clumsy (tool for stress testing netcode):
https://jagt.github.io/clumsy
Linode VPS Referral (gives me credit to pay for my servers):
https://www.linode.com/lp/refer/?r=4c4a0ebc1c40718e778abf5dec802a2c6ee8fbc3
Struct Docs:
https://docs.python.org/3/library/struct.html
Other Networking Videos:
• I "Just Added Multiplayer" to My Game
• I Made Multiplayer Gamedev EASY!
Support Me (and get source code for many of my unreleased projects):
https://www.patreon.com/dafluffypotato
GunSlaw Discord Server (join for playtests & dev updates of the VR shooter game in the video):
https://discord.gg/pDwkwY9Bj8
My Discord:
https://discord.gg/fluffland-554137097229959188
Check out Yawnoc on Steam (Video BGM is from Yawnoc): https://store.steampowered.com/app/2824730/Yawnoc
My Website (all games shown were made by me):
https://dafluffypotato.com/
Special thanks to my Potato Tier Patrons:
Agent Effe
c h point
Eivind Teig
Michael Placido
Nelligan
rethanon
Szabolcs Dombi
Timestamps:
0:00 - basics & architecture
3:55 - establishing a connection
18:20 - communicating events & states
46:52 - it works!
47:47 - playing over the internet
54:43 - other notes on networking from experience
#gamedev #python #sockets
Other Videos By DaFluffyPotato
2025-08-16 | How to make VR games with Python #gamedev #python #vr |
2025-08-09 | Recreating a Lost Minecraft Minigame in VR with Python |
2025-06-03 | How to Make Multiplayer Python Games - Tutorial |
2025-04-18 | Rendering 100,000 Steves with Python |
2025-03-22 | I Made My Python VR Shooter Multiplayer! |
2025-02-22 | Making a game in 48h for the Alakajam |
2025-02-22 | Making a game in 48h for the Alakajam |
2025-02-22 | Making a game in 48h for the Alakajam |
2025-02-22 | Making a game in 48h for the Alakajam |
2025-02-16 | I've completed 25 game jams. You should too! |
2025-01-09 | Pygame in 18 Minutes |
2025-01-02 | 2024 Pygame Projects |
2024-12-31 | PixKartz Playtest - Test out my online racing game with me! |
2024-12-14 | 🥔 Playing Yawnoc |
2024-12-08 | I'm making a VR Game Engine in Python |
2024-12-07 | Online Racing Game Gamedev |
2024-11-15 | 🥔 Playing Yawnoc |
2024-11-13 | Yawnoc Release Trailer |
2024-10-16 | 🥔 Playing Yawnoc |
2024-09-28 | "Balancing" Gamedev and a Day Job |
2024-08-25 | Yawnoc Teaser Trailer |