Live data from Hacker News

Ask HN: Is TDD or BDD used in AAA gaming industry?

news.ycombinator.com

1–10 of 64 posts

Ask HN: Is TDD or BDD used in AAA gaming industry?

#1
TDD, BDD, or any other form or development driven by tests first are very popular approaches in web development or even non-web developments.

I'm curious to know if these approaches are also considered a MUST for AAA game development.

Is there anyone that has worked with these approaches while developing games or know any big AAA game company that uses test first approaches as something required during the development?

Re: Ask HN: Is TDD or BDD used in AAA gaming industry?

#3
In my experience no. Testing was not even considered. I worked on mobile games 5 years ago so things may have changed.

Most of the time we had strict timelines with feature milestones. We were building mobile apps of licenced titles.

The lack of TDD was replaced with full time QA, sometimes multiple on the one game.

Re: Ask HN: Is TDD or BDD used in AAA gaming industry?

#4
I worked for a AAA game company in the game server department and I would say that with the schedule and how the shop was directed it was nearly impossible to do TDD. I can't speak for the engine side, but my guess is that it was not possible over there either.

I bet like anything through, if you go to shops that have strong direction, can work with a small team and over deliver, those standards paradigms are used.

Check out the tests in the Quake3 Source Code. It is a shining example for sure.

https://github.com/id-Software/Quake-III-Arena

Re: Ask HN: Is TDD or BDD used in AAA gaming industry?

#5
Having never worked at a gaming company but having a friend who was the head of testing at one very recognizable shop, the answer was definitely no, at least not there. Its definitely a big enough industry that I'm sure some does though.

Also, last time I wrote any 3D code, it at least appeared to be incredibly hard to test that some visual thing was just so. Of course there are still things like business logic that surely could be tested, but it's just not going to be as straight forward as having some code generate some HTML string and then asserting things against it. Those last-mile things you might want to test are always a challenge IMHO.

I learned a lot of my coding chops at a Rails shop that was very in to testing, so that's definitely my perspective, YMMV.

Re: Ask HN: Is TDD or BDD used in AAA gaming industry?

#6
I'm not in the game industry, but from what little I know, this is probably going to be a tricky question to answer.

Reason being, a high proportion of AAA game development is done using off-the-shelf game engines. Of course it's still necessary to write code for the game logic and features, but because of the stable base this code is written against, it might not be seen as necessary to follow a strict TDD/BDD approach.

Re: Ask HN: Is TDD or BDD used in AAA gaming industry?

#8
In my experience, no, they don't write tests first, and in fact AAA game companies write almost no automated tests at all.

Instead, AAA teams have large staffs of cheap manual testers--high school and college kids who think they're getting paid to play video games. The managers in charge of these QA teams work their manual testers to the bone, encouraging them to work late and do unpaid overtime. These testers inevitably burn out, and but there's always a new batch of kids coming in to replace them.

When manual QA is that cheap, it turns the economics of automated testing on its head. Why maintain an automated regression suite when you have humans who will do the testing for you?

There's a similar effect on the dev side. A lot of inexperienced developers are willing to take a significant pay cut to work at a AAA game company, just for the dream of working on a AAA game. The devs, too, are notoriously managed as an expendable human resource. "You'd better keep working overtime, or I'll just replace you with another kid who'll work harder than you for less money."

As a result, AAA game developers burn out pretty quickly, too, leaving the game industry for other software companies that both pay better and offer a better work/life balance.

As a result, you'll find that a lot of AAA teams are relatively inexperienced. Sure, there's a core of long-time devs on every team, technical leads who can point the way, but it's not an environment where you can get solid mentoring on the best practices of software development.

Even if one team does pick up TDD, who knows if the same team will even be there in another year or two? Good software practices are regularly "rediscovered" on AAA dev teams, and then forgotten, as the team turns over and their tribal knowledge fades away.

Re: Ask HN: Is TDD or BDD used in AAA gaming industry?

#9
As a one-time indie game developer who went to work at a 250-person games studio, my answer based on limited experience is "probably not".

BDD in particular is tricky, because beyond the level of abstraction of the engine, you don't really know what you're building. How do you express that a thing should be fun, or weapons reloads feel punchy, in a BDD spec? How do you automatically test that?

Games code exists purely to elicit reactions in human brains. We don't have the technology yet to examine the desired state change in the target system.

Regular apps have the same problem, but with less expensive assets and less iteration. "As a user, I should feel that the login transition is slick" is a spec I can imagine that is UX-related. However, we can probably all agree on what slick is, and failing that you could user-test it to prove that the implementation is acceptable. A game is made of many complex adaptive interacting systems, so every change needs subjective validation.

On the subject of complex adaptive systems: many games feature them and so exhibit fundamentally unpredictable emergent behaviour. This can be hard to test for.

The most testing I've done in a games project is to figure what it is you're trying to build, then unit test the implementation when you've worked out if it's fun.

Post reply on HN