Skip to content

Jackyzaz/python-classes-text-battle-with-socket

 
 

Repository files navigation

Python Classes - Text-Based Battle Scene

My most recent and well-built tutorial about Object-Oriented Programming (OOP) in Python. All in a fun way of creating a text-based ASCII battle scene, featuring Character subclasses, different Weapons and dynamic HealthBars.

https://youtu.be/0e2DexQlDYk

img.png

Playing over LAN

This project includes a simple TCP server and client to play with a friend on the same LAN.

  • net_server.py — run on one machine that will host the match.
  • net_client.py — run on each machine that will join (two players total).

Quick start:

  1. On the host machine run:
python net_server.py
  1. On each player machine run (replace with the server's LAN address):
python net_client.py <host-ip> 9999
  1. Follow the prompts to enter your name, select a class and choose actions each round.

Notes and limitations:

  • This is a minimal, educational implementation. It uses a line-delimited JSON protocol and expects exactly two clients.
  • No reconnection, latency or cheating protections are implemented. Use only on trusted LANs. Python Classes - Text-Based Battle Scene =========================== My most recent and well-built tutorial about Object-Oriented Programming (OOP) in Python. All in a fun way of creating a text-based ASCII battle scene, featuring Character subclasses, different Weapons and dynamic HealthBars.

https://youtu.be/0e2DexQlDYk

img.png

About

Socket Comprehensive OOP Python tutorial - suitable for beginners too.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%