Some Battlefield News

I’ve been busy lately with a whole host of things, among others a presentation at a DICE event on the subject of Design Fundamentals. I’ll see if I can get back to you more on that later on once I’ve held the presentation and I’ve got a few posts I’m working on, but it’s slow going right now with everything going on.

I missed the link run this weekend, but for now, here’s a bunch of Battlefield news that are going around. Starting out with the one that has everyone excited:

  • Yes, we’re working on Battlefield 3.
  • No, we’re not telling you more than that. Do appreciate all the excited comments though, just don’t have any more information for you at this point.
  • My colleague Demize99 has started to blog over at, starting out with a post about medics in BC2. Must-read, and I love the class.
  • Inside XBox did an interview with Patrick Liu, producer for Battlefield 1943, about the game out soon on Playstation Network and XBox Live Arcade — asking, “is this really an arcade title?

A Tour of the Games Studio

There’s a hole slew of misconceptions and weird comments that inevitably go around as soon as any large game studio announces a game, or releases a game, or… well, just about anything else. So with this post, I’d like to welcome you to a small sightseeing tour of how a games studio works, on the inside.

I hope to give you a chance to see how a games studio works — maybe it’ll create better understanding of what it is you’re saying when you chatter around forums about the latest greatest game from some studio, or maybe it even gives you valuable insight if you’re looking to get into the games industry.

The Myth of the A-Team and the B-Team

Somewhere in the DICE Office

Somewhere in the DICE Office

As soon as a game announcement turns up, knowing fanboys will appear on all forums around, claiming grand things like “Wow, this sure is great. Now we know DICE has the A-team is working on this while the B-team was doing (other title here).” Substitute with “good team” and “bad team” or whatever you will.

The reality is not only that there isn’t any first or second-rate teams, but that the teams themselves don’t really exist as a concept. People move between teams constantly — some project doesn’t need any more audio work now, so the sound designers move over to the next one. Meanwhile, the programmers are fixing the remaining bugs and getting set to ship the game. Most of the artists left the project before that.

That means that there’s rarely a situation where a team in a large studio makes one title and then immediately goes on to make another one — more likely the team will split up and head to other projects. Some may jump on to help another project get the final bugs squashed, others may jump on to prototype a new game.

The Life of a Game Project

That leads us to the life cycle of a games project, because another misconception is that the team making a game will remain the same group of people all the way through.

A project generally starts out small. A few designers basically start up by spending some time trying to answer the simple question of “What game do we want to make?” Sometimes this is more straightforward than other times — but more often than not it is somewhat complicated and difficult. Even sequels usually start out in a state of “don’t really know what this is about”.

There’s this nice thought many people have about games as having this brilliant idea first, and then just making the game. This never happens. The project will probably get to some kind of rough concept of what they want to do, what kind of technology platform to use, what setting, and so on… and then go into pre-production.

The pre-production phase of a project is when the project starts taking on more people. Coders join, artists join, and most probably more designers join. The mission now becomes trying to prototype, test and prove all the different aspects of the game — figure out the core game mechanics, make art target concept environments, make sure all the tools needed work properly. The goal is usually to build a small section of the game as a proof of concept.

The project has probably been running for at least six months by the time it finishes pre-production and heads into production. It staffs up even more, and sets about building all the levels, missions, features and content needed for the complete game. The amount of time it takes to do this varies wildly depending on the game.

Still, through production concepts are refined. As playtests are done, the developers think of new ways to improve the game, and the new ideas are worked into the concept.

What You See Is All There Is?

By the time you hear of a project, it’ll generally be in production. Conceptual prototyping is relatively cheap, so studios can afford doing concepts for games as a test, and if they don’t turn out well then cancel the project. This means that at any time, your favourite games studios out there are probably doing cool stuff you have no clue about.

This way of doing things also means most views on the state of a game are somewhat flawed. By the time a game hits beta and you get to see it, it’s virtually completed and only bug fixing remains. Comments like “well this is an early beta, they’ll change lots of stuff” are quite common and somewhat funny to see — very few game changes will be done once a game is in beta.

That doesn’t mean quality doesn’t increase though — much of the quality you see in a game comes from the actual fixing of bugs, not the adding of features.

“Not that the devs are ever gonna care”

Gamers tend to show a pretty large dose of resentment towards game developers. In general, what you see is an announcement met with awe and comments like “this’ll be the most awesome ever”. This attitude then changes over time, until at release, the comments tend to sound more like “they messed it up”.

A strange aspect of this is that many gamers seem to be deep into the belief that game devs don’t care about them, about the games they make, or about anything at all other than earning a quick buck. This is strange because the games industry is not the place to go to make the good money while slacking — it’s generally a grind of long hours of dedicated work and not as well paid as other comparable areas (making business apps is definitely much more lucrative for a programmer).

Yet people still do it? Why? Because these people are gamers and love what they do. Maybe somewhere there are big-name execs that don’t care, but I haven’t met them yet. I’ve only met the EA execs who beat half the dev team on Battlefield: Bad Company (though dogtagging your boss is sweet indeed).

That’s all part of what makes the games industry such a great place to be if you love games — not only do you get to work with games, you get to work with gamers.

Yet most people seem to think that game developers isolate themselves in a small glass jar somewhere, and start ignoring the internet as soon as their project becomes public. Nearly every forum or blog post about a game has a bitter comment about “no chance the devs will bother to read this”.

Guess what — we do read stuff on the ‘net. Not only because we’re gamers but because we care deeply about making the best game possible. So why don’t we answer? Well, I think you could imagine what’d happen. Half the people would call you a liar, and the rest would bombard you with even more. There’s no way for a game developer to answer questions or opinions on a forum without immediately being subjected to at least twice the amount of new questions or opinions. We’d simply run out of time.

And well… at the end of the day, we have games to make.

For my own part, I’m more connected than most. Toss me a line on twitter if you have a question.

Sunday Link Run

A bit of a rush this weekend so I haven’t been able to finish the blog post I was hoping to post. Here are some links to keep you occupied for a bit though… I hope I’ll be able to post a full post the next few days.

Deleting Code

I came upon an event handling function a year or two back. It was late, there was a crunch going on, I was tired as hell, and I needed to figure out what it did. Here’s something like it (or see the whole thing if you can’t read it in this format):

void EventHandler::handleEvent(const Vector& eventPos, const Transform& objectTrans, Object* sourceObject, int sourceId, float time)
    if (sourceObject && sourceId != -1)
        Actor* sourceActor = getActorFromId(sourceId);
        if (sourceActor)
            // Event was fired by an actor. Accumulate data in the actor's memory about how much firing strength it has fired.
            // Get information about source weapon.
            Object* actorVehicle = sourceActor->getPlayer()->getCurrentObject();
            Armaments* actorArms = actorVehicle ? (actorVehicle->getArmament()) : 0;
            int weaponId = actorArms ? actorArms->getActiveWeaponIndex() : -1;
            if (weaponId != -1)
                if (actorArms)
                    Weapon* weapon = actorArms->getWeapon(weaponId);
                    if (weapon)
//                        if (weapon->getExplosionRadius() > 0)
//                            sourceActor->getMemory()->setTimeOfEvent(time);
                        // Get information about target, and bots memory of target.
                        ObjectProxy currentTargetHandle = sourceActor->getMemory()->getTarget();
                        Object* currentTarget = currentTargetHandle.get();
                        // Always deal with primaryObject
                        if (currentTarget && !currentTarget->isPrimary())
                            currentTargetHandle = currentTarget->getPrimaryObject()->proxy();
                            currentTarget = currentTargetHandle.get();
                        const SensingData* currentTargetSensingData = sourceActor->getSenses()->getSensingData(currentTarget);
                        if (currentTarget && currentTargetSensingData)
                            ASSERT(0 <= weaponId && weaponId < 8, "Illegal weaponId: &u", weaponId);
                            //DEBUG_OUTPUT("FiringStrength accumulation for weaponId %u... %f\n", weaponId, cyrrentTargetSensingData->typesFired
                            int targetType = currentTarget->getType();
                            if (targetType <= 3) // Lighter types
                                //for (int strType = targetType; strType <= 3; ++strType)
                                //    currentTargetSensingData->typesFired[weaponId] += weapon->getTypeValue(strType);
                            else if (targetType == 4) // Other type
                                //currentTargetSensingData->typesFired[weaponId] += weapon->getTypeValue(4);
                            else if (targetType == 5) // Third type
                                //currentTargetSensingData->typesFired[weaponId] += weapon->getTypeValue(2); // Other type
                                //currentTargetSensingData->typesFired[weaponId] += weapon->getTypeValue(3); // Other type
                                //currentTargetSensingData->typesFired[weaponId] += weapon->getTypeValue(5); // Third type
                                /*                                ObjectProxy victimHandle = targetObject->getVehicle(sourceActor->getTeam());
                                SensingData* spottedObj = sourceActor->getSensingDataFromHandle(victimHandle);
                                if (spottedObj)
                                spottedObj->fireSuccess += 1;
                            //DEBUG_OUTPUT("...became %f\n", currentTargetSensingData->typesFired[weaponId]);

There are lots of things I could say about the quality of the code… but it’s late, there’s a crunch, I’m tired and… what does the function do? I’ll let you think about that for a bit. You can safely assume that functions don’t have side effects.

Many people focus almost exclusively on writing new code. Some people even stay away from deleting code — instead simply commenting things out. As you see above, this makes the code extremely hard to read. Also, the commented-out code doesn’t work anymore. With other changes, the compiler no longer checks this code for errors (for instance, some of the commented-out functions had been removed entirely).

This also misses the entire purpose of having source control in the first place! If you want the code back, go check it out in perforce, subversion, cvs, or whatever source control system you’re using. If you’re not using a source control system… well you have bigger problems than commented code.

For all there is to be said about writing code, often the best thing you can do is delete some code. Delete the code you don’t need — delete the extra pieces that are in the way of working with the code efficiently.

I once took over ownership of a code base, and the first thing I did was strip nearly half of the code out in form of unused support code, unnecessary interfaces and adaptation code for layers that no one wanted or needed and code that was simply so bad quality it was better to rewrite than to maintain them.

So… what does the code do? Cookies for the first commenter with the right answer.

(Disclaimer: the code above is not exactly the code I found… but it matches in form, and is similar enough to make the point)

Update: Added a link to the code as a separate file so you can view it without the scrollbar headache.

WordPress Themes