Hi, this is Karen again! Today, we're diving into an educational example on zombie computersโwith a twist! Weโre making a videogame, but this game also includes a client-server connection setup. This will be a playful introduction to how connections work in a controlled environment. Letโs dive in! ๐
This repository has two main components:
-
setup.py โ Our Happy Hen videogame! ๐ฎ๐
-
controlador.py โ A server socket to manage connections. ๐ฅ๏ธ๐
The main goal is to create an .exe using Pygame so that our game can run as a standalone application. To do this, weโll use cx_Freeze to turn our game into an executable file.
Set Up the IP Address:
Before you begin, youโll need to modify the IP address in the code. Make sure to enter the IP of the computer you want to use as the server in both the game (setup.py) and the server (controlador.py) files.
Install cx_Freeze:
This tool is what allows us to create an .exe file for our Pygame project.
pip install cx_FreezeBuild an example on cmd:
python setup.py buildOn Server device run (controlador.py) :
python controlador.py ๐ Running the Game on client device
After setting up, you can compile and run the game! It's a fun way to explore basic client-server interactions while watching a happy hen survive a zombie apocalypse! ๐๐งโโ๏ธ]

