A small multiplayer first-person deathmatch game built with Ursina and Python TCP sockets. One player runs the server and other players connect as clients over a local network or a reachable public address.
- First-person movement, jumping, shooting, health, death, and respawning
- Up to 10 concurrent players
- Player names represented by selectable colors
- TCP networking for player movement, health, bullets, and respawn events
- Fullscreen Ursina game window with a Tkinter connection screen
Pre-built Windows executables are provided in the play/ folder:
| Role | Executable Path | Description |
|---|---|---|
| Server (Host) | play/server.exe |
Hosts the game session, manages player states and bullet physics. |
| Client (Player) | play/client.exe |
Opens the connection GUI, selects player color/username, and launches the 3D game. |
Tailscale creates a secure, encrypted peer-to-peer mesh VPN between your devices. It allows players from different homes, networks, or Wi-Fi connections to play together directly without port forwarding, router configuration, or Hamachi.
- Download Tailscale:
- Download the installer for Windows, macOS, Linux, Android, or iOS from the official site:
π https://tailscale.com/download
- Download the installer for Windows, macOS, Linux, Android, or iOS from the official site:
- Sign In:
- Launch Tailscale and sign in (using Google, GitHub, Microsoft, or Apple account).
- Connect Your Devices:
- Method A (Same Account): Sign into the same Tailscale account on all player devices.
- Method B (Node Sharing): The host signs into their Tailscale admin console, clicks the
...menu next to their machine, selects Share..., and sends the invite link to the players.
- Find Your Tailscale IP:
- The host's Tailscale IPv4 address starts with
100.x.y.z(for example,100.121.132.98). - You can view it by clicking the Tailscale tray icon, running
tailscale ip -4in PowerShell, or looking at the server console.
- The host's Tailscale IPv4 address starts with
- Double-click
play/server.exe(or runpython server/main.py). - A terminal window will open and automatically detect your Tailscale IP:
================================================== [*] Server started, listening on 0.0.0.0:8888... [*] Tailscale IP = 100.121.132.98 (Use this for Tailscale) [*] Local LAN IP = 192.168.x.x / 10.x.x.x (Same Wi-Fi only) ================================================== - Share the displayed Tailscale IP (e.g.
100.121.132.98) with your friends. Keep this window open.
- Each player double-clicks
play/client.exe(or runspython client/main.py). - On the connection screen:
- Username: Select your favorite color or enter a custom username.
- Server Address: Enter the host's Tailscale IP (e.g.
100.121.132.98).- Note: If running the client on the host machine itself, the Tailscale IP is auto-detected and pre-filled in the dropdown!
- Port: Keep default
8888.
- Click Play (or press
Enter). The game will connect and launch into fullscreen 3D!
If all computers are connected to the exact same home/office Wi-Fi router:
- Host launches
play/server.exeand notes the Local LAN IP (e.g.192.168.0.xor10.x.x.x). - Other players on that same Wi-Fi launch
play/client.exe, enter that Local LAN IP, and click Play. - Ensure Windows Firewall allows Python/server inbound traffic if prompted.
- Run
play/server.exe. - Run
play/client.exe. - Use
127.0.0.1or your Tailscale IP as the server address, port8888, and click Play.
If you prefer running or modifying the Python source code directly:
- Python 3.10 or newer
- Windows, Linux, or macOS
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt(On Linux/macOS: source .venv/bin/activate)
# Terminal 1: Server
python server/main.py
# Terminal 2: Client
python client/main.py| Action | Control |
|---|---|
| Move | W A S D |
| Jump | Space |
| Aim | Mouse |
| Shoot | Left mouse button |
| Respawn after death | R, Space, Enter, or the respawn button |
| Exit | Esc |
- Tailscale (Recommended): No router changes, static IPs, or port forwarding required. Traffic travels encrypted over your Tailnet. To verify communication between devices, run:
tailscale ping <host-tailscale-ip>
- Local Wi-Fi / LAN: Make sure all devices are connected to the same router and Windows Firewall allows inbound TCP traffic on port
8888. - Public Internet (Direct): If not using Tailscale or VPNs, forward TCP port
8888on the router to the host machine or use a TCP tunneling service (such as playit.gg).
play/
server.exe Standalone server executable
client.exe Standalone client executable
client/
main.py Client entry point and game loop
network.py TCP client and message serialization
player.py Local player, health, death, and respawn behavior
enemy.py Remote player representation
bullet.py Projectile behavior
floor.py Arena floor
map.py Arena geometry
assets/ Textures and audio
server/
main.py TCP game server
requirements.txt
- Tailscale connection issue: Ensure Tailscale is running on both host and client machines (icon should be active). Run
tailscale statusto confirm both devices appear on the network, andtailscale ping <host-tailscale-ip>to verify connectivity. - Connection refused: Confirm the host has already started
server.exeand is listening on port8888. - Timeout: Check that Windows Firewall isn't blocking
server.exeorpython.exe. When Windows prompts you on first run, click Allow access. - Invalid address: Ensure the client entered a valid IPv4 address (e.g.
100.x.y.zfor Tailscale or192.168.x.xfor local Wi-Fi). - Port already in use: If port
8888is already bound by an existing server instance, close the previousserver.exewindow or terminate the background process.
See LICENSE.


