Sign inSign up

cendervn/thron-game

By cendervn

Updated 10 months ago

A game built with Python and Pygame, created for the BSCS1002, 5 ECTS of the University of Helsinki.

Image
Integration & delivery
0

101

cendervn/thron-game repository overview

Thron - A Tron Clone Game

A multiplayer/singleplayer light cycle game built with Python and Pygame, created for the Advanced Course in Programming (BSCS1002, 5 ECTS) of the University of Helsinki.

Overview

Thron is a classic Tron-inspired game where players control bikes that leave trails, attempting to outsmart opponents while avoiding collisions with trails and walls. The last surviving bike wins the round.

Game Features

  • Two Game Modes:

    • Singleplayer: Play against 1-3 AI opponents with heuristic pathfinding
    • Multiplayer: Two-player local gameplay on the same keyboard
  • Player Controls:

    • Player 1: Arrow keys (↑↓←→)
    • Player 2: WASD keys
  • AI Opponents: Simple heuristic pathfinding with smart decision-making

  • Score Tracking: Win/loss conditions and cumulative score tracking in multiplayer mode

  • Clean Menu System: Intuitive navigation between game modes and options

Requirements

  • Python 3.x
  • pygame - Install via: pip install pygame

Installation

  1. Clone or download this repository
  2. Install the required dependencies:
    pip install pygame
    

How to run

  • Direct python src/main
  • Using Docker

Build the Docker Image

docker build -t thron .

Allow local containers to connect to X (run once per session)

xhost +local:docker

Allow local containers to connect to X (run once per session)

xhost +local:docker

Run the container with X forwarding

docker run --rm
-e DISPLAY=$DISPLAY
-e XAUTHORITY=/home/thron/.Xauthority
-v /tmp/.X11-unix:/tmp/.X11-unix:ro
-v $HOME/.Xauthority:/home/thron/.Xauthority:ro
thron

Tag summary

Content type

Image

Digest

sha256:13b2cbb70

Size

156.4 MB

Last updated

10 months ago

docker pull cendervn/thron-game:1.0