I am going to make a new game based on the four elements(fire,earth,water and air). It will be a top down survival shooter.
The core mechanics are that the player has 4 types of attack. (bullet, bomb, nova and orbit)
At certain points, the player can permanently infuse their attacks with one of the four elements. i.e. drag and drop FIRE onto your "bullet" slot and the bullet becomes a fire bullet.
Each attack, can be modified by two elements. EARTH + FIRE = LAVA.
This means 10 possible combinations (14 if I allow same element stacking)for each of the four attacks.
That's 40-56 unique attacks for me to code, which isn't the problem. I can code all of the actual game mechanics, such as damage, choosing sprite, special effects etc.
What I need is an elegant way to track which modifiers each attack has and then a way for the engine to determine which modified attack to start using. I wanted to have a menu that you place the elements onto. In a very simple setting, I would code this.
FIRE is overlapping BULLET1 -> set firebullet boolean true.
FIRE is overlapping BULLET1
EARTH is overlapping BULLET2 -> set lavabullet boolean true
Clearly, this will be quite cumbersome with 40+ attacks as well as having to account for two slots per attack. Unfortunately, I am a hopeless visionary, and not much of a coder...
My friend suggested using an array, but I have no idea how to tie arrays to work with variables. Does anyone have a suggestion?
Thanks