Progress on...
- Databses / Stats / GoogleFu
- Templates
- Leveling up, XP, etc..
Databases and StatsProblems and challenges:
If players and enemies do not have any Stats (ie STR, AGI, DEX, END) then damage is a flat number per projectile and very simple to integrate. Projectile hits enemy, Health is subtracted... However when you want Stats then you have to build a
Damage Calculator to compute the incoming stats and damage against the host entity's stats, then figure any specifial modifiers or debufs, then subtract the health. This is, needless to say, more complex.
Now when you think about scaling on this more complex system you start to see a LOT of variables on a LOT of different objects and it is NOT friendly to maintain... Enter databases! Currently I'm using GoogleFu which allows me to 1) maintain a spreadsheet on Google Drive, 2) pull from it
all of the stats for every enemy, player, item, pickup, weapon and perk into the game in a very tidy fashion, 3) then at runtime attach those values to each 'thing' so everything basically has at a bare minimum a single call to the database to retrieve its personal information. This is condensed to one single playmaker action for each thing's stats. Maybe in the future I can do this in the editor and alleviate the runtime overhead for it.
I'll attach some screenshots of how this works later tonight.
TemplatesThe fun thing about templates is that they do the same thing for every object that they are on so when you think about some almighty generic Health template you have to plan that
whatever happens it can handle it equally well for enemies, players and inanimate objects. This has actually led to be building some really cool generic processors that handle incoming information and work in almost any scenario you throw at them. When its finished it will include all of the damage, modifier and debuf handler states and work on any object with Health.
The other thing is that everything has to be cohesive to work with it, generalization and templating has a high demand for rules sometimes. For instance currently I have it so that I process the stats for the Player and his projectile into a total damage, pass that into the projectile, then when it hits something it passes that to the Health system of what it hit, where then the Defense stats are computed against the incoming damage and other modifiers.
And you thought this would be easy! ; )
Leveling up and ScalingThis is a huge topic. The ratio at which stats and general values grow as the game progresses is critical to the fun/difficulty/addictiveness of the game. For instance if you scale the character with the enemies at the same rate, but then later increase the spawn counts and introduce special modifier items to alter stats, are they offsetting enough to maintain sufficient difficulty?
There are piles of articles talking about it, and since I'm just getting started on it I'll leave the topic at that for now, but it's going to really expand soon once I learn and test this more.