Feb 22, 2016

Progress Update February 2016

As is rapidly becoming the norm, I've scope-creeped the hell out of this latest snapshot. I'd intended to wrap it up just before Christmas, but here it is, 2 months later and I've still got over a month of dev to go. I made the mistake of starting work on a feature I didn't have a really solid design for. I thought I could "wing it" and the gaps would naturally fill themselves in, but I hit a few issues that basically blew that out of the water. I've sorted out the design now, but there's more work to be done before I can tick crafting off my todo list.

I changed my mind re: the UI redesign I mentioned in my last post. It is going to be much harder to change in the future, so now is the best time. It ended up taking about 3 weeks, but I've replaced my old, half-assed layout system with a newer, more flexible one that's now using its whole ass. As a bonus I fixed a few lingering layout bugs that have been annoying me, so yay!

I've got a fairly good design & plan for the next month of development. Barring any unexpected hiccoughs, I hope to put crafting to bed and move on to some of the exciting new things I've been dreaming up over the past year.

Jan 13, 2016

Progress Update January 2016

Happy new year everyone!

What have I been up to since October? Less than I would have liked. However, I've made some excellent progress on the crafting system again, taking some influence from games I've been playing recently. Unfortunately I find it way too easy to make my game systems crazy complicated.

One of the risks of being a one man dev operation is you have to be your own bullshit filter. I often get so enamoured with an idea I'm working on I don't realise it will be terribly complicated for the player until I'm a decent way in. Eventually (once the shine wears off) the sanity police rock up and I drastically cut functionality and make it sane. I just wish it'd happen sooner, so I don't waste development effort. :)

On a related note, recently I've discovered some annoying issues in my codebase that are not going to be quick fixes and are preventing me from building certain pieces of functionality. They are relatively minor presentation things, so it isn't a big deal at this stage, but at some point I'm going to have to redesign my UI system to be more flexible. Not looking forward to that at all.

On a non coding front, I recently made some major breakthroughs on the backstory front. I've broadly defined the story elements that will occur leading up to the player taking control and even had some ideas for a short intro sequence to relate this to the player. Previously I had a general idea for what I wanted but there was no clear path from normal world to the game world, narratively speaking.

In the development pipeline for the future I have: Finishing off the crafting system, as well as some technical architecture things such as a procedural content system I've been itching to get going on, as well as rendering improvements such as LOD for my terrain meshes.

Until next time!

Oct 22, 2015

Progress Update October 2015

A while back I finished Snapshot 12. It turned out to be one of the longest snapshots I've worked on, coming out at about 8 months. Most of the changes were behind the scenes stuff, so to most users nothing has changed since the beginning of the year.

Under the hood, I've made quite a lot of changes. The biggest of which is splitting the codebase into a client and a server thread. Currently the server thread takes care of creating the initial terrain, and nothing more.  However, over the next few snapshots I'll gradually move more of the client's processing into the server, with the eventually goal of supporting multiplayer.

One of the biggest issues I encountered during that time was serialisation of gamestate. Somewhere around 2 years ago I made an error in judgement which made serialisation impossible without an extensive rewrite. I didn't notice at the time because I hadn't written any of the serialisation code yet.

In retrospect I should have implemented the save and load functions early on. This would have forced me to consider game state serialisation immediately.

So, lessons to be learned here:

1) As soon as you start creating game objects, write the code that serialises and deserialises them.
2) Maintain your serialising code. If you modify the game objects, modify the serialisers. Don't rely on coming back to it at a later date. You will forget.
3) Write unit tests to verify your serialisation/deserialisation process works correctly and then maintain them.

Jul 5, 2015

Progress Update July 2015

In the last couple of months I've continued integrating the fruits of my new terrain generator side-project into the main project. Progress has been good, and I should be up and running with the new terrain any day now.

I took a brief detour to explore network connectivity as I've always imagined that Bulldog would eventually support multiplayer functionality. Since I started the project with singleplayer in mind, there's a great deal of work to do to make the game client/server capable. I decided to kick things off by getting the new terrain generator to run on the server thread, and have the client request it via a network call, as it will eventually function that way for multiplayer.

Before I could get going on that I needed to decide on a network stack. I started rolling my own and got a little ways into it with a brief proof of concept that achieved listening and connecting before I decided to look around for pre-built network solutions for .net.  The first one I came across was RakNet, it's been around for quite some time, is used by a lot of people and supports C#.

I grabbed the source and I've spent 4 hours trying to get the examples compiling. I followed the c# tutorial and ran into issues, such as the build failing due to missing folders. So I fixed that by creating the folders. Then there were files missing from the project. I found them and added them to the project. None of the generated files have any standard "using" clauses, so I add the required "using" clauses to the generated code. Now I'm stuck with build errors such as "Cannot implicitly convert type 'RakNet.Row' to 'RakNet.TableRow'" or "Cannot apply indexing with [] to an expression of type 'RakNet.SWIGTYPE_p_DataStructures__ListT_DataStructures__Table__Cell_p_t'"... the list goes on...

The above paragraph is actually from a gamedev.net post I wrote in desperation after having no success with RakNet. Luckily, my friend, axefrog, saw my post and put me onto lidgren, which I'd also seen during my searches before I settled on RakNet.

I took his advice and checked it out and the difference was like night and day. It required one tiny tweak to get it working (Bulldog is built on .net 4 and the latest lidgren assumes .net 4.5 or higher). I hit the internet for tutorials to write some test code. Unfortunately most lidgren tutorials are slightly out of date, leading to a weird corruption issue with status messages, but I sorted that out quickly. In an hour or so I was up and running with a decent message-based network system.

This represents a big change. It's very unlike me to rely on 3rd party components. I much prefer to write everything myself as I can fix bugs in my own code or add functionality I need. I felt vindicated by the difficulties I experienced with RakNet and was itching to go back to the roll your own method. The subtext of my gamedev.net post was that if I didn't get some decent suggestions I was going back to my own implementation.

In the end I'm glad I didn't, and I'm indebted to axefrog for putting me on the right path.  Cheers, mate!