Now that I've had time to review the source code I can reflect on some lessons learned throughout Episode 1. This will undoubtedly result in more streamlined code for projects ahead as well as a more fluid development cycle.
So, here's a breakdown of those lessons in no particular order:
- If it's 2:00 am there's no reason to be coding. At some point it becomes counterproductive.
- There's no benefit to using a singleton pattern if static classes accomplish the same thing. There's no sense in
bloating code for no good reason.
- Very few people like to "pixel hunt" during an adventure game; stay generous in the size of mouse-over regions.
- Always code for the possibility of objects being null, especially event subscriptions. Even if you
swear something should never be null, be prepared for unexpected situations which challenge that assertion.
- Don't key off an item's "inventory" flag when determining the state of a scene. That item may disappear
from the player's inventory, wreaking havoc on your state logic. Using a "locked" flag may be a better choice.
- It's nearly impossible to achieve a seamless loop while playing a background song/sound using MediaElement.
- The toughest part is gauging whether the game is too simple or complex. Players will inevitably have varying opinions
of the difficulty level, so provide a mixture of simple and challenging puzzles. Flow is what's important here; when a player
solves a challenging puzzle let them bask in their progress for a bit. Don't slam them right away with yet another
cryptic riddle.