- Are you using Unity?
- How much code sharing between mobile characeters (esp the bipedal) and the player do you get away with?
Quite a bit. I have a Character class that handles movement, gravity, health, damage, ect... Then there's a player class that inherits from the character class to add/override things specifically for the player (for exmaple, in the Character class, there's a function for when the character dies that involves, for instance, spawning an explosion effect. In the player's case, it's overridden to reset to checkpoint). The main difference beyond that is that the player is controlled by a set of player-controlled input-handler behaviors, while the enemies are controlled by an AI behavior.
- What pattern are you using to keep all the data and timings for different attacks / character motion modes? That is, what does the control structure look like going from walking to jumping to attacking with animation and back to idle?
There's two parts to this. There's the Enemy AI and an Attack Pattern class, both of which are Behaviors that are attached to the enemies. The Enemy AIs are hierarchical state machines. Most enemies have their own AI class (inheriting from a base AIController class) which create their behavior tree. In addition to controlling things like movement, they can also trigger the attack pattern.
The Attack Pattern class is attached to the enemy and lets me create their attack patterns in the Unity editor. The Attack Pattern contains a list of Attacks, which in turn each contain a list of Projectile patterns, as well as stuff like telegraph animations, damage hitboxes (for melee attacks), sound effects, ect...
The Projectile Patterns themselves contain values like projectile type, damage, direction(s), volley amount and rate, source(s), speed, inaccuracy and so on. (in the previous version of my base code which I used for Cold Vengeance, the Projectile Pattern variables were held directly in the attacks themselves, so I could only have one projectile type per attack)
So for animations, they're generally controlled by the Unity animation system, based on parameters received from the Character Class, but sometimes the Attack Pattern class will cause it to play a specific animation before returning to it's Idle state.
- What kind of camera style do you want when the player isn't locked on? Do you have a strategy to deal with terrain geometry line-of-sight kind of issues?
It's a standard action-adventure style follow-camera. The camera doesn't follow player movement 1:1 but instead tries to limit its movement to the degree it can (And the player moves relative to the camera. So, for example, if you hold left on the controller, you'll move in a circle around the camera). The player can rotate the camera, and the camera snaps in front of objects that block it.
Anyway, hope that answered your questions. Let me know if you have any more!