views:

162

answers:

6

Hi,

Lately I've been a lot into agile methodologies. Some papers I've read at Martin Fowler's website looked thoroughly unflawed to me to say the least, and I was wondering what agile practices are most suited to game development, particularly for small-budget, small-sized and inexperienced team projects (bold because it's really important).

Concepts such as refactoring look like they could absolutely combine with a small and inexperienced team. The idea of "embracing the change" also combines with inexperienced teams whose ideas twist and turn all the time. But things like TDD are rather problematic.

It's hard and suboptimal to test a class that interacts with Direct3D, for example. It doesn't make much sense.

I'd be most deeply grateful if you could list a bunch of practices that made sense for game development. Ones that aid in the organization of artistic production are a plus. Citations of real-world cases are another plus.

Thanks in advance.

edit --

Plus, my team is composed of 3 people: one programmer, one graphics designer and one programmer/graphics designer combomix. We do not have a client, so we must make all decisions alone.

I've read in an article by Fowler that agile sort of depends on developer-client interaction, but he also mentioned that clients unwillingly to adhere to agile could still be well-served by agile development (the article was called New Methodology). How does that apply to my case?

Conclusions --

I think questions at StackOverflow can help others too, so I'll try to summarize my thoughts on the subject here.

  • Through the use of mock objects, even hard-to-test elements such as graphics interfaces and their relationship to client classes might be manageable.

    For example, instead of letting every client of the interface truly test its use under many conditions (fullscreen/windowed mode switch, for example, which affects almost everything in the game), they could be tested against a mock that seemingly to them behaves the same as the original class, and additionally test that mock's fidelity to the original object.

    That way, the slow part (actually opening the window and stuff) is only done once in checking the mock's fidelity to the implementation, and everything else just run smooth over the mock. [thanks to Cameron]

  • A BDD mindset aids at easening the paranoid seek for thorough testing of units, "replacing" testing by specification of actual behaviours, not squeezed units which in many cases are better off let untested (or only indirectly tested, if you prefer putting it that way) to avoid too much one-to-one test vs. unit (class, method, variable, etc) parity, which adds to test (now "specification") fragility. [thanks to Kludge]

A: 

If you have good model view controller (MVC) separation, you should be able to test "business logic" without graphics. For example, testing that a given weapon produces the correct amount of damage, can't shoot through walls, and has a given area of effect.

Andrew Grimm
+3  A: 

I would recommend trying out VersionOne (www.versionone.com). VersionOne is free for a small team working on a single project, and has easy-to-use tools for agile status tracking and project planning. Their site also has links to explanations of the various Agile development methodologies.

There are different flavors of Agile development; I'd recommend taking a look at the Extreme Programming (XP) model, as a good example: http://www.extremeprogramming.org/map/project.html

Agile development is as much concerned with project planning and requirements tracking as it is with the actual programming practice.

The idea is to make sure you record game features that need to be developed (as "user stories"), give a (very rough) estimate of how long each will take, and figure out which ones are important. Box out a small amount of time for each release, and schedule the most-important, least-expensive features that you can release in that time. This system ensures steady forward progress, protects you against constant, unpredictable priority changes, and makes sure you don't develop a huge monolithic code base that doesn't work.

With regard to Test-Driven Development, I think Cameron's and Andrew Grimm's comments are both on point. You can do a lot more unit testing if you abstract away things like graphics API calls.

RMorrisey
A: 

Agile is not at all compatible with GameDev. They are two completely opposite methodologies.

Agile is about development being flexible to changing business requirements and breaking down projects into clear and managable deadlines and work units. GameDev is about regularly and dramatically changing business requirements without caring about the impact on development, and breaking down development teams through unmanagable deadlines and volumes of work.

FerretallicA
Doesn't that make agile methodologies actually recommended to game development?
n2liquid
I think this comment is from a game developer attempting satire. But -1 for failing.
slomojo
Wow, you have absolutely no idea what you're talking about.
Mike Bethany
+1, I thought this was relatively funny.
tster
So why are some first class Game studios using Scrum?
Ladislav Mrnka
+1 for irony too subtle for some
Andy Morris
+3  A: 

You definitely want to look at Extreme Programing (XP), take a look at Kent Beck's Extreme Programming Explained: Embrace Change, 2nd Edition

The most useful thing you can do though is to do some research on Behaviour-Driven Development which is basically Test-Driven Development done right. It takes the focus off of tests and back onto specifications. You don't worry about what classes do so much as what behavior your program exhibits.

So saying you aren't going to use TDD, or BDD, is just plain crazy talk. One of the core concepts of Agile development is developing your software from your tests/specs. You have to get out of the mindset that tests/specs are testing your classes. That's not really what they're for. They are for describing the behaviors your application should exhibit then using that test/spec to write the behavior into your application.

You might write something like this

Describe Startup
  it "should display a welcome screen" do
    game = Game.new
    game.start
    game.output_buffer.should match("Welcome")
  end
end

Then you go write the code to make it happen. You describe the code you want, then you go write it. It allows you to write your code in little, bite sized chunks and best of all when someone else picks up your code they can run the tests and see that everything works. When they want to add new functionality they use the same process so now when you go back to the code you can have faith that their code works too.

Kludge
Should BDD really replace TDD? I think behind a given behavior there's a lot of small units doing their jobs, and if you don't exhaustively test them, changing them might break stuff in a way your tests wouldn't pick since it's too high-level. It should be too hard to test all sorts of behavior software can yield, so you might not be able to be thorough enough. But I'll give BDD a good read anyway. Thanks a lot!
n2liquid
BDD is TDD. It's just a different way of looking at it; it's TDD evolved. You still do unit testing but they changed the name to BDD because of the concept that language informs actions. Using all the testing words make people think, "I have to write tests to make sure my code works." Instead of thinking, "I need to describe what my program should do and make sure it works." Check out this video about BDD vs. TDD. http://video.google.com/videoplay?docid=8135690990081075324#
Kludge
A: 

I don't believe there's actually any element of Agile that is incompatible with game development. I think you're mistaken with respect to difficulty of testing graphic functions; running a graphic function generates an image, and it's easy to compare images to manually-approved "golden masters" (see Approval Tests for one way to go about this).

Refactoring is a fine technique, but it should be done with a safety net of unit tests. The best way to get unit tests is to develop your code test-first, so TDD is another Agile practice you should be following. And it's all better - refactoring, testing, and the rest - if you pair. You have enough people on the team to be pair programming. Try it and see how much faster you get running tested features!

Carl Manaster
I may try this out, yes, but comparing images is one thing I hardly doubt that will work. To begin with, sometimes you have to compare animation, which takes too much time. What's more, sometimes a rendered frame will be a little different from the same expected one because of floating-point differences, for example. I think that's too unreliable and cumbersome.
n2liquid
It is frustrating how often when an approach is suggested, special case exceptions are presented as a reason to entirely reject the approach; I find this very frequently with respect to discussion of testing. Certainly there are circumstances for which this particular approach won't work. But with this approach, you can cover more of your code than without it. Apply it where appropriate; where it isn't appropriate, find other techniques.
Carl Manaster
+1  A: 

Agile/Lean methods such as Scrum, XP and Kanban have been successfully applied to game development since 2003.

There are a number of blogs including: http://blog.agilegamedevelopment.com/

and a book as well. See the book link in the blog above.