Here’s day 2 of my notion journaling
Right now I want to create 3 simple cards: Increase speed, increase attack speed, and swap weapons (I currently only have basic cannon, and bounce weapons)
…The only simple one is increase speed… actually none of them are simple…
Is this a product of my poor coding/setup or is it a product of the intricacies at hand?
Attack speed:
- The problem is that right now I have a cooldown system (set to 1 which means shoot every 1 second). This doesn’t really fare well with increasing or decreasing attack speed since decreasing or increasing statically will eventually make my cooldown negative… which means you can constantly fire.
- Hm… I was thinking I had to refactor my attack speed to attacks/second (like in League of Legends) instead of seconds/attack… but what if I have debuffs to my character? What if I do something like <Lower attack speed but bullets penetrate through 1 more enemy>?
- Then my attacks/second can go down to 0… which would definitely not be what we want.
- Seems like the solution is to increase or decrease by percentages… so maybe have a base attack speed (currently 1 second per attack) and a multiplier (2x speed) and that multiplier can change by a percentage?
- So if I want to double my attack speed, I can multiply my multiplier by 2
- If I want to half it, I can multiply my multiplier by 0.5
- The problem is that I can’t increase or decrease my attack speed by a static number… maybe this is why they always increase these stats by percentage instead of by flat numbers lol
Movement speed:
- Currently, I have acceleration and max speed. But nobody cares about the under-the-hood stuff!
- I want to be able to increase or decrease the move speed while keeping it to reasonable limits and making it still feel good
- I think the best way to do this is to have a single move speed (no max speed) and increase drag exponentially as the move speed goes up. Alternately, have very high deceleration or scale deceleration with acceleration (why does deceleration have one c and acceleration have two?)
- This would make movement feel more snappy
- I also have to think about things like windup time, and so on
- This is a bit beyond what I want to do for now… it could be an extra project for the future
- Regardless, I need to experiment a lot
Swap weapons:
This is the main issue I am having
- So yesterday I was really happy with my CardEffect system. Well I just realized… functions can have several parameters and right now my CardEffects have 0 parameters.
- Normally this is fine because I can pass in relevant ScriptableObjects that will be changed like PlayerStats or WeaponStats
- But this time I need to swap weapons inside the WeaponShooter class, and WeaponShooter is not a ScriptableObject.