May 26, 2014

Progress Update May 2014

The Entity/Component/System refactoring is officially over, and the new codebase is much better than the old one. I won't elaborate on the advantages here as I've already talked about that in previous posts.

The one remaining task I have on the ECS front is to overhaul the rendering system to make use of the new components. Currently the renderer is using a hybrid of the old and new and is pretty messy. I've had a task on my todo list to redesign part of the renderer to allow better control of the shaders, (which I'll need for graphical enhancements I have planned for the future), so it seemed easier to roll the two tasks into one.

The immediate future will feature more testing, and then preparation for Snapshot 10, which is due to kick off on June 1st. Snapshot 10's major new features will be allowing the player to rest/sleep, introduction of some proper crafting, and a bunch of content additions to round out the items a bit. It's exciting because it will finally be some forward progress again after almost a year of stagnation.

As part of my renewed commitment to the project, I'm going to try (once again) to be more forthcoming with updates, and try to coincide them with each snapshot I build. So, I'll be aiming for a once a month posting schedule, and try to include some screenshots of what's going on. We'll see I guess. :)

Apr 28, 2014

Recent developments.

There hasn't really been much to report in the time since my last blog post. I've been doing a long overdue major refactoring of the entire architecture of the game.

I'd originally developed Bulldog from an Object-Oriented approach, but ended up running into the Diamond Problem, where different classes needed common functionality but didn't have a common base type. I worked around the issue for many months and then stumbled onto the solution; the Entity/Component/System (ECS) pattern. I did alot of reading into how it works and realised that it was the perfect solution for all my issues.

I started converting the codebase to make use of ECS around a year ago, but only a short way into the work I had to put Bulldog on hold due to a reshuffling of my business interests (as mentioned in my previous post). At my new role I was put onto a fairly large project with a tight deadline, so finding spare time for Bulldog was difficult. Now that the project has matured, I'm finding I have more free time again, so in the last couple of months I've resumed the ECS conversion in earnest.

By my reckoning I'm about 75% of the way through the conversion, so there's a few weeks to go. The most frustrating thing about this type of work is that the end result is all under the hood, and not visible to anyone. If you were to compare the latest build to the build I did 12 months ago you'd be hard pressed to tell them apart. Such is the nature of architectural changes.

That said, I have some big things planned for the development of Bulldog in the second half of this year. None of which would have been possible without this architectural groundwork being re-established now. So yeah, stick with me on this... :)

Oct 8, 2013

The continuation of the project? Aka: Why so quiet?

It's been quite a few months since my last post. The last 7 months have been pretty busy times from a personal and business perspective. Though I haven't spoken much about my day job in my posts before, I feel it deserves a mention now.

For over three years myself and two other guys ran a software development business specialising in database-driven desktop applications. Running my own business allowed me to take half or whole days off each week to dedicate some quality time to Bulldog.  My take home pay suffered a little as a result, but the bills were getting paid, so it wasn't all that bad.

Not long after my last post in March, through a complicated series of circumstances, our biggest customer suggested we shut down the business and become permanent employees for them. After considering the situation we agreed and set about shutting down the business.

Let me tell you, it's pretty stressful and takes a lot longer than you'd think, especially since we still had to meet our previously agreed development deadlines. We started with them officially on the first of July, and have been pretty busy in our new roles ever since.

A welcome side-effect of the change is a much higher salary and not having to worry about all the busywork you have to do as a small business owner. An unwelcome side-effect of the change is that my work is very full on now and there's no room for work on Bulldog during work hours. Additionally, the work is more draining mentally than before and so when I get home the last thing I feel like doing is firing up Visual Studio again and coding for a few hours.

Despite these setbacks I don't regret my decision at all. My wife and I have another child on the way, so a higher paying job couldn't come at a better time.

So what's happening with Bulldog? Well, the good news is that I've managed some sporadic bursts of coding in the last few months, so the project is not dead. I'm determined to make something of this, so I'm going to continue chipping away where I can.

I've started to write another post which I'll clean up and submit sometime soon hopefully. It details some of the coding I've been doing recently which should take care of one of the most important aspects of the game, terrain generation.

Mar 9, 2013

Development milestone - 2 year mark

Byte Wrangler and the Bulldog project itself are now over 2 years old, hurrah!

So, where is the project? Is it playable yet? No. Why not? Because these things take time. No, that's not a good enough answer. Because I haven't prioritised the right development, and my original estimates for how long it would take were woefully naive. That said, looking back at the codebase from a year ago, the project has advanced a lot further than it seemed a few weeks ago. When you spend so much time so close to the code, you lose sight of all the changes that have built up in the system over the year. And over the last year, a lot of the changes have had a visual impact.

Compare the two screenshots below:

Bulldog Build 1863 - 37,557 lines of code (Jan 2012)

Bulldog Build 11020 - 62,894 lines of code (Feb 2013)

(Note: I added automated build number incrementing in late 2011, so the build number isn't a good indicator of the relative changes in the early days.)

For the statistically minded, the codebase is now 62,894 lines of code, compared to 37,557 a year ago. During the past year, I've done a great deal of refactoring, so large chunks of code have been removed, so the amount of code written is easily more.

A year ago there were no 3d models in the game, aside from the "monolith", which for a long time was the player character's temporary avatar. Now we have a more human shaped temporary avatar, and around 5 in-game 3d models. "Graphics month" failed to live up to its name, and really only introduced a few new graphics, but I did gain a working knowledge of Blender and UV unwrapping, so future modelling will now take much less time.

A year ago there were 13 different items in the game, none of which were usable. The player could walk around, but not interact with anything in the flat, featureless, sandbox world.

Now there are 43 different items in the world, 90% of which fully interact how you'd expect. i.e. you can pick up an empty water bottle and click on a pool of water to fill the bottle. Then you can click the filled bottle on yourself to take a drink.

The most visible graphical change (to me at least), is that I finally managed to get object silhouettes working. This is a feature I've had planned from the very beginning, and is important to the graphical look I want to achieve. I've struggled on and off to make this work, but I eventually had a breakthrough, and while not yet perfect, I'm very happy with the results. I may elaborate more on the specifics in a separate blog post.

Future Development

So, onwards to the future... I've found that it's easier to stay focussed on the tasks for a development snapshot if I give the snapshot a theme. The current snapshot's theme is food & crafting. I've already added 8 new food items to the game and implemented a food spoiling and food poisoning system. The crafting system is in place but needs to be properly tested and the crafting screen needs to be built, as well as adding crafting recipes.

The following build's theme is going to be sounds, shelter and improved terrain generation. Currently there is only one sound in the game, so the sound effects side of things needs a lot of love. I've also been experimenting with some new terrain generation techniques as a proof of concept, and initial work seems really good.

Closing Thoughts

It's easy to become disheartened about progress when your expectations are high and the project is large. I've come to realise that at the outset, my impression of how long it should take was quite naive, mostly due to inexperience. My current estimates suggest it'll be another 2-3 years before its ready for release, which sounds like a long time, but looking at the progress in the last year, I'm optimistic about how good it will look.