- [Narrator] The world of Elemental is devastated. Broken. - There was no fix for this. There was no fix, which was horrifying. You realize that the entire premise of the engine that we just spent multiple years developing is wrong. I'm Brad Wardell. I'm the founder and CEO of Stardock. Some years ago we made a fancy strategy game called Elemental War of Magic. I'd like to tell you about the challenges and, well, horror we ran into in trying to create that game. So our dream for Elemental when it started was that we were going to make the ultimate fantasy, turn-based strategy game. So you're going to be in this living world, where every single unit in the game would look different. Every unit would have its own clothing. The units could actually get married and have their own children, and the children would grow up and they would look different from their parents. We had this really cool city system where you could literally design your own cities. It's almost like a Sim City-type thing, where I could place buildings and the buildings would interact with each other. You could actually zoom in and see the little people living in the city. It was really cool. Every single unit, you could put on their own boots and shields and pants and everything. Even your civilians could have dresses. We had a whole bunch of dresses in the game. So we're in a time where game development had moved into making 3D engines. But strategy games had only recently started to embrace 3D engines. That's where you rotate the map, and the units are 3D-modeled and all that, and it's being rendered in real time. So it was an interesting era, because people wanted to have their units have high fidelity, but we were still using 32-bit operating systems, which meant that you could only see two gigabytes of memory. So 32-bit versions of Windows only allow you to have two gigabytes of total memory. So even though you can, in theory, have four gigs, you could only allocate two gigabytes. We're at probably Year Two in Elemental, and we're just getting strange crashes. Now the underlying system was extremely complex. Because we knew well beforehand that what we wanted to do would not fit in two gigabytes of memory. So we developed a really sophisticated system to handle allocating and de-allocating memory on the fly really fast, so that you would never run out of total memory. About two years into the project though, we kept running into problems where things would just randomly crash, or weird things would start happening that we weren't expecting. So our training and our experience had told us well, there's a memory leak somewhere, or there's an array out of bounds type error, or any of the numerous traditional problems that game development runs into. So we started changing the design of the game. More and more of our time was going into refactoring the game's design, taking visuals out of the game. Because we just said maybe an artist had too big of a texture and now it's causing a problem. Or maybe having every race having truly unique-looking creatures was causing a problem. Even though we weren't coming close to running out of memory, you load up Task Manager and it would say, well, you're only using 800 megabytes of memory, and yet we would get these random out of memory errors. The game was getting more stable as we pulled things out, which, at the time, told us, aha! We're doing something right because it is getting more stable. But if you played it long enough, it would crash 100% of the time, if you played long enough. I had great confidence in our team. To me it was just, as an engineer, it was a technical issue. The game's crashing. All you can do is take the time and find out where the bug in the code was. Except it wasn't a bug in the code. After Elemental shipped, I got into the code myself. So I started looking and I started looking, and I found a tool that measured memory fragmentation. So I downloaded it and loaded it up, and after a couple hours, the largest contiguous piece of memory would be only like one megabyte. The memory had gotten so fragmented after enough hours, because we were constantly allocating and de-allocating memory, that no matter what, you just didn't have any memory free. Which meant, in our case, what we ultimately discovered, to our horror, after the game shipped, is that it's memory fragmentation. That is, it doesn't matter how much memory you have available. What really matters is the largest contiguous piece of memory you can allocate. We had so mutilated our original design that someone would go and say, wow there's a lot of neat stuff here, but where's the game? We ended up with a lot less of the meat that makes a game good, because we had taken out so many of the system to solve this. Ultimately, none of those things solved it. So when Elemental came out, the backlash on it was so strong. We had never shipped a bad game before. This was just absolutely crushing to morale here, to our sense of selves. It was horrible. We actually had a fan who had made fan shirts of the game because he was a Master of Magic fan, send us a dirty shirt. One of the shirts he had made and given to people, his own shirt that was used and stuff, as a protest. We had so many fans that were upset about it. We were crushed. It's been seven years and I think about that game pretty much every day. Someone's gonna say, how could they have not known about memory fragmentation? But if you're really honest with yourself, it's not that commonly known. Even now, it is quite challenging to find decent memory fragmentation tools. It just doesn't come up that much. And nowadays it doesn't come up at all. You just make the game 64-byte and call it a day. If we had just waited a little longer to make the game, we could have had a large address of ware, or any number of other ways to get around this problem. But it was just that time. I mean, in hindsight, I think of all the mistakes we made. If we had waited a little longer it would have been stabler, but we were never able to fully address the issue without completely changing the game. We ended up giving its sequel, Fallen Enchantress, free to everyone who bought Elemental. But we had to make fundamental game design changes to it. It built a pre-allocation system for it which solved a lot of the problems, and made it a lot more stable. Our newest engine, Nitrous, that does pre-allocation. Galactica III has pre-allocation. But we were never able to do our original vision for Elemental because of that.