Project Planning
I guess what I’m doing now is basically planning for a project, i.e. making sure that everyone doesn’t mess each other codes. Of source, source control can do some measure of that, but source control haven’t been able to control areas of codes without human guidance.
Currently the game is separated to six main parts:
- Player GUI and input
- Level design
- Models and Graphics
- Game mechanisms
- Sounds
- Networks
As you can see, a huge part of the game in on the focus on the player interface, whether it looks pretty, sounds pleasant, the animations are good enough or not. The code underneath don’t matter until it clashes with the above requirements. Players come playing with some expectations of their own, so we’ll have to maintain some of that, while breaking what they expect, in a nice way.
I will repeat, The code underneath don’t matter until it clashes with the above requirements.
If your code causes the animations to go jumpy, it matters.
If your code causes the sounds to loop forever, it matters.
If your code causes the camera to look skewed, it matters.
If your code causes the player to get confused, it matters.
Otherwise, it’s okay, even if your code is skewed. Problem is, once it’s skewed, you’ll pretty much break player experience when you try to add things.
One thing I learnt from experience was not to create tightly coupled systems. That resulted in a nightmare. The code was easy to maintain, but horrible to expand. Luckily for the dev team, I use Boo, so the code can easily be rewritten again to redesign the whole thing.
Main redesigns include
- Separating the player, weapon, and bullet mechanisms and interface so it is readily interchangeable.
- Merging the animations, motions and check on the ground code so motions are centralized.
- Separating camera views and introducing a main handler so the camera view can be customized.
- Merging enemy stats and player stats into one usable script since the player can also be the enemy and vice-versa.
- Moved the damage mechanisms to the weapon that does the damage for consistency, since it’s the weapon that does the damage, not the victim.
- Used Lerp extrapolation for all position changes, except when rigidbody are included so everything is smooth.