In recent articles here on MP1st, there seems to be a lot of controversy about what makes a new game engine and what doesn’t. Is the engine of Call of Duty: Ghosts new, or is it a copy/paste job from the last generation of console hardware? In a very strict sense, no. It is not a brand new engine. But that in itself is not a bad thing. The actual answer is, as usual, a lot more nuanced.
Before you can judge whether an engine is worthy of being called “next-gen”, you need to know what a game engine does. A game engine doesn’t just draw the picture on the screen. A game engine does literally everything. I probably didn’t make that clear enough. Everything.
So, what exactly does everything mean? I can’t go into details or even just mention everything that goes on, but I can give a simplified view. First of all, an engine checks the available hardware. This goes from processor speed to available RAM to whether the internet is connected, USB accessories are attached and more. This is quite an extensive process on PC, but even on consoles, this happens to a lesser extent. Once that is done you can launch your graphical interface. But that’s not the end of the line. A game also needs to load data and all that data needs to be represented inside the memory somehow. Just how to load, store, and retrieve big amounts of data is a science on its own. The engine is constantly using caches, dozens of different data structures, and is managing and keeping track of where everything is, and making sure you don’t run out of memory. This is not something you think about when you run a game, but it is extremely critical and very complex for modern day games, even on current-gen consoles.
But once again, it doesn’t stop there. If all this works as it should, you can now start loading your intro videos. So, what’s next? You need to show the main menu. Menus are another data structure you need to be able to display at different depths. It is not as complicated as most of the other parts of a game, but a game needs to have a system that allows designers to easily change the structure and look of the menu without having to touch the underlying code too often. A game also needs to intercept commands from the user. This can be your controller, but increasingly often, voice commands and gestures as well. What button or command does what at what time is another system that needs to run. Depending on where you are in the menu or game, buttons can do different things, so it’s not as easy as binding a button to a single action. The input manager needs to be context aware. Also, people like sound. Using the detection code the game ran before launch, it knows which audio device to send audio to. For now it will be just a simple .mp3 file or some other format.
Oh, before I forget: If you happen to plug in your headphones, or your controller loses connection, a game needs to handle that as well. There is a system constantly listening to messages from the underlying operating system about changes in hardware. It needs to make sure that at any point in time those changes get resolved as elegantly as possible. Not a simple task.
The main menu
So with all those systems up and running, we made it to the main menu! Awesome. You’re reading this on MP1st, so I’ll assume you’d want to launch multiplayer next. For this, you need internet connectivity. This is usually handled by the OS, but you still need a system that handles all the different requests a game can make. Again, efficiently and correctly transferring data over a network is a science on its own, so what follows is very simplified: The game will send a request to some master server, asking for available servers or lobbies. In a lobby format, the game usually tries to determine which result will provide the best latency. For dedicated servers, it usually just shows you the list and lets you decide. When you connect to a server (dedicated or not), a lot of data goes back and forth so both sides know who’s who and what’s up.
The server accepts your connection and you’re finally about ready to play… after the loading screen. Every single thing the game has to be loaded now using that memory manager system I described above. This will be many gigabytes and tens, if not hundreds of thousands of different files that need to be stored in data structures. With everything loaded, it’s time to start rendering. But what do we have to render? And how? Whether you are in single player or not, on a dedicated server or P2P, your game needs a representation of the game world at all times. This is not the image you see on the screen, but is an abstract representation of the current state of the game. It includes objects with their current state, location, rotation and special properties, but also zones where different sounds have to play, particles like ejected bullets, places where you can do special actions like vaulting a wall and much much much more. In a multiplayer session, every single player has their own unique version of the game world. Keeping those in sync is a very hard problem to solve and that’s where the dreaded “lag compensation” comes in, as one solution. Every frame, time advances, and the whole thing gets updated. Physics, updates from the server, actions by the player… they all get applied in this abstract representation of the game world.
Only now does the 3D renderer kick in. One of the first things it does is decide what objects are in vision of the current view and which parts. This is a very fundamental part of the renderer because if done right, you only render exactly what you need. If done wrong you throw away a lot of performance on things the player doesn’t see. Once it knows what to render, it draws all the objects from the correct angle and position. But it doesn’t do just that. It also makes a representation of the angles of each surface for every pixel, how far away it is from the camera, how reflective it is and much much more. Once it has this data, it can start applying lighting effects. Once the lighting is done (among other things), it all goes through post processing, the UI is drawn on top of it, and that’s what makes it to the screen.
Most of the rendering systems do exactly what they are told to do. If you want to know how far away pixels are from the camera and you have a good algorithm for that, that’s all you’ll ever need for that problem. There is no point in throwing out working systems, only to rewrite them to do exactly the same. Throwing out a whole engine, in general, is a bad idea unless there are some big technological barriers stopping you from improving it. If a developer wants to improve the lighting in their game, all they need to do is improve the lighting step of the renderer. Many of the new features you find in modern engines are building blocks that plug right into the rendering pipeline, as they call it. There are a lot of technical and mathematical challenges to many fancy rendering techniques.
Call of Duty: Ghosts: next-gen or not?
Using the extra horse power, the CoD:Ghosts engine significantly improved many parts of the renderer and added many others. It will probably not be as pretty as Battlefield 4, but then again, it will run at twice the framerate. Both Frostbite 3 and the new CoD engine are “next-gen”, even though neither is completely new. Both will become better as time goes on. As a good example, compare CoD2 with BO2, or the original Bad Company with Battlefield 3. This is just the first wave of games for the new consoles. The best has yet to come. Throwing out perfectly working engines instead of improving on them will only slow that process down.
So next time an engine is “just” an improved version of the previous version. Don’t light your torches or get out the pitch forks. Give it a fair shot. Great software is like great wine. It takes time. Two years of improving will have a much greater effect than two years of doing everything from scratch again.
In the end, we are all winners because we will all get better games built on better engines. As a PC gamer, I can definitely appreciate good graphics, but at the end of the day, the only thing that matters to me when playing games is having fun. Play the game you want to play, and let others do the same. Good times are coming, so let’s just enjoy them instead of fighting about it on the internet!