/Elements

An RPG turn-based game that centers on the four elements

Primary LanguagePython

Elements

Summary

Elements is an RPG turn-based game that centers on the four elements (Water, Earth, Fire and Air) and how they are used together or against each other in dynamic gameplay.

Gameplay and Features

Users will create a hero with a chosen element that determines their attacks and weapons. Each level has an element theme, and opponents of the level wield the element of that level. Elements will have a weakness to one other element, which will affect player damage. Complete with 10 levels, heroes will have to battle their way to the end to earn the title King of Elements.

Level Progression
As the levels progress, opponents get stronger and deal more damage. At higher XP levels, the hero also deals more (base) damage.
Shop Feature
A shop is available to access between levels that will strengthen the hero. Items include higher-level weapons, element stones, and more.
Save Feature
A database-free save feature is added via password generation for the user to play levels with previous stats.
Other Gameplay Settings - Difficulties and Modes
Other settings include three different difficulties and modes for the user to customize their gameplay experience. These can be accessed from the main menu.

Getting started

Elements is run on Python 3, so you will need to have that installed.

To install Python 3, click here

Once installed, you can download Elements manually, or inputting git clone git@github.com:alexrogers823/Elements.git into your terminal.

Author

All code written by Alex Rogers

What I learned

After writing a lot of scripted and functional programs, I wanted to get better at Python by using Object-Oriented Programming in my code. When watching Python tutorials in Treehouse that had a similar RPG layout, the "Elements" idea spawned in my head and I began planning.

Challenges and Solutions

  • Early on, I had a challenge understanding getters and setters in classes, and when they were necessary in the code. I solved this by referring back to my blueprint of what variables were going to change during gameplay.
  • Another challenge was deciding what would be in the main program and what needed to be imported as a separate file. This helped me to learn more about abstraction.
  • Getting the save feature to work by a user-inputted password was challenging.

Improvements/Additional Features

  • Diversify character names and attacks
  • Refactored code to have one central "level" function
  • Added tutorial class variable to show tips as user progresses through gameplay

Thank you to those who have starred, forked and tested my code!