In open world games like GTA 5, what happens to NPCs when no one is around? Do they still “move,” drive, etc?

771 views

In open world games like GTA 5, what happens to NPCs when no one is around? Do they still “move,” drive, etc?

In: Technology

7 Answers

Anonymous 0 Comments

The rule of thumb for making video games is this: try to make it look like as much as possible is happening while at the same time doing as few calculations as humanly possible.

Simulating anything accurately is technically very straightforward, on the other hand is very computationally expensive and relies the computational capacity of the hardware. Computer hardware has never been cheap, which is why often the most technically impressive games are the ones that have figured out a way to convince the player that much more is going on than there actually is.

Those random NPC’s don’t even exist when you aren’t looking at them. The game simply makes them appear in your general area to give the illusion of a vibrant, populated city. As soon as they are far enough away to not be relevant, the game engine forgets them and breathes a sigh of relief.

The game engine has to draw 60 pictures to the screen every second, which doesn’t really sound like it means anything, but when you rephrase it, it means it has to simulate the entire game world, the physics, the actions of the AI etc in one sixtieth of a second, 60 times a second, every single second, without stalling. What it boils down to is that the less work the game engine has to do, the better.

The more NPC’s there are to consider, the less likely that sustained framerate is going to actually happen, so the game engine is intentionally designed in a way that allows it ignore everything it possibly can, that includes scenery and NPC’s. All of the greatest game engines every designed have had the same thing in common: they excel at knowing exactly how much work they can avoid doing.

In all likelihood, for nearly any given game, there is probably a rigidly defined quota of how many random NPC’s can be comfortably handled by the program without affecting the game playability, and they are continuously replaced as the player character moves around the game world. As long as there are never too few or too many, the illusion is easily and stably sustained.

This doesn’t rule out the possibility of having specific NPCs that are more accurately tracked and simulated, if they are relevant to the story. Think about it in terms of the relationship between extras in a movie vs the main cast. Both are pretty much essential to make the movie convincing, but their roles are very different.

You are viewing 1 out of 7 answers, click here to view all answers.