Categories
Game Development Personal Development

Thousander Club Update: August 10th

For this week’s Thousander Club update:

Game Hours: 576 (previous three years) + 155.75 (current year) = 731.75 / 1000
Game Ideas: 775 (previous three years) + 10 (current year) = 785 / 1000

Sometimes, Test-Driven Development makes the simple stuff hard, but once it is done, it’s so beneficial. Case in point: the main menu. I’ve been working on the main menu for my Vampire game, and in the past, I would have probably got it knocked out quite easily. TDD forces a good design to appear, but in exchange I have to spend a little more time on it than I expected. The nice thing is that it won’t be as hard-coded and game-specific as my normal implementations would.

And a side benefit of using TDD so far? My build times are obscenely fast. It takes just over 20 seconds to build my entire game from scratch, and I suspect a good chunk of that time to be the extracting and building of my unit test framework. Granted, my game doesn’t do much right now, but it is very satisfying to know that it takes almost no time at all to go from a fresh project pulldown to a finished and tested build. I credit TDD with forcing me to use interfaces, short functions, and fewer dependencies.

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Game Design Game Development Games Geek / Technical Personal Development

Ludum Dare #15 is Coming!

It’s August, which is one of the months of the year, and that means that Ludum Dare, the the tri-annual 48-hour game development contest, is back!

Suggest your theme, and in the coming weeks the theme vote will commence. Will Exploding Bananas win? Circuits? Glow in the dark? Cooking? We’ll find when the contest officially starts on August 28th!

Here are the results of LD#14 from this past April. I ran away with the gold…in the Food sub-competition. My journaling abilities also commanded a respectable 5th place. The theme then was Impending Wall of Doom, and there were a lot of creative ideas that people implemented.

Ludum Dare is always a fun time, and the last one broke records for number of participants. Will a new record be set at LD#15?

Categories
Game Development Personal Development

Thousander Club Update: August 3rd

For this week’s Thousander Club update:

Game Hours: 576 (previous three years) + 151.25 (current year) = 727.25 / 1000
Game Ideas: 775 (previous three years) + 10 (current year) = 785 / 1000

Woo hoo! I broke 150 hours so far for the year! Last year around this time, I wasn’t even at 90 hours. With a new Ludum Dare competition coming at the end of the month, it looks like I’ll be doing a lot of game development in 2009. Relatively. It’s still far less than ideal, of course.

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Game Development Personal Development

Thousander Club Update: July 20th

For this week’s Thousander Club update:

Game Hours: 576 (previous three years) + 148 (current year) = 724 / 1000
Game Ideas: 775 (previous three years) + 10 (current year) = 785 / 1000

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Game Development Personal Development

Thousander Club Update: July 13th

For this week’s Thousander Club update:

Game Hours: 576 (previous three years) + 147 (current year) = 723 / 1000
Game Ideas: 775 (previous three years) + 10 (current year) = 785 / 1000

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Game Development Geek / Technical Personal Development

Learning How to Unit Test

I first wrote about Agile development as a lone indie years ago. I got some good comments, but it still felt like I lacked any real insight into how to be a better developer on my own. A couple of years later, after seeing someone use unit tests first-hand, I wrote about Test-Driven Game Development.

So I immediately tried to use unit tests for my next project, which was my Ludum Dare #12 entry. I stopped after encountering difficulty. I didn’t know what I was doing, and I needed to make progress. I had a deadline.

Recently, I decided to start using TDD to create a simple game. And I wanted to use it for the entire project, not just the easy parts. I created a simple design for a game involving vampires, and set to work.

And immediately I hit a problem. In order to get anything useful on the screen, I needed to use libSDL. How do you go about writing unit tests that make use of a library? I don’t want my test binary to open and close windows, manipulating hardware, and otherwise resulting in weird side effects. Ok, no problem. I’ll just create an abstraction layer between the game and libSDL. I called it HardwareLayer, but then ran into another problem. The HardwareLayer would need to use libSDL directly, so all I’ve done is put the hard-to-test code in a new class. Well, maybe I can make an interface, but how does one test-drive his way to an interface? I didn’t make anything easier for me at all. Unfortunately, my lack of experience was going to bring this TDD experiment to a standstill.

But I pushed. I checked the book Test Driven Development: By Example but couldn’t find any information specific to what I was trying to do. I tried to find a TDD-centric IRC channel, but none existed that I could find. So finally, I threw out my question on Twitter, and within moments, I had a response from an expert.

Brett Schuchert of Object Mentor took the time to write up a blog post on TDDing an Interface. While his example was in Java, it was eye-opening to see how TDD gets done in a somewhat real-world example. I was able to make some progress, but still had the problem of using libSDL at some point. My inexperience questioned whether I would be using unit tests on the code that simply delegates to libSDL calls.

And Schuchert once again spent an evening writing up another blog post about hiding global methods, and this time he even used C++ and created a working project! He claims that the effort to get everything under test was simple to do since most of the issues I was having are idiomatic and therefore pretty easy to solve.

In our discussions in email, Twitter, and the blog, I had the insight I needed. I’ve since purchased Working Effectively with Legacy Code since a number of the issues I had involved dealing with untested/untestable libraries. If it is so idiomatic, I should know it, too. The book would have been very helpful with issues I’ve tried to deal with in the past, so I look forward to applying my new knowledge going forward.

Since those posts, in the time I’ve been able to dedicate to game development, my test binary doesn’t make calls to SDL directly, and my actual game does. I might still do bizarre things when it comes to TDD and unit testing, but I’m making progress that I’m reasonably confident is correct and working at all times. It helps that I recently participated in a three day TDD workshop that the Day Job sent me to, but I found that the most beneficial part was doing exercises with someone available to say whether or not I was going about it correctly enough. In fact, even the Bowling Game Kata makes a lot more sense to me as an exercise. That is, I get it now.

Categories
Game Development Personal Development

Thousander Club Update: July 6th

For this week’s Thousander Club update:

Game Hours: 576 (previous three years) + 144.25 (current year) = 720.25 / 1000
Game Ideas: 775 (previous three years) + 10 (current year) = 785 / 1000

I did minimal work on the vampire game, but it was on purpose. I had a mini-vacation to celebrate Independence Day out of town. Now that I’ve returned, I am getting back on track, although this month is filled with vacation time so I don’t expect too much game development productivity.

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Game Development Personal Development

Thousander Club Update: June 22nd

For this week’s Thousander Club update:

Game Hours: 576 (previous three years) + 142.25 (current year) = 718.25 / 1000
Game Ideas: 775 (previous three years) + 10 (current year) = 785 / 1000

I’ve been putting in some good work on my vampire game, making significant progress and writing unit tests along the way. I hope to have some screenshots in the coming weeks.

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Game Development Personal Development

Thousander Club Update: June 15th

For this week’s Thousander Club update:

Game Hours: 576 (previous three years) + 137.5 (current year) = 713.5 / 1000
Game Ideas: 775 (previous three years) + 10 (current year) = 785 / 1000

I spent more time working on the vampire game, specifically driving the development with unit tests and learning how to do so along the way. I’ll have more to say about that topic later this week.

[tags]game, game design, productivity, personal development, video game development, indie[/tags]

Categories
Game Development Personal Development

Thousander Club: June 8th

For this week’s Thousander Club update:

Game Hours: 576 (previous three years) + 133 (current year) = 709 / 1000
Game Ideas: 775 (previous three years) + 10 (current year) = 785 / 1000

I worked a bit more on my small vampire game, although I was running into trouble with unit testing. There were a couple of development sessions in which there was either no tangible result produced or it was thrown away. I initially felt as if those sessions were a waste of time, but they did provide insight into what I was trying to accomplish.

[tags]game, game design, productivity, personal development, video game development, indie[/tags]