Jun 11, 2018

Husky Dev Blog 1

So, after a period of research, story writing and tech prototyping, I am pleased to announce that proper development on "Husky" will begin today. I still have a few ideas to polish from a story standpoint, but the basic structure of Act 1 is locked in, which means I have enough to get started.

"Husky" started as a game idea I had back in 2011, where the player experiences a certain game-changing epiphany during gameplay. In my mind I envisioned that an entire game could be built around hiding this until the point where I wanted the "wow!" moment occur. I had no idea how it would start, or where it would go after the epiphany (it was set to occur around the middle of the game). I was already working on something else at the time, so I wrote down the idea with the notion of revisiting it and fleshing it out sometime in the future.

The other game project I was working on eventually petered out and after a period of self-reflection I decided I needed to work on something simpler in scope. In January I brought up my list of ideas and decided to flesh out the "epiphany game". Over the past 6 months I’ve evolved the game world and story and didn't even notice when the "epiphany" concept was slowly slipping out of my overall vision for the game. I kind of knew it needed to be in there somewhere, not sure exactly where, but I was determined to shoehorn it in… because… reasons!

After reviewing my notes this week I had an epiphany of my own. The epiphany moment didn’t fit at all, and furthermore, it was actually pretty lame compared to the rest of the amazing story I’d crafted and honed over the last few months. The fleshed out story has many more interesting (and natural) “wow!” moments than the original concept, which was a silly gameplay gimmick at best.

Even a few weeks ago, if someone had suggested ditching the epiphany moment I would have strongly defended it as absolutely essential to the game. As of today I have officially killed it off and it feels weird. I probably wouldn’t have come up with what I have now if it wasn’t for that original idea, but it has no place in the final design. It was like scaffolding on which I could construct something more interesting, but the key is that scaffolding is ultimately dismantled.

During its development I’ll be attempting 2 week sprints in my free time. Progress will be slow as I still have a full time job. My plan is to show off *something* at the end of every sprint. Here we go...

Feb 1, 2018

Introducing "Husky"

So, work on "Bulldog" has stalled again. It's been many months since my last blog post. A lot of (non-games dev) stuff has happened to me during that time, such as changing jobs. I also feel that my friend, Skugga, is partly to blame for my lack of free time when he introduced me to Player Unknown Battlegrounds :D. I've been playing it an unhealthy amount, and its rocketed up to my most played game on Steam.

So, after having done no games dev for months, myself and a few mates at my new work participated in the 2018 Global Game Jam recently and it was awesome fun! It's inspired me to pick it up again. I've decided I need a smaller project that will help me get up to speed with Unity, and so I'm pleased to announce I'm kicking off a new game project.

In keeping with my dog-based theme for naming, until I have a proper name, I shall refer to this project as... (rolls dice)... "Husky".

Husky is based on an idea I've had kicking around for quite a while now. There's a lot of concepts that need to be nailed down before I can go into more detail, but broadly speaking, it is a story driven game in a world of geometric shapes about a village of circles and their bitter rivals, the squares.

More to come...

Apr 4, 2017

Progress Update April 2017

Big announcement time! I'm abandoning my self-made game engine and starting again in Unity3D. BAM!

It was a very tough decision to make. I've grown quite attached to my codebase in 7 years of tinkering in my spare time. As a learning journey, it is how I learnt C# and simultaneously contains the best and the worst C# code I've ever written. As an idea, abandoning that is bittersweet to say the least.

I actually explored the idea of switching to Unity quite a few years ago, but I found the learning curve to be too much and went running back to my comfort zone with my tail between my legs within a month. In hindsight I probably should have perservered with it, but at the time I was evaluating alternative approaches, so switching back was an acceptable outcome. Unity evaluated? Unsuitable? Great, back to work.

This time around, I don't have that luxury. I've painted myself into a corner and I can't see any other way out. I fear that unless I switch to Unity, I will end up abandoning this project due to lack of motivation. The catalyst for this terribly pessimistic thinking is my experiences trying to implement skinned animation in my game engine. I've followed many tutorials, rewritten the skinning a few times, and I actually got as far as having the skinned model rendering correctly... until I tried to animate it and then it all fell apart. *cue sad music*

Basically there's too many quirks in my setup that means no tutorials are directly transferable to my situation. eg: Different matrix representations of DirectX vs OpenGL. Different coordinate axes for animations vs meshes. YUp vs ZUp representations. Each of these would be easy enough to trial and error my way through, but combined, they have been kicking my butt for a couple of months.

Another factor is SlimDX. Back when I started this project, SlimDX was already starting to wane in popularity.  Then there's the fact I'm developing against DirectX 9. Back in 2010, that was a bit silly, since it was already 6 years old, but now in 2017, that just seems ludicrous! I'd already resigned myself to the fact that I'd eventually have to add DirectX 11 support, but realistically, when was I going to find time to do that?

So I've decided that I should cut my losses and embrace Unity.

The Good

So what am I gaining? A fully featured, mature game engine that is graphically superior to anything I could create. Access to a huge number of useful assets on the Unity asset store. Many useful tutorials on a variety of game development topics that are relevant to my exact situation, and don't require messy transpositions. I'm using Unity, they are using Unity. Profit!

The Bad

What am I losing? Pretty much all of the 90,000 or so lines of C# code I've written over the last 7 years. Actually, that's not entirely true, as Unity scripting can be done in C#, so a proportion of the back end code might be able to be re-used.

The Ugly

Ok, so what am I keeping? All the concepts, all the ideas, all the game mechanics and systems that I tested and tweaked should be able to brought across. Everything that makes it a game, rather than a game-engine.  There's much, much, more of this that's still in my game design workbooks than in code, so that's an advantage I suppose. If I waited another year before switching I'd be losing more work down the line.


I think I've made peace with the fact that I have to let the codebase go, and starting from scratch is actually not such a bad idea. Over the last few years I've slowly been refactoring my game engine to be more Unity-like in its approach anyway, eg: Using components and a similar User Input system.

One way of looking at it is that what I've created thus far was a prototype. A fairly elaborate prototype that I spent way too much time polishing, but a prototype nonetheless. Now that I have access to better tools I can hopefully make this crazy idea a reality. :|

Feb 4, 2017

Development Snapshot 17

Once again, most of the work was graphics related. It's refreshing to be making forward progress on tangible things, rather than back-end stuff nobody sees but me.

The animation system was the first thing I tackled. I was looking forward to making great strides on this item. It took more time than I expected so I had to put off the final parts (eg: BVH importer) until the next snapshot. In theory, the player character is animating properly, I just don't have any way of loading animation files yet.

Debugging Frame Timings

After that I spent a bit of time upgrading some of the debugging information the game spits out about frame timings etc. I was expecting to make a few small changes and call it day, but I went a bit crazy and replaced my old profiler with a much more flexible system that does most of the setup automatically. I celebrated this success by upgrading the frame time visualisation to add some colours to represent different parts of the frame. This should aid in optimisation down the track.

Top secret performance benchmark

The first thing I noticed with the improved frame timing information was that my text renderer is slow, taking up almost 30% of the entire General render pass when there is very little text on the screen. Fortunately, the text renderer is due for an overhaul a few snapshots from now to add support for scrollable content windows. The side effect should be improved performance, which is great.

Waypoint Tweaks

I also improved on the look of the waypoint path from last snapshot, adding a dark border. This doesn't sound like a big deal, but the way I originally wrote the waypoint path creation, this was pretty tricky.

Not too bad. But we can do better...

The border helps the waypoint stand out a bit better from the terrain, and tidies it up a bit in my opinion. I also did away with the triangular shaped notch at the start of each run, and I've had a few ideas for improving it further, but they will have to wait until next snapshot.

The most fun part was writing some geometry code to ensure the width of the border is constant even when approaching the sharp point of the arrow tip. The problem looked like it didn't have an easy solution until I hit upon the idea of using similar triangles, and had great fun optimising the equation until I ended up with something downright elegant (in my opinion):

v = normal1 + normal2
l = (2 * distance) / v.LengthSquared()
result = v * l

There wasn't much on the survival side this time around, but I did alter the poisoning debuff to lower maximum health instead of just eating away at your current health for a period of time.

I also fixed a handful of miscellaneous bugs, most of which have crept in during the last few months.

Next Snapshot

For the next snapshot I have a few fun things planned. First of all, the BVH importer, which should allow me to finally put the animation to bed. Also on the agenda is starting to work on the first biome that the game will support.

My original plan for the start of the game involved the player washing up on a beach after the cruise ship they were on was destroyed. With this in mind I created assets such as Palm Trees, Wooden Barrels, Life preservers etc and set up my test level as a literal sand box.

Now that I've developed the story more, the initial setup has changed drastically.  At the start of the game the player will  be dropped in a Temperate Forest, which couldn't be more different than the acres of sand and a few scattered palm trees I have now. So, in snapshot 18 I'm going to start the ball rolling on the biome generator. It will be somewhat of an experimental feature, but hopefully there will be something interesting to show.

I've also decided on the visual style of the game, which is quite exciting. I'll pretty much have to throw away most of my game assets and start again, but I have so few I'm not that worried.