Skip to content
julius-bPublic

About

pygame multiplayer

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Protecc!

multiplayer pygame with lobbies.

WARNING

early WIP, idk Python

screen1
Requirements
  • allow reconnect (retaining player state)

    • if non-temporary disconnect: pass resources to remaining user

    • do not rely on IP (e.g. train hotspot) for id

  • allow for high delay

todo
  • implement coop tower-defense style game

  • encryption

  • UDP? IPv6?

  • keepalive / ping, see builtin python?

multiplayer status:
  • player movement synced, worlds are completely unsynced :)

original game (without multiplayer):
run the game
$ python server.py

# positional arguments: nick lobby
$ python main.py nick 123
$ python main.py clark 123

Protocol

Setup

client: (nick-length)(nick)
client: (lobby-id) # unsigned char
server: (player-id) # unsigned char

Commands (struct packing)

client: p(pid)(x)(y)(rot)(health) # !cBfffB

Arch setup

# setup venv (python-pygame-ce seems broken)
$ ---

# server connection test
$ sudo pacman -S socat
$ socat - TCP4:localhost:3579

Other

Audio
#$ ffmpeg -i mp4 -vn -acodec copy boom-audio.aac
$ ffmpeg -i mp4 -vn boom-audio.wav
$ ffmpeg -ss 4.4 -i boom-audio.wav -t 1 -c copy boom1.wav
$ ffmpeg -ss 6.15 -i boom-audio.wav -t 0.9 -c copy boom2.wav

About

pygame multiplayer

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages