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:
- Python 3.11
- Pygame (https://www.pygame.org/news)
Map loading, movement and camera
- 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
- Character archetypes and stats
- UI elements
- Health, stamina and XP system
- Enemy spawning
- Player melee attack
- Combat text
- Code adapted to be more similar to the code done in class
- AI chase code as done in class (simple controller model)
- Added a Vector2 class to make the code a bit cleaner/easier to read
- Improved AI with wander and chase behaviour - the absence of pathfinding still causes some issues, but it works nicely enough for now
- Ability system for both player and enemies
- Full buff system
- Projectiles
- 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.
Wall, tree, player characters and blob enemy by Angel (made available through the CC0 License)
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.
- Autor: Diogo Andrade