VideojogosLusofona / pyrogue

Roguelike game in Python for teaching purposes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pyrogue

This is a simple roguelike game built in Python, as a students exercise of the Licenciatura em Videojogos da Universidade Lusófona de Humanidades e Tecnologias in Lisbon.

The particle system was built using:

History


Map loading, movement and camera

Image

  • Tiles can be created, and maps can be loaded from HD using a translation unit (that converts ASCII characters to tiles)
  • Player can move around using the arrow keys. Camera will focus on the player at all times

Added sprites

Image


Stats, enemies and attacks

Image

  • Character archetypes and stats
  • UI elements
  • Health, stamina and XP system
  • Enemy spawning
  • Player melee attack
  • Combat text

Simple AI introduced

  • Code adapted to be more similar to the code done in class
  • AI chase code as done in class (simple controller model)

Introduce Vector2 class

  • Added a Vector2 class to make the code a bit cleaner/easier to read

Improved AI system

Image

  • Improved AI with wander and chase behaviour - the absence of pathfinding still causes some issues, but it works nicely enough for now

Ability system

Image

  • Ability system for both player and enemies
  • Full buff system
  • Projectiles

Code Files

  • pyrogue.py: Entrypoint for the code. Creates tiles, does the main application loop, retrieves input and calls the rendering code
  • gamedata.py: Implements the GameData class, and creates the GAMEDATA singleton, through which most of the gamecode runs
  • map.py: Implements the Map class, which takes care of the map, including rendering
  • maptile.py: Implements the MapTile class, which acts like a prototype of an individual tile. There's only one instance of each map tile (for example, even if the map has 1000 grass tiles, they only point to a single MapTile object)
  • character.py: Main character class, used for both the player and enemies. It's responsible for rendering and updating the entity, including moving and attacking
  • controllers.py: Classes for the controller system - keyboard input and simple AI
  • archetype.py: Implements the Archetype class, which represents a player/enemy class, along with stats and other required assets for displaying
  • archetypes.py: This is where the actual definition of the archetypes of the game is done
  • ability.py: Implements the Ability class, which represents an ability that can be given to a player or enemy
  • abilities.py: This is where the actual definition of the abilities of the game is done
  • buff.py: Implements the Buff class, which represents a buff/debuff that can be given to a player or enemy
  • buffs.py: This is where the actual definition of the buffs of the game is done
  • projectile.py: This is where the Projectile class is defined, which is used to track active projectiles in the game
  • combattext.py: Implements the combat text class, which tracks the data needed to display and animate the combat text of the game.
  • utilities.py: A series of functions to help with the game. Currently, it only has functions to center text at a certain position and to render a progress bar.

Art

Wall, tree, player characters and blob enemy by Angel (made available through the CC0 License)


Licenses

All code in this repo is made available through the Apache License 2.0 license. The text are made available through the CC BY-NC-SA 4.0 license.


Metadata

About

Roguelike game in Python for teaching purposes

License:Apache License 2.0


Languages

Language:Python 100.0%