Nine Day Game, Day 4 - Lint Remover
After 3 days of solid development time, Day 4 called for a bit of clean up in the 3D engine code. It was work that needed to be done, but unfortunately not the kind of material that makes for a good blog post. The goals for the day were more nebulous, and performance a bit harder to measure.
- Rewrite the way the engine generates maps to improve performance
- Refactor the lighting code to make it easier to add random lights in the dungeon
- Fix the camera motion so it tracks the player better
- Change calls that pass and store 3 separate float values to use our Vector3f object
- Clean up redundant #includes
- Comment, comment, comment
- Break out engine and input-specific code from the main() method to their own objects
- Clean up any other code that would be worthy of submission to The Daily WTF
- Develop an inventory management system
- Finish off the 2D menu system in the ASCII environment
Ryan pushed ahead and finished off his menu system in the 2D environment, and was able to tie that in with the inventory management system. He even made a video:
The refactoring of the 3D code, however, is much less glamourous. I was able to meet a few of the objectives, like the lighting refactoring and fixing the camera code. I quite like the way the new lighting system lights up the environment around the player, and reminds me a lot of the way fog of war works in real time strategy games like Starcraft.
I think that if I had laid out a bullet point list like the one above, I may have made better progress by moving from one point to the other, without needing to think about what to work on next. I'll try this with tomorrow's development.
There's still a lot of code to clean up, but we're out of time. I'll have to settle for continuous refactoring as we push ahead with new features over the next 5 days.