Boreal Darkness

In my quest to rewrite my game from C into C++ I've decided to take a detour and build up a new game so I don't get stuck in the C conventions that I had been following. It's difficult to port a codebase to a different language, even when the language you're moving to is supposed to be the successor. Instead of trying to build up the same system using different language constructs, I'm finding that it's easier to have a blank slate and think about the problem differently, to some extent. This helps alleviate some of the copy > paste > hack-fix technical dilemma because theoretically I could just keep all of those char arrays and not change them over to strings, or keep the mallocs for arrays of things and not use vectors. I find it easier to clear the slate and do things "right" from the start rather than man handle them into some semblance of usefulness.

Anyhow, in this effort I'm also going to be hugely slimming down the requirements of the game so I can actually finish something in a decent amount of time. The first iteration will allow you to walk around a forest and chop down trees. Your wood count will increase as you do this. That's it. Who wants to play that? Probably nobody. But it's simple for a reason: it's a highly achievable goal, and once that's done I can focus on other aspects of the gameplay. I won't even bother talking about that stuff until I accomplish this first piece of functionality or succumb to failure. If I don't succeed at a very small feature which still takes a lot of work, distracting myself with other elements of the game would be a worthless endeavor. I'm not going to worry about a user inventory when I can't even do an action that would allow me to add items to an inventory in the first place (such as chopping a tree).

Even this first goal post has some sub requirements. The trees are going to visually change as you chop, so there are some things to keep track of. The number of chops each tree has taken, the sprite sheet position, the chopping animation itself on the player sprite, the wood count... It sounds like a simple task on the surface, but there are some critical elements that need to be thought out clearly so I don't add junk onto junk when I begin adding more features. There's only so much effort that you want to put into refactoring when your code has become thousands of lines of trash.

The exciting part is the first in-game screenshot. The graphics are tiny 16x16, but I may increase that or do some kind of magnification since I realize that it is kind of tiny.

Code Stats

Language                     files          blank        comment           code
C++                              8             64              8            357
C/C++ Header                    11             53              9            199
make                             1              0              0              5
SUM:                            20            117             17            561