Michael Pidde

Axes and Sounds

The newest work on Boreal Darkness as of this evening consists of sort of grungy axe chop animations and an associated ugly thump sound effect that sounds more like getting hit with a wood bat than chopping into wood with an axe. I'll have to go back and make a better axe sound, but for now it's a good enough placeholder.

I've also fixed a few issues that had been plaguing me, some of which surrounded object retention in memory. I don't fancy myself a C++ programmer in the least, so this project has been a massive learning experience for me. I've figured out that a good number of objects hanging out in my game need to be set up as shared pointers, such as:

shared_ptr tree = make_shared(pf, health);

These then get emplaced into an unordered_map of WorldObjects inside of my Map object, carrying over after the scope of the function that they're created in ends.

Here's a gif of the current functionality, and a video of essentially the same with the sound effects.

Code Stats

-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C++                             17            242             53           1269
C/C++ Header                    23            109             13            784
PHP                              1              2              1            107
Lua                              1              0              0             42
DOS Batch                        3              9              0             36
make                             1              0              0              5
-------------------------------------------------------------------------------
SUM:                            46            362             67           2243
-------------------------------------------------------------------------------