Skip to content

sevketbinali/Attack-on-Titan-PyGame

Repository files navigation

Attack on Titan

This is a simple 2D shooter game that lets you control a character and fight against different monsters.

Installation

You can directly access the branch with the virtual environment branch here.

or

Install a Virtual Environment using Venv

python -m venv <directory-of-project>

If u have this error : cannot be loaded because running scripts is disabled on this system.

Run PowerShell as a adminastrator. Run the following command.

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine

type A [Yes to All] and hit [Enter]

and retry the create virtual environment using "python -m venv venv" code.


PNG

This project uses Python3.

The library Pygame is also used.

To install pygame:

pip install -r requirements.txt

If u have this error : ERROR: Invalid requirement: 'pygame 2.1.2'

pip list --format=freeze > requirements.txt
pip freeze

and re-run the

pip install -r requirements.txt

Playing the game

PNG

Simply run

./titan.py

Tested with Python 3.8, 3.9 and 3.10 !

Generating an executable file

To generate an executable that can be run without having Python installed:

pyinstaller run.spec

(The file run.spec has been generated by pyinstaller and then manually modified to include a resource directory.)

The executable has to be run from the terminal, and you have to cd into the directory before executing it.

Gameplay basics

PNG

  • Use left and right arrow keys to move
  • Use spacebar to shoot
  • Press 'P' to pause the game
  • Press 'Enter' to restart the game

Gameplay

GIF

Releases

No releases published

Packages

No packages published

Languages