The entity component system (ECS) evolved from union-based entity systems in early games like Ultima Underworld (1992) to a more flexible, runtime-configurable architecture in Thief: The Dark Project (1996). Early ECS implementations used fixed-size memory blocks with unions to save memory on constrained hardware, but this approach limited designers' ability to create hybrid entities (like a 'toaster oven' that combines properties from different categories). The modern ECS approach separates entities into a bag of properties (components) that can be mixed and matched at runtime, enabling designers to create new entity types without recompilation and allowing more flexible, emergent gameplay systems like the ACT/REACT phenomenon system.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
The First Entity Component System - An Interview with Marc LeBlancAdded:
At last year's better software conference, I gave a presentation called the big oops, which was a historical analysis of a particular object-oriented programming technique. And if you happen to see this presentation then you know that one of the central figures in it in fact mentioned right at the beginning of the presentation was a programmer named Mark Mock LeBlanc who was an early engineer at looking glass and was instrumental in the design and development of what we would now call an entity component system. Now, the way that I actually got all the information that I put in the presentation about that work at Looking Glass and the people involved, what they were thinking, what they did, and why was I did an extended interview with Mock. I actually have known him for a long time.
So when I was working on the presentation, I just wrote him and said, "Hey, would you mind sitting down for a few hours and just going over the whole thing with me, what you can remember about how this actually came about so that I can give like an accurate account of of what was going on."
And that's, you know, we did this interview, that's where all of the information came from. And by the time we got to the end of interview, we were both like, "Boy, I wish we had just recorded that because it would be this great sort of long- form thing that has all this information about Early Looking Glass and sort of what they were doing at the time and and what Mock's recollection of the process was." And so we were kind of both bummed about that and we ended up putting it kind of on the to-do list to say, "Look, maybe sometime we can just sit down and do this again." And we'll both try to pretend that we didn't already have the conversation cuz we did, but we'll try to recreate it as best we can. Uh so that we can put something up on the internet for everyone to watch to sort of hear the full account and all of you know the details that were in there. I'm very pleased to report that last month we did exactly that and this is the video that I've prepared. So without further ado, I hope you enjoyed this long- form interview with Mark Mock Leblanc uh on the history sort of of the entity component system and in general the programming that he did at Looking Glass uh on sort of object modeling and that sort of stuff.
>> Why mock? Let's let's let's go all the way back cuz people will want to know your history. Why mock? Let's start.
>> Good to be here, Casey. And uh people assume it's a Boston accent thing. It's actually not. And to pronounce it with a Boston accent is a misprononunciation.
Um, I went to college in the um, you know, Meyers Curvy era of Saturday Night Live.
>> Uhhuh.
>> And, uh, there was a, um, you know, there's a recurring segment on there called Hans and Fron getting pumped with or forget what it was called, but it was like these two Arnold Schwarzenegger clones, right, called Hans and Fron. One of them was Kevin Nan and the other one was, I think, Dana Carvey, right? And um, and yeah, and so they would pump you up. they would get you popped up, you know, and um people just start started calling me Mark because of that. And um Mark, you are girly man, you know, that kind of thing. And um you know, eventually at one point like the entire canvas got postered with signs that just said Mark on them.
>> Are you serious?
>> Yeah. And it it was and it was uh and it kind of stuck from there. So uh that's what it is. Uh that's why the uh it's mostly just a screen name now at this point. But um uh and and in fact you know my I do have relatives who um as you know like like New England is actually stratified in terms of like the different as accents or different class.
Yes. um you know and so um my family was definitely like the sort of blue-blooded you know um uh my dad moved down from Montreal when he was four and my my uh my mom came out of the you know Irish and and and Italian sort of >> Yep. Yep. you know, uh, >> common Boston thing, >> working class, common Boston folk. Um, you know, and so they all, you know, they have the pacon, you know, those kind of people have the paca Harvard Yard accent. But Massachusetts is also full of like these educated professionals, right? Because it's full of colleges and it's these educated professionals who come in from uh out of state and they go to college and they become doctors and lawyers and they just never leave, right? And so there's like this whole other sort of professional strata of people who just don't have the accent, right? And so my family, my parents are people who moved from the, you know, from the working-class strata to the they were both like the first in their first generation to go to college.
And so like we moved to a like, you know, doctor and lawyer bedroom community. And so, you know, I had I was parking the car as a child and then I kind of got it beaten out of me. Um >> the accent the Massachusetts accent cast >> the Yeah.
>> very few people are familiar with. Yes.
>> Yeah.
>> Yeah. Yeah. So I don't want to make the whole show about this but um >> but same thing with me actually like uh we lived in a town that was mostly people who like came there from elsewhere and didn't have the accent literally like and it was this tiny town. There was a tiny town just next door. Everyone there had the accent.
Right. So it's like it's very it's very >> Yeah. Absolutely. Absolutely. So anyway, uh that out of the way, pronunciation.
So it's mach channel Arnold Schwarzenegger, not Mark Wahlberg, right?
Yeah. Um, so that out of the way, uh, you sort of you started, correct me if I'm wrong, but you started working on like 3D simulation games with ND systems, that sort of stuff on like underworld 2, like Ultima under like right after sort of, you might say the what we might call the birth of this kind of game, like 3D plus simulation system, like a bunch of things coming together. Um, for folks who don't know, like because I only cover this a little bit in like sort of the adjunct to to the lecture, like tell us a little bit about that time. Like how did you get into that? Why were you even there? Like why was I even there? That's actually a fascinating question.
>> It was a long chain of nepotism. Um, >> awesome. So, so the the story behind Looking Glass really is that um Doug Church played Dn D D D D D D D D D D D D D D D D D D D D Dungeon Mastered by a guy named Paul Shakross um uh who is an own his own character Paul Shakras had an uncle no Paul Shakras there was another player at that table Mark Sabowitz who had an uncle named Paul Nurrath and that's how the connection got made um and most of the players Most of the players in the D and D game were on my lived on my floor at MIT. Uh, and Paul lived on on my floor and Doug lived on my floor and most of the players lived on my floor except for one of his one of Paul's old high school friends who had an uncle who was in the game industry and was leaving Origin to to found his own company which at that time was Blue Sky. It's called Blue Sky.
And um that connection got made and Paul hired Doug um to make and Doug then turned around and hired uh I it wasn't necessarily Doug but like he referred John Mera who was on the floor and Tim Stmach who was not technically on the floor but hung out a lot. Uh James Fleming was there. Um Dan Schmidt was there. Um yeah, all not necessarily on exact this exact one floor, but definitely all in that sort of uh group.
And they did Underworld One um for uh what was at the time Blue Sky. And at the time, uh I have a play test credit in Underworld one cuz you know, like they were all you know, we were I was going over their house and playing the g the game. And um there was the office they had our office in New Hampshire. I forget where but um uh I think it might have been Manchester, New Hampshire. And >> right, it wasn't originally in Cambridge, right? Like Blue Sky was kind of off. It was a different thing.
>> It was off in in New Hampshire where Paul lived and then um but like there was a time during ship where um like really close to ship where um uh Warren came up. He was like the or he was at was still working for Origin. He was the or inspectctor. He was working for uh he was the basically our publisher side producer and he came out and they rented like a single room in a basement of an office building in Davis Square.
>> Okay.
>> Um >> Davis Square is is a Boston like te-top kind of location.
So it's in between it's like in between Harvard and Tufts basically. Um and um so uh yeah, so they they rented us this one bedroom so that so that the guys didn't have to drive all the way to New Hampshire to crunch on the gate basically. Um and uh yeah, and so I would hang out with them uh in their little one room. I remember I feel like there weren't enough chairs to go around. I feel like Warren sat on a like on a lawn chair like a like like a lawn chair lounger on the floor of this thing. Um and yeah, everyone was just kind of sitting on the floor in this one room and I was play testing uh just a little bit. I remember actually I was a TA for uh software engineering at MIT that year and I remember I um got tasked with maybe I was late to a meeting or something and I got tasked with um assigning the students to classrooms like it was beginning of the year and like they were like who wants to do this this thankless job of um you know deciding which TA gets which students. Um, we're we'll give it to the to Mark who's like the most junior guy and and probably walked in late. Um, and I was like, "This isn't thankless. I'm drunk with power now, right?" Like, I get to handp pick my own resation and, you know, and, um, you know, >> handpick the one guy who's already annoyed me's recitation. Uh, yeah. So, uh, anyway, I did that work on the floor of that thing while those guys were, uh, making Underworld. Um, okay. So, basically, Underworld One happens because basically a bunch of people at MIT get hired through a D&D group cuz they know how to program and they need more programmers is sort of basically what happens.
>> Right. Right. And and there's a little bit of another tangent off that that we ought to go on, which is that if you Google the name Paul Shakross, what you will probably find is that he is the one back during the Obama administration, he is now a space policy guy. Um, >> oh my god, I've met this guy.
>> Maybe back during during the Obama administration, um, there was a thing on the White House website where you could like submit petitions and if enough people like voted yes, signed the petition, then the White House had to come up with at least an official answer. And there was a petition to build a Death Star um that got the threshold. And >> I think I met him through Doug one time.
I totally forgot about that.
>> Paul Shakros is the guy who wrote the official White House response to Should We Build a Death Star and uh that was his 15 minutes of fame, but he was the dungeon master of the D&D game that basically created Looking Glass.
>> So, anyone who's ever played anything downstream, Ultimate Underworld, Thief, The Dark Project, but you have like >> or any arcane game for that matter, you know, >> that's right. Uh you basically have Paul Shakross to thank. You just don't know.
>> Absolutely. Absolutely.
>> So, okay. So, you're there, you you you know these guys from MIT and you know, you you've you're literally on the on the floor while they're deving it, like doing stuff. Uh I guess they expand for Underworld 2.
Yeah. Um Yeah. So, my story was, you know, I was visiting them all the time, hanging out, playing their game, stuff like that. I actually got um sick of so I got sick of a feature in uh Underworld 1 where um so Underworld 1 had a you know a procedural mini map. It was I don't know if it was one of the first games to do I mean um but you know you would walk through the dungeon and it would you know draw the map of what you had seen right and there this procedural system right that would you know look at the tile map and look at what you'd seen and render something right um so the uh underworld dungeons were a height map right tile height map right um and there was some slopes and stuff also but um and a tile could be solid right um right so like there was solid walls but then you but you could have variation of height within Right. And so, um, it was not showing those height differences as walls in the mini map.
So, in Underworld one, for example, there's a huge chamber that's a maze, but because the walls of the maze don't go all the way to the ceiling, like when you look at the mini map, it just looks like one big open room.
>> I see. Right. And you're like, "Oh, I could just walk right through that." And you're like, "Oh, wait. I remember that's the maze. I can't do that. The map is just bad."
>> Yeah. And so I got I I I got pissed at that particular fact about the mini mapper. And so I like, you know, I was there in their office and I was like, "All right, where's the code for the freaking mini mini mapper?" And so I like I hacked in um I hacked in Yeah.
something to like show you show height difference height differences of enough height as walls, you know, in the mini mapper. And uh that was probably my job interview, >> right? They're like, "Okay, we like that. It's good." So I joined I joined uh Ligulas part-time. I was part-time as Underworld on Underworld 2 and I was still a student at the time and uh I basically I started as a sort of programmer working I did all the new spells. I did some um scripting support kind of stuff. Um and uh then I kind of turned into I got turned into a level designer because they needed level designers and I did the ice caves in Underworld 2. Um, and uh, so yeah, that's kind of where it started. Um, and then, you know, I joined full-time uh, on like February 3rd of 1993 for System Shock. Um, >> Gotcha. So, System Shock was your first full-time looking gig. And I did take some time off during that to finish my master's thesis, which they weren't so happy about, but um, um, >> they're like, "Everyone else here dropped out. Why can't you?"
>> Yeah. Yeah. No, it was more about like >> that's not true. There's there's plenty of people. It's a mix of >> It was a 21-year-old not managing expectations of his employer kind of thing. Um, >> well, let me uh let So, we'll jump back there in a second cuz I want to talk about uh cuz this was part of, you know, the presentation. It was like >> the the entity systems of those early games.
>> Right. Right.
>> But just to just to put a button on that. Also, can you give people a short like summary of what you did like after looking glass? We're going to go back.
We're going to jump back to the Looking Glass part, but you've done a bunch of other stuff.
>> I was at Looking Glass through System Shock 2, I think, was the last product that Looking Glass shipped. Um, maybe not. Maybe uh there was a Flight Unlimited game in there. Um, technically, I guess Jane's Attack Squadron got shipped by somebody else, and that that might count, but um I was basically with at I was with Linglast till the till the last day. Um, and then I uh spent a few years uh at Visual Concepts, actually working on the uh NBA 2K franchise and also the NFL fran 2K franchise when that existed. Um, did a little bit of uh work on um non-sports games for them. A little bit of like prototyping work on non-sports games. Um um then that's where I met Andrew Leer um who is a character um his claim well he has many claims to fame but one of his claims to fame is having as a uh young man um created with a couple of his friends the Skyrems of Jarun tabletop roleplaying game um and then went into uh game, you know, video game development from there. Um, so he was working on a thing. He had I met him at Visual Concepts. He left Visual Concept before I did and he went indie and he was working on a thing called Oasis. Um, which was pretty exciting to me. Um, I was starting to get frustrated with um sort of uh the direction of visual concepts um being mostly a sports game company. Um and uh so I and I was really excited about Oasis. So I kind of jumped ship and uh uh joined uh Andrew in completing Oasis um which is this weird cross between uh Mind Sweeper and Civilization. You can play it on Steam.
It's called Defense of the Oasis because turns out there's this pesky rock band um that makes it hard >> obscure rock band that no one's ever heard of.
>> Yeah. Yeah. Obscure rock band with a similar name that tends to dominate the uh Google searches.
>> So uh yeah. So on Steam it's uh Defense of the Oasis to be a little bit more narcular. So I went to a company. Yeah.
We uh company at the time, Andrew's company is called Mind Control Software.
And um uh we finished Oasis and submitted to the IGF and won the grand prize in 2004, which was very >> I remember that game. It was I had a lot of fun with that game. I kind of now that I You remind me that it's on Steam, I feel like I can go play it again. I could probably go play it again. I >> I forgot that I could even do that.
Yeah. Okay.
>> Yeah. Yeah, it's on Steam. Defense of the Oasis only for your PC sadly, but um you know, someday maybe we'll get it on your Mac and your your tablet again.
Thanks to Proton, it's also on Linux. I bet I bet it'll run just fine. Yeah.
Anyway, >> I think it's okay on the Steam Deck.
>> Yeah, it probably would be, >> but Okay, so after that, >> after that, Yeah. So, I was CTO of um Mind Software for 10 years. It changed its name a couple times. We did all kinds of things, a lot uh indie stuff, mostly work for Hire. We did an educational firstperson shooter. We did a uh we did an Advanced Wars clone for the PlayStation Portable. We did um we did the first implementation of the online version of the Pokemon trading card game.
>> Okay.
>> Um uh and also the Kaijudo trading card game for Wizards. Um and we did a bunch of stuff until basically a company went out of business owing us a million dollars. Um and that you know we sc we scrambled for a while. Um, and but then, you know, we closed our doors in, um, 2014. Um, I did a startup for a little while. Um, uh, and then I joined another small indie outfit called Riot Games.
>> Yeah.
>> Um, where >> much like the band Oasis, very obscure.
Some folks out there may have heard of them thing. Um, yeah. So, I actually I'll talk a little bit about my riot career. I I have never actually worked on League, which is kind of unusual for a guy who's been there for 14 years, but um I started in a small outfit called or a weird unit called uh Riot Shorts. Um which doesn't exist anymore. Um but it was modeled after Pixar Shorts and it was trying to be like let's make brand expressions that are games. Um and uh yeah, let's make brand expressions that are games, you know. So um you know where I just music videos and stuff like what if the music video was playable >> playable in some way. Yeah.
>> Some way you know. Um so yeah we were doing small games and um I can't really talk about what I was working on there because it was never relieved but that unit did release two things. One was a mobile game called Blitzcranks Pora Roundup which was basically an Atari 2600 Stampede clone. Okay.
>> Um for mobile and it also released the board game Mech versus Minions. Um so I I did that. Uh, I so I was been I've been working at Riot um for 14 years.
I'm in R&D now working on future games that are not yet announced. So I really can't talk much about my Riot career even though it's been quite long. But um All right. Well, that that's a good that's a good like capsule summary. So now I'm going to I'm going to push the giant rewind button.
>> Okay.
>> And hop all the way back to to Ultima Underworld.
>> Sure. So, uh, let's talk about entity system stuff because I feel like one of the really interesting things about our conversation last time was just that >> everyone everyone talks about entity systems, but actually like you're one of the few people who's actually thought about them at this at at the level of depth uh that you have, right? like a lot of people it's more just like I'm just trying to get this thing that sort of works to do like basic stuff but for you this is kind of more of a >> I'm not going to call it a lifelong passion that might be a bit overstatement but like you've definitely gone way deeper into this particular rabbit hole uh than than most people have. So maybe you can talk a little bit about the entity systems at that time as you remember them and sort of bring us up through you know kind of the the part where the entity component system happened. Not that that's that important in any particular way, but just as a as a benchmark of like your thinking at the time.
>> Sure. Well, and you know, and you got to understand >> in historical context, right? You got to understand things like the hardware of the day.
>> Yes.
>> Right.
>> And also the infancy of G of of real-time game design.
>> Yeah. And the infancy of real time Yeah.
Yeah. All of that. You got to understand all of that. and and and one of the things that was um you know so at the time we're working on Underworld um uh now I don't know if this story is true but um uh supposedly like uh you know so uh looking glass had like a demo of a Wolfensteiny like thing um in 1990 >> uh something like that uh you know and basically a year before Underworld came out and also a year before Wolfenstein came out.
>> Yes.
>> Um and the story goes, you know, I don't know how much of this is true, but and I may get the details wrong, but um the story goes that um uh Paul Nurf and John Romero were like on a plane together. Like they happened to be on a the same flight and sat next to each other and had a talk. Uh I think it was Romero. It might have been Carmarmac, but it I think it was Rome.
Um, and you know, and they knew each other and and and you know, hey Paul, what are you up to? I'm like, we're working on real- time texture mapping.
How about that? Um, and Ramire's like, oh, fascinating, fascinating. And, um, you know, and then so they part ways and then uh, you know, Romero McCormack go off and make Wolf Wolf 3D. um which was basically what um basically what the the demo that Looking Glass had like a year earlier. Um but looking glass was, you know, didn't really want to make the the obvious thing you do with this is you run around in in and through walls and shoot things, right? They wanted like like wanted to try to do the world that supported that, right? like a world that could like really make that come alive, right? Which meant you know AI behaviors and you know and RPG elements and you know you know cool lighting and you know all that stuff. Um looking glass is kind of famous among those of us who like observed it more closer to the inside but weren't there. Right.
>> Right. It's kind of famous as the place that always like bit off way more than they could chew and as a result were not as successful. Like because they always tried like they had the talent to do something that would have sold really well.
>> Right. Right. Right.
>> But they always were like but we want to do the thing from like 10 years from now. We want to do ship that today.
You're like guys you CAN'T LIKE LIKE WE'RE NOT THERE YET. Doesn't matter how smart you are. No one can do that.
Right. And this was just that was a sad fact of looking glass. But the the plus side of it from for the industry was that it was always a place that had all these really cool firsts that people took from, right? I mean many people kind it inspired a lot of people to watch those things happen, right? And they did have successful games as well.
So it wasn't like they didn't. But anyway, just putting that context out there for people who don't know.
>> Yeah. And also though, like the reason why Thief is not Skyrim, right? Like the reason why Thief was not like, you know, a huge storydriven openw world, you know, extravaganza with like complex inventory management and, you know, lots of different, you know, nonlinear choices and was more like a do the mission kind of game is was looking at us trying to get back to the not biting off more than they could chew. Um, and it's it was still too much, right?
Um yeah, so let's talk about but let's talk about the hardware, right? Um so the hardware that ran um Ultima Underworld 2 was like, you know, the 48650s, like the 50 megahertz 486s were dropping. Um I don't think the local bus architecture was out yet for Underworld 2. Right.
>> Um and so the other and so you have these 48650s and you have um this basically uh 8086 architecture which was never intended to last this long. Right.
So and the the thing about the so the 886 is basically what the original IBM PCs were. Um and um later they were 888s. Right. Um so this architecture had a segmented memory model right where um pointers generally speaking were 16 bits >> um and you had a segment pointer which told you which so so now you have a 64k addressable space right and you had a segment pointer right which told you which of those which was it wasn't even another whole 16 bits, right? It was like um it was effectively another four bits, right? Cuz it was 16 bits, but there was overlap, right? Um and it like it turned out it like with the segment pointer by moving the segment pointer told you which 64 K you're looking at right now, >> right?
>> And then you know you could use your pointers in that. And so if you wanted to make a big pointer, right? like there was a far keyword in the >> yes >> you know far star in the C compiler that told you that this wasn't a 16 bit pointer this is a pointer that had its segment address in it also um but even if you did all that you had 20 bits of addressable of address space so that's you know that's that's one megabyte right >> yeah not all of which is usable also because a bunch of it's like reserved for like But if you will look at the back of the box for uh for Underworld one and two, you will see that the the they require two or four megabytes. I forget how exactly what it is, but it's more than a meg, right? It's more than and really in practice it's really 640k that you have addressable at once. Um, and so there was a whole other um a whole other like set of hardware to let you like move that one megabyte that window like so there was like an a 64k window inside a one megabyte window and then you had a way to move that oh I think the bottom 64 640k were always the same and there was a way to like move the rest of the window around or something. Um, this was extended memory, right? Um, and so yeah, you couldn't address a lot of memory um at once, right? So, um, heap allocations were kind of at a premium, right?
um you wanted to um you really wanted to uh you know pack your stuff, you know, like you didn't want two blocks for a two memory blocks for an entity. You wanted one memory block for an entity, right?
>> Right. Um because you wanted to get the whole thing at once and not have to like move your window, right? Um, so you know, the entity system of the day was basically a fat array of, you know, every entity is um, I'm going to guess 256 byt block. Um, and uh, which meant that it was a giant union, right? Like, you know, cuz different kinds of things needed different stuff, right? Like if if the entity is a creature, then it's going to have to have some state about what its brain is doing. And the aforementioned, you know, severe memory constraints like we do not want to have to like, you know, hop hop around through memory to get this thing also means like you're trying to keep that as small as possible. So you have to use unions. You can't just be like, well, you know, every entity has, you know, a a modifier for how much, you know, attack damage it has because if there's something that doesn't attack, we probably really wanted to use that place for some other value. So, you really have to erh it says it's another 8 bits or something. Who cares? Or heaven forbid another 32 bits. Forget that. Like that's not that doesn't fly right in this era. But so um uh another example is uh yeah and so another thing is like you know you have like the bottom 640k was kind of sacred um and you had to be like really really strict. I remember I will never forget the day that Doug Church to me said, "Mark, if you save two bytes a thousand times, you've saved 2K, right?" Like, >> "This is accurate."
>> You know, he was like, he was like trying to impress upon me like the importance of, you know, every bite counting. And um and it's possible. I don't know if this was what I was looking at at the time when he said that to me, but so in uh Ultima Underworld one, there was a um a spell you could cast which would teleport you. Um and the way you chose where but it where you teleported to was there was an item >> uh I think it was called the moonstone or the rune stone or something. There was a magic stone and there was a spell called teleport to magic stone. Okay.
>> Right. And um you could leave the the you could literally leave the magic stone anywhere in the world and it would teleport you there, right? Um and so it could be on another level, right? Um >> okay.
>> Right. And so um this was the way this was implemented was um and and this will impress upon like the premium of memory. The way this imprinted is there was one bite in the bottom 640k which stored the level number that the stone was on. So when you cast the spell, we would load that level, search the entire level for the stone, and then teleport you there, right?
>> Because you couldn't afford to store >> you couldn't store the actual location of the stone, right? Yeah, like one and you know and if they probably probably I mean there were only like eight or nine levels, right? So if they could have found some use for the upper four bits of that, they probably would have.
>> Okay.
>> Right. Um >> uh yeah. So like that's an example cuz one of the things we did in Underworld 2 was we changed it so that um there were two stones and when you cast it on one it took you to the other. So I expanded that to two whole bytes or maybe I did pack it into two again.
>> Yeah. Yeah. Maybe then maybe that was the time that was the time for I don't remember. Um >> okay >> I don't remember that but yeah. So so like this is the world we inhabit, right? So um >> things are a 256k uh 256 byt block. Um and you know maybe there's some common stuff like position.
Almost everything's got a position. Um, lots of things have a velocity. Yep.
>> Um, you know, and there's one bite for your species, right? Like one bite for like what kind of thing are you?
>> And that's sort of like a type field, right? Like it's like just just who, you know, anyone who needs to like switch on a behavior can right? You're switching on this bite.
Maybe there was a sub subtype second bite, you know, or something.
>> Um, >> yeah. So, um yeah, that that was kind of and you know and in my uh my uh talk I I talk about you know there was a um the story of I introduced a bug where you know a lantern vanishes when it hits the wall because um I implemented impact damage and lanterns don't use their hit point bite for hit points. They use it for fuel and so oh it was only an empty lantern. If an empty lantern hits a wall it dies. Um because took damage. Yeah.
>> Yeah.
>> And yeah, I needed to check whether like the, you know, this was of a type that had hit points.
>> So does this mean if you threw a lantern at a wall that was fairly full of fuel, it would just fall down and when you picked it up, it had less fuel.
>> Yeah. Yeah.
>> Probably. I'm guessing. And in fact, and in fact, I'm pretty sure >> I did I just like I knew about that and I just didn't think it through. Like I was like, >> okay, >> you know, I was like, "Oh, should I should I deal with like what about oh, this bite its hit points or its fuel?"
>> Like is it okay if you lose some fuel if you hit a wall? Probably. Yeah.
>> Yeah. A little spills a little, right?
Like, you know, a torch, you know, gets a little busted, right?
>> Um, and I just didn't think about the case of like, could you die?
>> Um, >> yeah. Yeah.
>> And it would vanish because it had no it just vanish immediately because it had no death animation or anything. Right.
So, this is kind of um I guess at this point would it be correct to say that probably none of you are thinking all that hard about entity systems because really you're just focusing on like look I just have to try and fit stuff into this thing and during the development of those games you're just doing whatever you can or are you already even while doing that going like hm should this be something we like cuz I don't know I mean I I really don't know what was your frame of mind then? Did did the did the concept of thinking about these more broadly only happen later or were you already in that mind?
>> Well, no, we definitely needed the idea of um you need sort of like the capital E concept, right? Like we called them objects at the time, right? But you need that concept >> because you know you need a thingness like you need a concept of a thing, right? so that you can iterate through this world and get all the things, right? like you like you need you need some unifying base class for lack of a better word um for you know you know like there's geometry and then there's you know there's training geometry and there's things right okay and you need some way to like talk about things in the abstract right >> um like spec and species of things in the abstract right so um one of the things that happened a lot in um in systems like and this goes back way beyond way before uh underworld in in like ultimate games um and things like that. One of the things that happened a lot was um the authoring tools for logic would be built out of these entities, right? So like um kind of like if you think of it like you know redstone in Minecraft or like a little bit like game builder garage if you've ever played with that um where you know the way that you know like oh it's like oh I have a button entity that open and a door entity and the button has the object ID of the door it opens um and it's like oh and now I want to have a multiplexer entity because I want this button to open two doors Right.
>> Right. So like instead of the button points at the door, it points at this multiplexor entity which knows how to point at multiple things. Right. And then you have this like generic idea of an actuator. Um and you know that can you know and you can have andgates and orgates and exorgates and all that stuff. people kind of end up recreating computer logic inside the entity system just out of necessity cuz like designers want to be able to edit it in whatever tool they might have or using whatever utilities they happen to build makeshift or something.
>> Right. Right. So rather than Yeah.
Rather than like opening up some editor and typing in text in a scripting language or you know typing in code, god forbid like because you don't want to ever rec compile. Um >> right.
Um you would yeah you would build like there was a lot of logic that was built out of these you know what we called the trap trigger system right which is like you know there's entities that are triggers there's entities that are traps you can have traps that are also triggers um and all that stuff. So, it's like it was very easy to like, you know, oh, there's a switch that opens the door. There's a pressure plate that's opens the door. There's a, you know, something else that opens the door. Um, you know, very, you know, very easy to um to build that stuff out of, you know, and it's similar to like what they have in like with Redstone and Minecraft or with um other things. I don't know if you have you ever messed with Game Builder Garage at all.
>> No, when you mentioned that because obviously I I was familiar when you said Minecraft Redstone. I've never used it myself, but I'm aware like I've seen what people do with that and kind of the idea of it. Uh, Game Builder Garage doesn't sound familiar.
>> It's a Nintendo product. It's a Nintendo make your own games product. It has an awesome tutorial.
>> Um, but it's approach to games. Its approach to like authoring is less like, you know, Scratch. like Scratch is a very procedural plug blocks in and and you know and things follow a linear order and there's branching and loops and you know very programmy languagy.
This is much more like a um a circuit model or a mechanical model where you know it's like you so for example you can have a box which is a character and the character might have an input pin that's like um that's like you know horizontal movement and then you make a box that is the left analog stick and you wire it up right and now the left analog stick controls horizontal movement right like and you know so It's like it's more like there's things that emit signals and there's things that know how to take signals and and so over time this thing is simulating right >> kind of a little more blueprinty maybe. Uh well blueprint again is still an imperative execution thread whereas this is more like you know this is just a box that's like >> okay it's just flowing the stuff right and yeah this is just a box that's generating a signal you know got yeah so it's more like electronics right like or analog electronics almost where you um and it's pretty fascinating um way to think about but it's kind of similar to what like the the trap trigger you know where you build and build logic out of entities So at this time on on underworld like two with the entity systems are you guys starting to think so you are thinking of this sort of as a system like you you are kind of aware of that whole thing you're not you're not just like this isn't just an organic thing that arose and no one's really paying attention like no we we get that but are you are you starting to chafe against it as well are you like >> no I mean the whole union thing >> you're all thinking like this is kind of crappy we want something better we we on the next time like you're having that feeling already on >> too. Yeah. Yeah. So, um Yeah. Yeah.
We're having that feeling and we kind of bring it to bear in system shock. Um so system shock you know like is the first time so we have you know this horrible memory model right this where we have like the smaller window inside the bigger window right inside the whole RAM right um which is terrible right and then DOSs extenders happen um and DOSS extenders are things which um run on top of DOSs and let you have the full 32-bit address space mostly by like doing the uh window moving for you. Um although I think maybe uh there's other things going on. I think the the CPUs are starting to have Yeah, the CPUs are starting to be 32bit now and they're having like protected modes and and and and things and so it's doing tricks to like page protect and move windows and stuff. Um, so you have a 32-bit operating system, uh, 32-bit address space finally. Um, so you can have more blocks and and and and do more things.
You still, you know, don't have virtual memory. Uh, you still, you know, um, are you still only have the RAM that you have um, and all of that stuff. Um, so yeah, for System Shock, we were really chafing against the union stuff. I we didn't do I don't think we did any unions in System Shock. I could be wrong about that. Um, but basically what we had was uh one block for the common stuff that all entities had like position and maybe velocity, I'm not sure. Uh, species definitely. Um, uh, type. Um um and then um we had for like each you know if we if you have like this you know this type space right you can imagine that's organized into like you know um genuses and families and you know and orders and um and so like you know there was some strata of that um like you know like like say let's say at the film level um we had um just arbitrarily like you know so we had like species and we had fila right and each film had >> its own block represent its own schema right so >> okay so if just to translate that a little bit so basically what you're saying there is I've got a type field the type field is or species field in in your in the parlance of looking glass >> that's my parlance I don't I think we probably >> or whatever it was yeah whatever it Most of the time we have a field and it's got some number in it and that number is going to tell you something like specifically this is a cup, right? Like it's like it's like this cup, right?
Right.
>> And we probably don't have a separate block type just for cup, >> but we do have one for like >> household objects.
>> Small. Yeah. Small objects that contain things or what like there's some there's some kind of category.
>> Was probably actually cup was probably in the trash category, right? But all right.
>> Yeah. So like yeah, so we have like some highle things like weapons and monsters and um you know probably a couple other things, right?
>> And so everything of type cup has one of those blocks because it's in that general thing, but all of the different things like cup and thermos and whatever, they would all have the same block type because they're all under that film. Only monsters or whatever that and some other one get a different block type.
>> Right. Right. Right.
>> Okay. Got And so there's like one big array of the common blocks, right? And then for each each category, there's a big array of the blocks for that category, right? And so like you look at the common block to see which other block you're allow you should be going and getting, right? In fact, I think what it had was, right? So you had your object ID maybe had some extra bits in it, but it had an index into this big array of all the blocks, right? And then inside there was an index into the array like your type and an index into array of your category category blocks, right? So like you would go to the main block and then you could reference into the category block and that allowed us to you know have you know some things had bigger, you know, had a bigger block size than other things, right? Like the trash objects maybe they're block maybe they didn't have anything, you know, like I don't know, >> right? Like they just don't because you're just trying to save space. So if I don't Yeah. So I guess I have a couple questions about that that I in fact one of them I guess we didn't really talk about when we talked last time so I'll ask it this time.
>> Sure.
>> So one of the interesting things to me too is like um in our in our previous discussion we did touch on sort of like you kind of have a different a little bit of a different take on object-oriented programming. In fact I quoted you in the lecture saying like like why does it have to mean this thing? Like there's a lot of ways we could conceptualize it. There's a lot of people have conceptualized it. Maybe there are better ways. Um, I want to touch on that a little bit because one of the things I've noticed that doesn't get mentioned at all in like your description of of underworlds uh entity system in your description of system shocks, there really isn't a lot of discussion there of like the the sort of thing that a lot of people would say about object program where everything is supposed to kind of be opaque like you're not really supposed to be looking at types. You're just supposed to have like blind dispatches and stuff, >> right? Right. Could you give me a little bit of your take and also maybe the looking glass take in general on that part of it cuz it sounds like everything is still like I write some code and I know the types of things like I can look at their types and make decisions on them and things like that. Can can can you just do you understand my question?
I hope it's not phrased too strangely but a lot of people think objective programming means I call a function and I don't know what the type is of the thing and that's what it means. Right.
Yeah.
>> Right. Right. Right. Um I mean well some of it is you know the time right um >> we uh aren't using C++ the system shock is 100% in C um and you know and we don't we don't have space for vtable pointers I mean we got more space but we don't like and the other thing is like we want to be able to do things like clone objects right and do things like that and it's really you know and serialize and save to disk and load and we want to do very simple block copies of stuff like that. So we don't have any pointers inside, you know, our object database.
Um, and we certainly don't have any vtable pointers uh inside our object database. Um, uh, but um, and I yeah, I think that's a big part of it. Um, there's probably um, some stuff around um, I'm trying to remember. So like uh Underworld 2 is right when instruction caches start being a thing.
Um uh so in fact Underworld Oh maybe Underworld one is right when instruction caches like Underworld one had a bug on later hardware that had instruction caches because they did a lot of self modifying code, right? Um like just stuff like you know you have a switch you know and instead of you know doing a lookup in a jump table and doing an indirect memory access through a jump table to get your address and jumping with that addressing mode. like you laid out your things in, you know, you laid out your jumps in a table, you know, in in regular spacing with no ops if you had bad with no ops if you had to. and you just um you know and you just did arithmetic to figure out your address and you self modified a jump in like the next jump based on some arithmetic you know and you just jumped straight there cuz that was way faster than doing a you know uh a condition branch or anything else, right? Or doing a table lookup or anything else. And um you know there are times when we needed that uh in the renderer uh and yeah and it broke it broke as soon as instruction caches right and now all of a sudden like we have to invalidate the instruction cache and we don't get the performance anymore right um >> but yeah so there may have been there was definitely it was definitely of an era where um jumping through uh indirect pointer was more expensive than jumping than a straight jump. And like that was a that was a real savings, right? Um so yeah, like we weren't we weren't doing a lot of function pointers. Um in general um like in some places we were probably but uh we weren't doing it a lot. Um and so yeah uh the sum of it was just that constraint. Um, we kind of went hog wild in Flight Unlimited. Flight Unlimited was our first C++ game. Um, and we kind of went hog wild and it bit us in various ways.
>> Right. Yes. I remember you talking about how there were a lot of issues because since it was the first C++ project and people weren't prepared for the downsides.
>> Well, I'll tell you the I'll tell the um the heap fragmentation story.
>> Yes, please do. Yeah.
>> Um, so right so we're still we're using C++ but we're it's still DOSs, right? We still don't have virtual memory. Um, so we got what memory we have and we discover but you know we're using C++ and everyone thinks that when you use C++ you're supposed to or at that era anyway you're supposed to use the new operator a lot right like you know you just allocate stuff and you know uh that's how you make objects right you use the new operator and uh yeah so um we had a lot of little blocks uh in the heap and um we fragmented the heap and you know we got to the point where there There was enough free memory for the thing that you wanted, but it wasn't all contiguous, right? And you couldn't Yeah, you couldn't get that block. You couldn't allocate that block. Sorry. You couldn't new that object because there wasn't enough there wasn't a big enough single block for it. Um, and so we spent a little time trying to figure out if we could like rearchitect around something better, uh, and failed. Um and maybe there was time pressure there, but um so the answer that we came up with was um basically when you land the plane um uh so back in the it's still DOSs, right? Which means that the way you launch the game is you go to your C prompt and you type flight, right?
>> Right. You know, >> and you push enter, right?
>> Right. Um, and you know, most of the time, you know, that finds flight.exe, runs that, right? Um, so what we ended up doing is we changed it so that instead of flight.exe, it ran flight.bat, flight.bat was a batch file that ran the.exe, >> okay?
>> Um, inside a loop. Um, and so what would happen is when you landed the plane, we would like do we would like do some inspection of the heap to decide if we were too fragmented. Maybe it was just like we call Malik with increasing sars.
I don't even know how we did it, right?
Um, but we like did some check to see if the heap was too fragmented. And what we would do is we would if it was, we would exit the executable with a special instruction and a special return code.
special instruction like told DOSs not to change the frame buffer like we're exiting but leave the frame buffer where it is >> right like don't switch out of mode 13 or whatever like stay whatever the mode was >> yeah whatever the mode the graphics mode we were in and leave what's on the screen on the screen and we would exit with a return code the batch file would see that return code and say oh this is a heap fragmentation case and then it could loop back around and relaunch the executable. Meanwhile, you're looking at a loading screen with no progress bar, right? Like you're looking at the loading screen with no progress bar and it would relaunch the executable with a new return code saying you're coming or a new command line parameter saying you're coming back from >> Yeah. Okay.
>> you're coming back from a a refresh. So like don't put up all the loading, you know, all the starting loading screens or anything. just kind of silently sneak into the, you know, uh the FBO, the landing the plane, uh interface. Um and then we um you know that so that's fine if you ever land the plane, >> right? Um so we did and then we had to do another thing where you know what if you just flew the plane too long.
>> Yeah. Right. Yeah. So, we did another thing where like we would just occasionally like check your heap fragmentation status and if your heap was fragmented, we'd say we'd like put a message up on the screen and say like out of gas emergency landing and we would land the plane so that we could go through that uh that flow of like exit secretly exiting and restarting.
>> I wonder if anyone has a capture of that. I I imagine no one I don't even know how often it happened. Like I don't even know like >> I'm sure it's very rare cuz like I don't think I've I've rarely seen anything talk about that. So presumably and certainly it would never happen on a machine from today. You'd have to run it under like cons like you tend to set the DOS very small or whatever, right? Like memory footprint.
>> It probably only runs a doc box. Anyway, so >> sorry to interrupt real quick. There is one thing I wanted to insert here that happened after the interview that I think is kind of remarkable and I just wanted to share it with you. Um, one of the things I try to do a lot of times is I try to fact check things as much as I can. And when I was doing the presentation for the big oops, of course, I tried to use primary sources that corroborated each other and just, you know, I didn't want to present anything that didn't actually happen.
Now, if you saw that presentation, you know that there were a bunch of slides that I went over quickly during like a Q&A when I was asked a question. I said, "Oh, I've got some deleted scenes here I can show you." In those deleted scenes, there was a thing about the Flight Unlimited sort of out of fuel thing uh that Mock had told me in the original interview. And I didn't fact check it at the time because I had cut those slides from the presentation. They didn't quite fit and I felt that there was too much information about things that weren't directly related. So, I had removed them. So, I never actually tried to fact check whether this out of fuel thing actually happened. But now that I'm presenting this, you know, video with Mox telling the whole story and he's talking about the Flight Unlimited thing, I wanted to fact check it. So, I went and looked at the CDROM, uh, the original installation CDROM for Flight Unlimited. I couldn't find any evidence of this. So, I just asked Mock. I was like, "Are you sure that this was the case?" Uh, I just did a cursory check of the CDROM and I couldn't find it. And he was like, "Hm, I guess I don't know.
like maybe it got fixed before shipping or maybe that's not the final CD. Let me ask the Looking Glass alumni sort of, you know, mailing list and see if anyone can remember. And he only got some vague replies like someone was like, "hm, I did reduce the heap footprint a lot just before shipping. Maybe it got fixed so we didn't ship it. I don't know." So, no one was really sure. But Mach then actually went he act he he had a Flight Unlimited in shrink wrap uh that he happened to still have. He opened it, got the CD out, actually ran the installer in like a dossbox and looked at the final install and there is the batch file. In fact, this is the batch file right here. So, we did actually fact check this even though it's hard to find. You can't really search for this on the internet. It doesn't seem to be a record of anyone actually hitting this or knowing that they hit this. I guess it was hidden pretty well. Um, but here is the batch file. So, it really did happen this way. They did have to ship a thing with a batch file that just would run Flight Unlimited in a way that would sort of fix that that heat fragmentation. And so, anyway, shout out to Mock once again for going the extra mile to to make sure that we're putting out accurate information here. But it is exactly as he remembered it. We did check and there it is. Anyway, now back to the interview. So going back to the entity systems then. So uh on system shock you kind of and this is sort of a solution to the unioning problem, right?
It's like look, we had these, just to be explicit, we had these problems where like we had to like do all this unioning, which presumably, like you were talking about before, makes it very easy to make a careless error because you're like, oh, I forgot that this field won't be there if I'm not this type of entity. And it's hard to catch those bugs sometimes. It's, you know, because you don't know which kind of entities that will end up this will end up this function will end up being called on. It's like hard to think of them all. Or someone else adds a new entity type that you weren't aware of.
All those sorts of things. So the idea here behind the system shock one it's right I think is twofold. It's one make it easier for the programmers to not have to like be so diligent to avoid that kind of error.
>> And then two was also just to be a little more efficient cuz hey like like you said if monsters need this big block of memory let's say cuz they want to store AI state or something. Now we don't have to have every entity in the game be that big. We can sort of flexize our different film as you called them.
>> Right. Right. So monsters could take up a lot of memory and trash could take up very little and that allows us to scatter trash throughout the level without paying the cost of a monster and and vice versa. Is that roughly like kind of >> Yeah. You know, I wonder if we were also I don't remember, but we might have also been doing a thing where it's like, oh, now we can iterate over all the monsters, >> right? Okay, >> we have a we have a flat array like so it's like oh it's it's AI thinking time in the frame, right? I don't know if we actually did this, but it's AI thinking time in the frame. You know, it's it's it's bot it's bot behavior time. Let's run through all the monsters and maybe the monsters had a point. They must have had a pointer back to >> I was going to say they that would require you to store a reverse like some kind of reverse >> look. I bet they did though. I bet we did. And I mean, you know what you and you could have done it selectively like trash which probably never got iterated over wouldn't have to have one, right?
But monsters if they did would. So you could have done it.
>> We might have done that for a couple things. Yeah.
>> Someone who who's someone who has the system shock source code out there. Can we look it up?
>> Yeah. I don't know where I Yeah, I don't know where it is.
>> Um Okay. So So that's up through System Shock. And in a sense that means the System Shock entity system is not like a huge departure from Ultimate. It's sort of like a natural like upgrade, right?
>> Yeah. It's like a little bit of an upgrade. Yeah. Yeah.
>> So, then we go Flight Unlimited is not really an entity system kind of game.
>> No. No. We had one entity.
>> There's Teran Nova, which happens in between here in Thief, but you weren't on that or were you?
>> I was on it briefly. Okay.
>> Um, but Terteranova, here's the thing.
Teranova started during Underworld 2.
>> Really? Teranova was a four-year project, >> which at the time, like nowadays, people are like, "Oh, it's the GTA 6 has been how long?" Yeah, four years was massive back then.
>> Four years was massive, right? So, Terteranova came out in 96, I believe, but it started in '92 or 93.
>> Um, >> so it might have had an underworld. I think it I think it had a I think it had a very similar to system shock >> um kind of thing where it was like there was uh you know the big block you know the common block and the >> you know other things.
>> Okay. So system shockes like similar >> system shockes it was definitely not um it was definitely not anything like what we were doing in thief. Um >> so then let's talk about thief. So >> this is the part where the entity component system kind of gets birthed a little bit for the first time. Uh so how does this happen? Like >> I remember you you actually when we talked before you remembered quite a bit of it. I think you said there was like one or two places where you're like I'm not sure exactly who the person was who thought X but like can you walk us through that process again since no one else but me got to hear it. Like >> why are like why are we thinking about this? Like what how why weren't you just like, "Oh, we'll do the system talk one, but now we'll maybe let people have two block like why is it not just like we made another site upgrade?"
>> Definitely. We um were um we were definitely feeling constrained by the film, you know, SK architecture, right?
like we were we were feeling like you know like uh you know having to make an upfront choice what the categories were um was really constraining and I'm sure we ran into cases where um we wanted to have in essence a toaster oven right like um where you know it's both a toaster and an oven right it's not it's not you know it's not an oven that right, you know, provides the toaster interface. It's not, you know, a toaster that provides the oven inter. It's like both a toaster and an oven, right?
>> Gotcha.
>> And um uh yeah, definitely. And we really felt like um that was very limiting uh in terms of uh the decisions you could make, the kinds of things you could make and just anything where you know you wanted something to have the properties of something you know of another film. Um you kind of either had to like have it be two entities that are talking to each other or um you know fake it somehow. Um but you know we I think we were really um feeling constrained by that. We were feeling less constrained by the memory model, right? Because we knew we were Windows now. We knew we were Windows 95.
We knew we had virtual memory, >> right? So you keep kind of as we go from like underworld to System Shock to Thief, we we're getting more like hardware support for the kinds of experiments you might want to do, >> more platform support for the kinds of stuff that we're willing to do. Yeah.
And so just the idea of being able to um mix and match, I think that, you know, I think that Doug uh and Dan Schmidt um was very very interested in that. I think Tom Leonard um who was now on the scene was very interested in that. Um uh and yeah and the memory constraints were different.
Um and we realized also we could um instead of having flat blocks like instead of having like big arrays we could multi-pool right? So we could you know we could have pools of uh of blocks rather than you know flat arrays of blocks. And you know like a pool could have like multiple virtual memory pages into it in it. So we didn't have to, you know, we didn't have to like constrain ourselves to a fixed size per um yeah, I think the fixed size constraints were were we were chafing against and I definitely think the like inability to like mix types um we were we were chafing against. Um and I think some desire to, you know, make it less hardcoded, right?
I think last time we talked you said like author like that was a big thing was like you wanted to provide the people like at the time when you're like working on a level >> you could just without having to go ask a programmer >> decide you wanted the toaster oven cuz the programmers had implemented toaster and they' implemented oven >> and you shouldn't have to ask someone to get a toaster oven was kind of like >> yeah I mean that that that's that yeah and that was a big part of it and so another thing that we're laboring under um and and Maybe also because we're now in C++ um instead of C. Um we're laboring under um longer compile times, >> the bane of C++. Yes.
>> And we're laboring under very long link times. Yeah.
>> Um so, um we definitely had um we definitely had a desire to yeah to like do as much as possible between recompiles, right? Um and so we didn't want to have like the, you know, we didn't want to have like the global list of all, you know, like the the one or two bytes that are all of the species that ever exist, right? right? We didn't want to have, you know, like the the like the global list of all the types um and uh uh and and stuff like that. And we wanted Yeah, you to be able to do as much as possible. Um uh we certainly didn't want designers compiling.
>> Um >> Right. Like they want to add a new entity species ID and we have to recompile the whole game is not >> on the table anymore. Right.
>> Right. Right. So we didn't want them we didn't want them comp and they you know and they would just suffer in the earlier days. Right. like they would just like wait for somebody to compile a new editor for them, right? Um and we wanted to, you know, less of that. Um so and that that was um that was a big deal. Uh doing less of that. Um so yeah, we wanted something where every, you know, designers could just author the whole thing, uh including the type database, you know, um uh including what what existed. Um and so and we knew we yeah we wanted to be able to like you know make entities out of Legos of some kind, right? Rather than um you know uh describe uh describe everything uh up front.
Yeah. Yeah. And that kind of lend us to Yeah. That led us to the property system.
>> So how does this come about? like you're, you know, you come off of system shock. You know this. I mean, you've all been experiencing these things that you're saying you don't like, but like somebody has to do some like somebody has to sit down and go like, "Okay, well, I guess we're going to try some stuff now." And what is that, right? And so, how does that process go? Right.
>> Um, yeah, that's a good question. So, for one thing, we're not coming off system shock, right? Like we're coming off of we're coming off of Flight Unlimited >> Unlimited and Teranova >> and Terteranova.
>> Yeah.
>> Right.
>> So System Shock's kind of back in the It's like we remember this, but that was not what we just did. Yeah.
>> Yeah. Yeah. And so so you know we so we have Teranova which is like you know a four-year-old code base at that point essentially. Um you know it's a four-year-old architecture that you know we're trying to get out the door. Um, and we have um, uh, flight, which was like our, you know, first adventure into C++ um, with essentially no entities, >> right?
>> Um, and, um, you know, so we do have, we did have like a little time to think about this stuff, right? Like how we would do it. Um, right? Because there's no obvious entity system to now just take and use. Like there isn't like a thing like oh we're just gonna roll this forward. It's like >> yeah because system shock is in C >> right and flight doesn't have entities.
Terteranova is in C.
>> Right.
>> Right. Um >> and four years old >> and four years old. Yeah. Right. So like there's no Yeah. There's no there's no way to bring it forward really. I mean unless we want to write the write Thief in C which we didn't want to do. uh also like you know which was you know directx is becoming a thing and you know like we're having to start to think about um you know calling into a com interfaces and you know stuff like that so we kind of wanted C++ anyway um and we wanted to work with it right like we wanted to be able to like you know make you know like make subasses and have polymorphism and do all the things that you do with you know those kinds of programming languages. um we just didn't want to do it in our entities. Um uh yeah, so yeah, I think this idea of like, hey, let's make something let's make something mix and matchable. Um let's yeah, make something where uh you know, a thing is a bag of properties, you know, bag of of of blocks rather than a flat block. Um and is there a touchstone for that anywhere? Like I mean I I'm asking this question kind of very vaguely, but you know there's stuff like infocom games where we've got this lisp system and there's just crap attached to a list of right.
So uh and I bring that up only because like Dan Schmidt for example is very like lisp kind of programmer sort of like >> also the interactive fiction guy.
>> Exactly. And maybe maybe that's maybe he got it from there. I don't know.
>> Yeah. So is there is there like that isn't the direction you end up going but I know that there were actually experiments with that in there. So are people thinking like oh maybe we'll do bag of properties maybe we'll do like like how does that look or can you not remember? I guess it's a long time.
>> Yeah. I don't know that I can remember exactly. Um but we we knew that well I mean I think you kind of get it from first principles right. It's like it's like if you know that we're not going to have film blocks and you know that we're going to you know allow things to mix behaviors, right? Then basically every every behavior is its own film, right?
Like at that point, right? Like >> um and like where do you go from there?
Um, and I'm not exactly sure I want to I kind of want to take credit for uh I can't 100% be certain with this but I kind of want to take credit for uh proposing the column na major nature of it. um where instead of you know um yeah Dan did an early version of um >> Dan did an early version of the object system um that was still a little bit like there was a global block e um >> okay >> um and I think I kind of pushed back on uh let's try to do something where it's column major by which I mean you know rather than um the entity is bag that has hit points in it. Hit points is a bag that has all the entities with hit points in it, right? Um, >> and I suppose you don't happen to remember why you wanted to do that cuz that is the most unusual aspect of this system that most people don't try.
>> Yeah, I do think that uh that might have come from Doug actually. Um, >> okay. which is uh I mean I think Doug was very passionate about um you know there's just some stuff right there's just some stuff that needs to be in a big array right like like there's just like you know positions you know or you know like there's just like some basic stuff right that like you we don't want to like go looking through a hashmap for the freaking render model for this like that I that was the one definitely that like like Doug was like adamant on like it's like when I when I've got an entity ID and I want to get the you know the the pointer to the mesh right I don't want I you know I want don't want that to be a hash lookup I don't want that to be I want that to be you know a field select an array lookup you know something you know of that that order so like we need to at least support that for at least some things, >> right?
>> So basically Doug is saying, look, you want to have a abstract bag of properties maybe, but we're going to need some solution for how that's not how we get a bunch of performanceoriented properties. And so you're kind of there thinking like, well, >> wait, how do we satisfy these two thing?
Like how do we how do we satisfy these two at the same time, right? Like to give to give Doug full credit, I don't think it was maybe, but I think it was like yes and, right? Like I think, you know, I think that I I I think he was on board with properties, but like >> but he was like, "We have to like >> Okay.
>> Like I I I I think like the default thinking was like, oh, we're just going to have a link list of your stuff, right?" Like, right? And like Doug's like, "No, I'm not searching, you know, link list in the renderer for, you know, the mesh I'm going to render." Right.
Um, and so yeah, I think that um, yeah, so it's like, okay, well, do we have a do we have an authored pre-ompiled block with like the sacred things, >> you know, or do we have something else?
Um, and uh, yeah, so the something else was, you know, we have column major.
Some things can just be array like the, like I said, the mesh reference was a big array. um uh you know and we see you strip off the bottom bits of the object ID and you look in that array and you go right >> um and uh you know and some things like oh there's only three of these you know on the level or only one of these on the level like you know that's you know let's just have a linked list you know um that's fine um and you know and some things you know a lot of things were hashmaps and a lot of things were you know um other or like sometimes it was like Oh, the main thing we do with this is, you know, iterate over all of them, right?
>> Right.
>> You know, so it's a dense array of just, you know, it's a, you know, it's a variable size array of the things. Um, >> and does this come like I guess this is another thing that may be hard to remember in hindsight. Uh, but does this kind of pivot of thinking where it's like oh like what if we tried this column major thing where like instead of always thinking about going getting an entity and then trying to look at what the properties are of the entity, what if we think about our properties first and then say like what entities have this? Does that come as sort of a very um like do you remember that being like oh wow this is kind of working pretty cool like like this works really well now that we're trying it like did did it feel like that or do you remember anything about like that experimentation process of being like oh wow this is really interesting or was it you know like I don't know I just ask >> you like the looking glass biting off more than we can chew kind of thing where like we just knew it was going to work >> and we just freaking did it you know like I could be wrong, but um you know and we put in a lot of work >> to make it look to the designer like it was the other thing, right? Like we put did a lot of work to make it look, you know, you can go into the editor and look at this entity and like browse it like it's a linked list of things, right?
>> Um but we're really like asking every single freaking property in the world like are you here on this entity, right?
>> Um and it's the editor, so who who cares, right? Um, uh, yeah. So, I know I I think that we did some we wrote documents and we did upfront we did some upfront okay design, but I think it was >> I I I don't want to say it was a waterfall, but it was definitely like, you know, >> we're going to build um, we're gonna, you know, you know, build the first we're going to build the first entity map and then we're going to figure it out from there, right? Uh, >> got it. Yep. Okay, that I I understand.
So, it's very looking glass. It's like look, this is just what we're doing.
We're sure it's going to work, right?
It's like like it's like and then just like and then we will make it work.
Yeah.
>> We'll make it work. Yeah. And, you know, so the other thing that was kind of going on at the time >> um was, you know, Tom Leonard was a big advocate for comm um the component object model. um not in the like Olay sense of um you know you're publishing things that other apps can you know use or anything like that but um but you know so if you think about you know these days you have um uh what do they call it um the thing that's inversion of control but what's the other word for what I'm thinking of um >> inversion of a different phrase for inversion of control or Um it's that's not the thing that's not uh like resource location but is uh dependency injection is what I'm thinking. Oh okay. Yeah. Like these days you know we have dependency injection and we do all these like uh like all this fancy stuff right? Um whereas you know the idea of like you know a resource locator you know or um you know uh like it's like oh there's an API there's a global API I'm going to go like ask for it you know and I'm going to get back an interface pointer to this global API and um so rather than like you know I'm you know calling hardbound functions I'm calling through a vtable to get to this glob global API and there's somebody I have to ask you know like to know how is this API implemented today right >> and Tom you're saying Tom Leonard was an advocate for that basic concept >> that basic concept >> we're just going to kind of have providers of these services and we're not going to like they're not going to be like abstract like Olay like oh you know I don't know or can you put it yourself in a word document or whatever but they're going to be basically it's like somebody give me a series of pointers that are this this API please and I don't really care who it is I'm going to call them.
>> Yeah. So there was a there was an application I unknown right there was the app I unknown and you went to it and query it query interfaced it for any partic you know a thing that would be a singleton right yeah >> like the way you got a singleton is you went to this one you know known com interface and that I guess that was pretty common at the that was kind of like becoming the thing at the time. Um and so you know we had a um we had a abstract com interface for properties. You know you could like talk about a property through an abstract interface. You could talk about its blocks as void pointers. You know you could you know do all that stuff right?
So like some of it was like we were interested in this you know you know using things like comm to um things like comm to like get singletons and stuff you know and so like you could go to the property system and ask it hey you got hit points you know or or even like what are all the properties that exist in the universe and get a bunch of comm interfaces and you know that's how you could implement the editor and you know you know all that jazz. Um so part of it is like we were um mo largely at at Tom's uh encouragement um thinking in those terms uh also um and you know so we'd have I property and we'd have like I integer property you know and I you know some other you know I float property and you know you could query down to get actual you know uh typed accessors for you know the common things obviously like for the things that were struck like you um you kind of were on your But um >> and is that something that you consider important to the system at all or not really? Is that just like hey these were two different things we did because it doesn't seem like that's it seems like that's not necessary for the row major part of things or the column major part I should say >> versus well I think I think you need a way to iterate over all columns.
>> Right.
>> Right. Right? You need a way to iterate over colum all columns and especially you know when you're going to write an editor you need a way to um you know like like look at a do some stuff with a column >> right what's the name what's the printable human name for this column that I display in an editor or >> yeah yeah give me the printable human name tell me what entities use it does this entity have it you know like you know give me the you know we had a thing you know we had like a I wouldn't call it reflection but We had like a like give me a um give me a dated description of the fields of this strct kind of thing that I can then use to make an editor um right type of stuff um uh system, you know. So like we could you know like to call it reflection would be like very kind but it was uh you had to like hand offer the data descriptions you know and stuff like that but um we had stuff like that um both for the editor and also for a little bit of like I think even we used it for scripting a little bit maybe um so that like in scripts we could or I think there was something at runtime where we would like use it to like for designer uh exposure of that stuff. So this gets rolled out as part of thief.
Uh and I mean the entire editor is based on it. The the entire game play I assume is also pretty much implemented in this system right it is the whole thing like it is this >> um and I guess I'll I'll uh I'll ask two questions here. My first one is so how do you feel that goes like generally speaking like were you pleased with the I mean both at the time and in retrospect uh or you know >> well I I think we did um we were able to like make a lot of cool stuff and our designers were able to make a lot of cool stuff um without our intervention you know and I think we built a cool game. I I mean it fell short in some ways and we ran into some kinds of pain.
One of the big kinds of pain had to do with um binary files, right? like you know everything you know it just back in the day all of our levels all of our um you know all of our levels all of our stuff is in you know we don't we can't use JSON or you know or XML or like we just don't have the disk space for like you know a texture in base 64 or something you know like >> like so um >> you know everything's binary including like the type hierarchy um and can't diff and merge binary files uh and all that stuff. So um >> Oh, I see. So are you saying basically the problem was we have two designers, one designer adds a type, another designer adds a type. Now we have two different binary versions of the text file. Some I mean of the two binary files describing a type hierarchy that are not the same. What do we do like how do we how do we merge those? Okay. I mean, and our answer was like we was like we used hardware like hardware version control. In fact, like there was a physical object that represented there was a you know like the conchk in uh >> in Lord of the Flies.
>> In Lord of the Flies um that represented the type hierarchy.
>> What was the object? Oh my god. You got to What was the object?
>> Say Nerf like at the time Nerf made a Nerf football that looked like a brain.
>> Okay. It was like like a it was like a Nerf brain. It was slightly elongated because it was like a Nerf football brain.
>> Okay.
>> Um so but there was a brain that you know was the physical object that you must have the physical object in order to change the type hierarchy uh and check it into version control. So um okay. So in a sense really the binary finess of it is not actually technically the problem. It's just that, hey, version control systems already existed and they worked on text. So, had it been text, you could have leveraged them to merge. But if you'd had time, you could have written a binary merge if you'd wanted to merge. Yeah. Or something.
>> But yeah, but yeah. Okay, I see. But but in you, but you have nothing left because like Yeah. The source code control system is going to look at that binary file like I don't know. They're two different binaries.
Exactly.
>> And in fact, um, so later on, um, somebody in the thief mod community.
>> Okay, so this is later in time.
>> Later in time, later in time, thief's out. Somebody in the thief mod community decides that he doesn't like using the editor to make levels. And so he reverse engineers the file format.
>> Okay. and he basically writes a library for Pearl for generating um generating level files using as Pearl using Pearl. So he like he uses Pearl as his like his level. Pearl is a you know Pearl is Pearl is what is what Python is today was you know.
>> Yeah. But he edits levels in Pearl.
Yeah. He like Yeah. He like like he writes level generation scripts in Pearl.
>> In Pearl. Okay.
>> Okay. And then Yeah. Yeah. Then later on someone else reverses the file format and writes a decompiler that decompiles levels into Pearl.
>> Okay.
>> And then a fan mod group decides to use this as their versioning mechanism. So they're checking in scripts, Pearl scripts into their version control, right? They're using the level editor.
And then you just decompile your your level and check that in. That lets them diff and merge files. And then you rerun the Pearl script to generate the actual thing you load into the game.
>> Yeah.
>> Amazing.
>> Yeah.
>> Very very fan mod solutionoriented. Yes.
But they had better they had better collaboration tools than us because of that. Yeah. So yeah. So we had the brain and we had we had one of those hardware semaphors for every level. Right. Um >> Right. So like, oh, I'm working on level 13. Like I got to go find the guy who has the like spawn action figure with level 13 written on it, >> you know, or whatever. Um, >> so the brain the brain controls who gets to modify the global type >> the global type hierarchy >> and then the the action figure or whatever is like things that are not global they're only specific to level 14 I see.
>> Yeah. Yeah.
>> Gotcha. And if you have are holding multiple of these you know some real serious work is getting done. Like I have the brain and level 14 cuz I'm doing some serious [ __ ] So the other thing that we did um and and you know one of the things that I'm actually very pleased with uh about uh thief was the link system um which to my knowledge really hasn't been replicated um including in my future work right which is you know in addition to this entity system we had a system for first class relationships between objects right so this is you Um, so like we have now like instead of like it's a column major thing where like you have like the entity ID is the key now all of a sudden like it's a pair of entity ids that's the key. Right.
>> Right. Like in database parlance this is a linking table basically. It's a linking table shows up in this. Okay.
And this is different than Okay.
>> Yeah. And so links have a flavor which is basically like the table name, right?
Um and they have um uh and they have you know source destination and they have um uh they have a little bit of satellite data you can attach you know like they have a they have like a type you know like each link each flavor each table like gets to have a fourth column essentially. Um and uh so like with the properties you could choose your own map implementation essentially. So like you could choose um you know how your table was indexed cuz you know that like if you know a particular you're going to be searching out from a particular entity you want to make sure like source entity is indexed. Um you know and it actually changed the whole representation of the table. It didn't just you know like we didn't just have like a table and indices because that would be crazy in that time right it was like oh I want this to be a you know hashmap of you know like I want this graph to be a hashmap of source mapping source to edges right to an edge list right or something or I want this to be just a list of edges or I want this to be a hashmap from destination to incoming edges or I want both you know >> so it's kind of similar in approach then that system was sort of a microcosm of the larger entity component system idea which is just like look I don't want to have to decide that there's one way that we're doing linking. It's like if something's one to many if something's many to one if something's many to many like I'm just going to want to pick whatever makes sense for this and hopefully you know you pick something smart if you so you think about it a little bit and go this would be best described this way and we go with it. Right.
>> Right. Right. So um but we used it for all the relationships. So like um and I go and I go into detail on this some detail in this in my talk. Um, you know, so like the relationship between an AI and the things it cares about would be links, right? Like the entities in the world that it's looking at or threatened by or, you know, like those would be links, right? And like the relationship of that character to the key that's on his belt would be a link, right? Okay.
um like you know one one flavor with like I'm threatened by I'm carrying you know um the relationship of like I'm pretty sure like um your character had like inventory links to all of the items in his inventory. Um, gotcha. And uh, oh, and when an AI is walking on a patrol route, right? Like the the the the waypoints were connected by patrol route links, um, and all that stuff. So, this was pretty heavy. This was like a very heavily used system. Basically, everything that has more than one entity involved kind of sounds like >> Yeah. Um, yeah. Yeah. Everything. We we never you never stored an object ID as a field. You never had a property with an object ID in it. Like that was considered like >> bad form.
>> Bad form. You always used links. And this meant that in the editor we could like browse all the links. You could like just turn on uh v link visualization for you know any kind of thing in the editor. I think we had in the game too. Um and uh you know and you could just sort of like look you know that meant that like all of this editing interface was available to all kinds of relationships and you could also query you could query birectionally like it might be slow uh you know if you didn't you know represent your links in a way that was optimal for that but you could do it if you had to. Um and uh yeah and we basically did everything. In fact, the way um we spawn the player at the beginning of time um uh is there's a the other thing is like types are entities, right? Like types are entities with negative entity IDs, right? So >> you might want to Okay, you might want to explain that a little bit because I didn't talk touch on that in the lecture at all. And also like I remember this being a different thing from like when we talked. So no one's going to know about that part. So like >> so you don't have two you don't have classes and instantiations of classes all one thing. So so watch >> it's more like a JavaScript prototype pain right?
>> Yeah give give some background on that.
If if you know Larry is a guard, right?
If Larry's species is guard, it means that there's an entity called guard with an entity ID, right? And Larry has an in fact the inheritance graph is built out of these links, right? Like Larry has an is a link to the guard entity, right? And uh when we query you know what what is Larry's maximum hit points um we look for it on Larry's like first we look for it on layers entity and then we go follow the is a link to see if any of anywhere in the chain of is a links has that property right so the entire inheritance gra like so entities so types are entities and the entire inheritance graph is built out of this um link system there's a cache Right. Basically a path compression cache. So basically we would hop up to your species and then your species would have a path compression cache for every any property that it >> um you know so it would know which entity to go to to get that property. Um which meant that we didn't you know which meant that we did it could be type agnostic right like we didn't have to know what type that thing was to cache it. We weren't caching the whole like if it was a big memory block we weren't cing the memory block. We were just jazzing like where is it? Right.
>> Were was this a like was this actually like a heavyweight implementation kind of thing? Like were the designers allowed to change things in that graph arbitrarily? So like suddenly we have to invalidate the the cache because somewhere in the is a links like somebody decided to add this property that didn't used to be there or was that like not allowed or you know what I'm saying? Because this could get pretty complicated if you wanted to go all the way. There was probably um there was probably some like occult way to do something like that, but um it was not really exposed. Um >> so it's more frozen like that that hierarchy is kind of more frozen after the designers are done with it.
>> The hierarchy is frozen, right? I see.
And so like we could cash inside the hierarchy all we wanted >> because only Larry is changed. Like he may change.
>> You could say Larry's not a guard.
Larry's a dog now. You could absolutely do that.
>> Right. And we would never cash on Larry.
We would only cash on Larry's species.
So if you moved Larry from guard to dog like the cache would just work, right?
Got it.
>> Um we did also um is that right? That's probably true. Um I don't think I'm lying. We did have this concept of meta properties um which I talk about in my talk which is okay like so there are types right these types right like have these is uh relationships right um >> but then we have these other kinds of things that were so like species are like nouns right guard is a noun and person is a noun and you know tree is a noun like so like what noun >> you know what noun are you right but there There's also like what adjectives do you have? Right? I am a hairy guard.
I am an unconscious guard. I am a right like I am an aggressive guard. Right?
And those were also first class entities in the hierarchy that had negative and a second hierarchy. So we had a hierarchs hierarchy of adjectives, right? They all have negative entity ids. So we know that they're abstract, right? Um and so a thing could have as like one is a relationships but many has aspect or has meta property I think is what it was.
>> Okay. So so you expected like the the system expected you to be when you say is a you get one of those.
>> Yeah. Yeah.
>> But the other ones are like tags you can just sort of stuff as many as you want on there and that's fine but >> it's all links.
>> Right. Right. Um and there was some kind of way to order the links like I think um you know because a thing >> yeah a link can have a fourth column and I think so the fourth column was like the sort key so that like we could do the we could do a consistent topological search for your thing right um but those right relationships could change at runtime right like I could be like Larry could be a hairy guard he'd have a link to an is a link he'd have a has meta property to to guard have a has metapar property link to Harry and we could, you know, we could at runtime slap that snap that has metaparropy link and he's no longer hairy. Um, and he doesn't have any of the properties in that hairiness bag uh anymore unless he gets them somewhere else. You know, >> he's been shaved.
>> He's been shaved. And we could also like do the other way. You could just like make a link too hairy, right? And suddenly, you know, um, and that's in fact how a lot of AI behaviors and states were done that way, right? like aggressive. Like you want to make a guard with like designers would make a card aggressive at runtime by like giving it this new aspect which was a whole bag of properties not just um not just like a single field or a single you know and that means and someone later could go into the editor not at runtime not at game time but at edit time and like some someone could fix up the you know make changes to what it meant to be aggressive right um and in fact like unconscious was a And so like when you blackjack someone, it just gets the unconscious >> unconscious meta property and that contains all the behaviors. It like overrides the brain of the thing, right?
Uh um >> so this might be a good time to ask then uh cuz I wanted to bring this up at some point uh since in the big oops lecture I very specifically quote you as saying that like why did object-oriented programming get this sort of trapping of like it has to be a like a hierarchy like a type hierarchy that matches the domain model exactly like you have this kind of way of looking at it >> and um I guess this might be a good segue Like so that system that you're describing is like very different than like how C++ exposes its concept of inheritance and things like that. Uh which and C++'s concept may very well be a one of the places that where that kind of in your opinion I I think not to put words in your mouth your your opinion of like the negative kind of objective program that's too constraining >> um where that comes from. So I guess I'll say so is that sort of what you mean by that quote in a way or is that like a one of the things you mean by it was like look if I'm if I was going to design something object-oriented for designers to work with it looks more like this or you know like or this is a good example of of what we mean could you could you maybe like go from there or or give some more context to that quote and because it seems like this is sort of in that direction what you're saying >> right so you know we don't want guard to be a class right like we don't want Um we don't want the the decision that all you know that you know there's a type called human and you know and guards derived from it right we don't want that decision to be compiled into the code right um we're okay with that decision existing right but we want to give designers power over it right um and so we don't um you know they could have built uh you know and they did end up building a hierarchy that was you know very domain modely right um where you know like guards are humans and and which is weird right because like guards aren't necessarily like a guard dog >> could be an orc right or yeah could be an orc we didn't have orcs you know we didn't really have a lot of nonhumans so >> you had zombies I think right >> we had zombies yeah okay yeah >> zombies >> and fish people but that was a later game that was not the first one yeah but yeah >> yeah so keep continue >> yeah yeah yeah so we you know didn't want to want those kinds of decisions to be um uh those kind of decisions to be like carved in stone and you know and you always have the problem of like you know what point in the hierarchy do I put this right like it's like I have some new like you have like some class hierarchy that's like you know like matching your domain model and it's like okay where where is where in there do I put like this fact like like you know like oh suddenly like these two thing you know oh I put it here but suddenly this thing over you know elsewhere in the hierarchy um you know wants that fact too you know wants wants to share that so now I have to move it up you know right and to their shared ancestor right and then you you keep moving suddenly you have this like object class that's like you know got you know every uh kind of thing Right. And so we definitely uh didn't want like we we're happy to model the domain model right on some level. We just want to do it at runtime in some sense and you know we don't want to be limited by you know decisions about like what goes where right um so um uh this made it uh this made it very easy um uh to do that. you know I whether the designers felt that you know I mean whether designers felt e locked into their decisions like I I couldn't ask you um Tim might be Tim Smach might be a good person right >> to talk to about that but um >> yeah so um you know we very much wanted uh those decisions to be in the hands of um we wanted the domain model to be the domain of the designers um and not something that C++ uh knew anything about. Um so yeah, as you can kind of tell like this means that we have like in all right so we have a link system, we have an entity system, we also have an inheritance system, right? Like we have a right right and in fact like you know so inheritable things were called traits, right? So you could um you know like most inheritable things were properties, right? But you could theoretically like you know make some other thing that was a trait and the inher you know and all you needed to do was tell the inheritance system like you know whether this particular thing had it intrinsically right and then you know it could be it could be a union of multiple properties right like >> right because inheritance in this parlance is just a search basically it's like I am going to search this graph using rules that resemble how a human family tree works.
>> Yeah. Like how a type hierarchy works.
Right.
>> Right. So, but otherwise it doesn't really matter. And in fact, probably it did support >> multiple isas. Like you probably could make the the toaster oven with multiple isas. We probably like the editor.
Maybe not. Maybe the actual link implementation didn't allow that. maybe that like the actual like underlying table implementation like was an array.
Um, >> gotcha.
>> Uh, might have been that, but uh like we could have changed that implementation and then you could have toaster ovens and you know the inheritance graph search system would just work for that.
Um, and this is kind of a segue to um the next thing I want to talk about. um which is a thing that >> um didn't really we didn't really um see the full potential of. Um >> Okay. When you were doing Thief, you were like >> we were doing Thief, we built a thing and we used it, >> but we didn't really >> um we didn't really see the full potential. We built a thing called ACTR React. Um Okay. Do you want to set the stage for that a little bit? was I think last you said Ken Lavine like asked for something basically.
>> Yeah. So Ken Lavine pitched this idea and you can kind of see this idea in some of the Bioshock games. Um, Ken Lavine like pitched this idea of like you know what like like sort of rich simulation where like um you know I could um you know I could set something on fire um and then I could you know use water to put it out or I could you know like I could um I I think one of the examples is like oh there's a puddle of oil and I could like walk through it and then set my footprints on fire. Um, you know, so like like just this idea of like there's all these phenomena you you like like some fancy uh interactive fiction games work this late, right? Like there's a lot of like >> or like a dwarf fortress kind of thing, right? where um you know what this thing is made of interacts with what that thing is made of in a combinatoric way that can produce like all kinds of crazy results.
Right.
>> My arm gets a disease which causes the hand to fall off which someone puts in a soup and then the people eat the soup and they get the disease. Like these kinds of like crazy >> Right. Right. Right. You know, and I think maybe you know Dwarf Fortress is an example of like kind of what we wanted to do in a game. Like not quite that because like that's a very like semanticy kind of thing. Like how can you do that at a you know in a like guy sneaking through a room level, right?
And you can see some of that that uh in like yeah like I said some of the Bioshock games like him trying to like sort of push that further. Um so we built a system which we called act react. Um and the idea behind the the system was that um there were phenomena we called them stimuli. Uh >> let me sorry I don't mean to interrupt you but >> I just want to add one thing because you corrected me on this the last time we spoke >> right >> act react sometimes gets confused as the entity component system >> right right >> and you said the dark object system >> right is the actual name for the everything we've been talking about so far >> so far yes >> react is what you're talking about >> is a new thing is a yet other thing that we built on top of all of that >> yes okay so sorry I just didn't mean to interrupt I Wanted to make sure everyone knew because I remembered from last time but I think that is a misconception.
>> So there is there is a type hierarchy of of of uh a phenomena fire frost holiness was one of ours. um water um or you know wetness or whatever you want it like electricity you know all of these things there's a type hierarchy of um and then there was some things like there was you know fire and there was holy fire or something you know um >> but that is that a combination or is that its own different type >> it might have been that holy was a meta property on >> okay >> you know on these things right >> um >> and uh yeah so like there was a type hierarchy you know and these for entities, right? Like um and you could create sources of these things in the world. Um and you could create uh receptors for these things that responded to those things.
So, kind of like in a trap trigger or redstone kind of way, you could say, you know, when I get exposed to fire, I take damage, you know, so uh so a phenomenon had an intensity. I get I take damage in proportion to the intensity or I take damage in proportion to the intensity with this scaler on it, right? Like all that stuff like I'm, you know, really vulnerable to fire. I'm not very vulnerable to fire. All that stuff. Um, when I take damage, I, you know, I run the script, you know, or, you know, when I get exposed to fire, I run the script.
When I get exposed to fire, I die. When I, you know, like, you know, like all kinds of like, and there was like a little like it was like trap triggers where, you know, there was a, you know, a list of effects you could pick from and like one of them was always like, "Oh, go out to the scripting engine and like do something."
>> Something custom like we want something custom here.
>> Yeah. Yeah. Um but there was a bunch of like there was a handful of like just like common behaviors, right? Um so um and then so so there's there's so these there's these sources stimulus sources and and there's these uh these uh reactors we I called them receptrons. Uh that's my fault. it. Um so there's sources and receptrons which are uh you know like a neuron that like when I get stimulated >> I fire right um and those were attached to entities right and um um then there's also propagators which are things that you know transmit the source to the to the uh receptron. on. So like um and I think maybe a propagators I don't remember if propagators attached to the source. I think maybe there's also third party propagators but like >> which is like a volume that like oh this is if things can be aerosolized they can transmit or this pool of water.
>> Yeah. So I think it was I think it was could be specified by the source. So it's like I, you know, I am a source of fire and I propagate it to anything within a certain radius of me. Or I am a source of fire and I propagate it to anything I collide with. Or I am a source of fire and I propagate it to anything that's in the same room as me.
Or anything that's in the same like some volume as me, you know, like um all of that stuff, you know, anything in the same medium, you know, as me. um you know like uh so there were a bunch of different like propagation mechanisms that you could specify. Um so like you could make a you know so like the water arrows um transmitted you know like it made an explosion of water of this water stimulus that the torches know to respond to and get put out by. Um but other things might care about being wet too. Um it's possible that like um like hitting someone with a water arrow like like ticked its drowning logic for like one tick or something, you know, like um because like maybe that was done the same way. Um so there was this whole system where like things could be bearers of phenomena, things could be receivers of phenomena that behaved in certain ways. All our entire combat system worked that way, right? So like arrows were bearers of pokiness and you know and swords were bearers of slashiness. Like we had the like DND like bludgeoning slashing uh piercing concepts.
>> So someone could be hardened to one type of thing.
>> Yeah. Hardened to one type of thing and not the other black. I mean I think there was a special phenomenon that the blackjack like the KO. Uh, >> I can kind of see what you mean cuz like Thief, one of actually one of the things I was going to ask before I was like >> Thief in a lot of ways probably wasn't the best game for any of this because honestly like Ultima Underworld >> was the game for this probably, right?
You know, and like Yeah. And so RPG was probably the game for this. And the thing the and the thing that was more than we could chew really though was the presentation side of it, right? Like I built the logic for all that, >> right? But like the, you know, the like a propagator really needs to think about how it's going to render and show to the player that it's propagating, right? the responder really needs to think about like how it's telegraphing its response to the player. And yeah, there were like, you know, >> lists. There were things you could put in the list like play this visual effect or, you know, like stuff like that. But like I think to do that right, you need to like contemplate not just that these things are logical concepts but that they are presentation like to have a take a holistic approach um to the pres uh to the presentation which we did not do, right? Because the player needs some way to learn that these things are even happening.
Otherwise to them it might just seem like some random stuff happened and all this logic is wasted basically, right?
>> Yeah. Yeah. And so like we kind of wasted it, right? Like um the mod community loves it, right? Cuz it's like >> cuz they can run with it now.
>> They can run you cuz it's like it's like trap trigger on steroids, right? Um >> uh but um >> I mean I think they love it. You know, mod community folks like when you watch this like comment get in the comments >> and tell us if you love it or not. But um >> okay. Uh >> we'll watch we'll watch the uh the Yeah, we we'll count we'll count the pluses and negatives.
>> Yeah. Yeah. Absolutely.
>> Sorry.
>> Yeah. So, we didn't really, you know, like you know, Warren would say like like you guys put act react in the game and I can't see it, >> right?
>> Yeah. I I I think I had that same experience playing Thief is that like cuz I didn't actually know a lot of this at the time. I mean, obviously I knew a lot of you guys at the time actually, but I only, you know, Doug had maybe told me, you know, some smaller portion of this, right? And it it like when people play that game, they focus a lot on like the stealth aspects of it, you know, and that like how it felt that way. And it wasn't easy to see all of like the richness that could have been there for things like that. And so I I I feel like that was like you started this off by saying like we didn't really take much advantage of this. And I can understand that because like the game >> kind of like focused on other things in terms of how it presented itself to the player.
>> Right. Right. Yeah. Well, that that's true, but also like I think we would have liked to have, you know, more like cuz we did do a lot of like environmental stuff, right? Like we did do a lot of like, you know, oh, I'm going to, you know, grab this crate and put it over here and stack up three and make a little staircase and climb over this wall and end up in a place that nobody like we did have like try we were trying to do like that emergent stuff.
And if we could have like had more complex, you know, tools, um, you know, like made that into some kind of pliable clay that the user could have created new effects with, um, we would have loved that, I think, but we didn't get there. Um and what it was and so what we did is we built a system um that you know in every other game is just like if damage type equals piercing then blah blah you know like you know like something that's like an array lookup. A similar thing happened to me in um >> uh uh working on uh the sports games uh you know I was working on essentially the um the television presentation engine for the sports games. Um, and one of the things we were doing for the first time in the versions of those games that I worked on was we were like recording the entire like we were making a a a a game long log of all the events of the game so that we could like you know have commentary call back to it and um you know you know what happened earlier and you know and just generally like have you know like the television presentation be able to understand the whole history of the So he can say things like, "Oh, that's his third third party of the game. Like back in the second half he hit he missed that one or that."
>> Right. Right. Exactly. Exactly. Um and it's like the but the pro problem with that and is like um you know any line of dialogue like that could have been you know especially since at the time it was like these are we're not using AI to generate the speech right like these at best we're like you know recording lines of partial lines of dialogue and sewing them together and we actually had some pretty cool stuff going on there but >> but that exact example you had it did of like oh you know in in he missed that exact shot in the second half you know or in the second quarter um like you could implement that as you know you know a variable for when was the last time I took that shot and a variable you know like you know and like you know like a couple custom v trackers for you know this exact line of dialogue right and so like like any individual thing you said that was backward looking at the history the user can imagine it just done as some bespoke thing right like and so like when how many bespoke how many things do you have to do bespoke looking things do you have to do before it looks like you know it's like a problem of induction right like before it looks like you know there's something deeper going on there right um >> it's kind of not leveraging right it's not you're not getting much leverage out of the work cuz it ends up, you know, it ends up being much more it perhaps had a lot more capabilities than people could perceive. Therefore, it wasted.
>> Maybe it actually made our bespoke things a little easier to author, right?
Like like there might might have been that, right? But um yeah and and similarly like act react once you have it makes your combat system easier to author but you know but so what like just made like we could have just made a combat system probably you know uh so yeah I think that was a place um you know uh it did you know it does uh uh it did kind of inspire the anti entity IO system in the source engine and a few other things but Um uh yeah, it just it wasn't it was a thing that we h bit off um but did not so much too.
>> Um >> so maybe that speaking of uh like I assume there's a bunch of people who went to Valve who were ex looking glass I assume that he carried forward and >> uh Chris Carlo and and a bunch of other folks. Sorry all of you XLGers that I forgot.
>> Brian Jacobson too, right? I guess. Yes, that's the one. Yes. Um, but anyway, uh, oh, and Chris Green. There's like there's so I keep thinking like there's so many, right? But, uh, Doug was there too at some point, but you know, working on VR, I guess. But, uh, anyway, so this might be a good segue though into kind of future stuff cuz you kind of wanted to talk about like ideas you've had since then or cuz you know, it's probably been a it's probably been a hot minute since we've actually done.
>> If I can just share briefly, if I could actually this is a little bit of a segue. If I could just briefly talk about the act react system uh in terms of implementation, right? So we have a source and we have a stimula. You have have a type a phenomenon. I called it a stimulus, right? So this is a source of fire. Both of these things are entities.
So of course it's a link and I am a stimulus of I'm a source of link, right?
um attached in the fourth column of that link is like how I propagate right um uh and then likewise I'm a re I'm a receptor I'm a receiver of this thing so my of this thing so my receptron is a link um right um but sources and and syncs essentially um are things that you want to inherit it through the type hierarchy, right? Um, >> right? Because you don't want to have to say each individual entity has it because the point of the inherent system is like >> if guards are always a source of fear for something then you want all guards to have that not you don't want to say each individual guard is a source. So this is an example of a trait in the inheritance graph searcher system that um isn't a property, >> right?
>> It's a link, >> right? It's a link and um it also uses the system. It's also it also um closes over the entire um chain because you don't want to like if I have some behavior right um another if I have some behavior on this phenomenon another thing probably wants to like might want to add a behavior right like so by default behaviors are additive right like I don't I don't override your behavior I have a new behavior that is additive with your old behavior, right? Um and uh and so like when we respond to something, we search all the way up the hierarchy and gather all of those in topological sort order, right?
And we start resolving them. And I think and how do we I don't even know I think we ended up using like prologue style cut fail um to >> Okay, why don't you why don't you mention what that is. So um yeah, basically we had >> this is so looking glass right now.
>> So basically like we had, you know, on our list of um on our list of possible responses we had basically break, right? We had like don't keep searching through the hierarchy, you're done now, right? So the way you overrode a behavior is you say do my thing and then break. Right?
And um yeah like yeah cut yeah cut fail is a thing in prologue that is how you um the way you say like because in prologue prologue is an inference engine and you can't say something is false um you can only say like or the way you say something is false is you say um when you try to determine whether X is true. Um, fail and stop looking for more rules.
>> Right. Right.
>> Right. So, cut is stop looking for more rules >> and fail. Right. And so, you can't Yeah.
And that's how you do that.
>> Uh, yeah. So, yeah, that's the reference to that. So, let's talk about what's on my mind. Uh, a lot of things are on my mind. Um, I want to say first of all that like um I've been thinking a lot about in general about sort of how we make games in general and sort of and and how we program computers in general like >> okay >> you know you know we have massive waste right like like >> sure >> you know I open up a thousand lines source file I type 74 four keystrokes into it. You know, I run the entire thousand lines through the compiler >> as if it's never seen them before.
>> Yep.
>> Right.
>> And then once I like it, right, I tell the version control system to find the 74 keystrokes I just typed.
>> Yeah.
>> And send that up as a as a patch. Right.
Right.
>> Um and it's like, I just typed those.
Couldn't I couldn't you just have tracked them and you know all like so you know >> we're you know like stuff is you know you know we we we we do all of our work on the assumption that computers are cheap and engineers are expensive right um and that's sort of true right but you know and this kind of gets to your kind of your um >> sure >> your stuff um which is you know Hey, when your if your thing's going to run on 50 million phones, right, you know, uh and you can spend an hour making it run a second faster, like you know, all of a sudden, like that's that's different, right? Um, but I've been thinking a lot about um with respect to I don't know if this is a a a good segue, but I I've been thinking a lot about invariance and how I I can't talk about my current work, but um a lot of what I find myself doing is managing invariance.
um you know like let's say you have like hey look in this contiguous block of memory there's nine floats right and those nine floats happen to be a rotation matrix right like okay I know all kinds of things now >> about the you know like there's all kinds of things I can do knowing that that's a rotation matrix right like if I want to set if I want to send that to you over the wire I'm not going to send nine floats right? I'm going to send three angles, right? Or something, right? Or I'm going to send, you know, some, you know, bit packed representation of a quitterian or something, right?
>> Um >> um but we do so many things, but I'm going to call so many AI functions that are going to like do the naive this is just nine floats thing, >> right? Um and so like and you know and like the fact that it's you know there's this invariant right there's all these invariants to do with like what a rotation matrix is and anytime you have an invariant like not only is it an opportunity for bugs right like it's like oh if I poke a value into this and make it not a rotation matrix like >> that's a bug >> that's a bug right and you know then there's all these things like you know >> I'm going to send these nine floats over the wire to Casey. do, you know, like is there anything I can do to send fe you know like um so oft times like I just end up sending nine floats to you, you know, and all that stuff. And you know, I kind of wonder um I kind of wonder uh if we're cuz like we it's like we we make this code and then we discover the invariants later, right? uh >> rediscover them, you might say.
>> Yeah. Or rediscover them. Yeah. You know, it's like it's like, oh, I didn't when I typed this in, I didn't realize the matrix was going to be a rotation matrix, right? Um and so I, you know, and my opportunity to do all of the optimizations around that is lost, right? Because I didn't know, right? And so I, you know, I kind of wonder >> or I might state that a slightly different way and say you also might be reusing something like it's more efficient for me to reuse this thing that just does nine floats and I don't have the time to go >> absolutely absolutely >> make the one that actually obeys the invariance. So oh well I didn't know but same result same result. Yeah. I you know I'm happy. You know the computers are cheap and I'm expensive, right?
Yeah. And >> you know and I I kind of wonder I feel like just over the hill there's like some other programming paradigm where we're not making the nine floats, we're making the invariant. You know, I almost feel like, you know, we want to make Michelangelo's David. And what we and what we wish we could do is get a big block of marble and like carve away at it until we had Michelangelo's David.
But instead, what we have to do is take an empty room and start piling up mud in the middle of the room, like in vaguely the shape of a humanoid, right? And then eventually we are lucky enough to maybe like start to work on the surface, right? and all of like like like we had to like we had to do all this work on the interior of David's abdomen that we no one's going to see and we didn't care about right um you know and it's like is there some way that we can I don't know I feel like somewhere over the horizon like there's something that um somewhere over the horizon there's something and And this maybe just me just uh going off in terms that there there's some thing that lets us move from the, you know, ceramic sculpture to the marble sculpture. I I don't know. Maybe it's we're supposed to do what we're doing and use AI to find our invariance for us, you know, or or something. I I don't know the answer.
Um, but one of the things I've been observing lately, um, is, um, there's a lot of contexts where we want to copy the world.
Um, >> okay.
>> Um, so for example, um, if we're making a machine player that wants to look into the future, right? Like if you make a machine player for chess, right? It's going to copy the chessboard and mutate it. And you know, maybe it's going to parallelize by making lots of copies of the chessboard and mutating all those copies, right?
>> And this becomes sort of its own problem of like, okay, so how do I compactly represent changed versions of a chessboard so I can have a lot of them or whatever.
>> Exactly. You know, and so like that's and that's just one example, right? Like there's um things like um I want to, you know, like there's a dumb thing in in WoW, right? Or in a lot of games where it's like, oh, I have in my inventory um I have in my inventory like a magic weapon, right? And I want to be able to mouse over it and see two views of the world. Like the view in which I have my current weapon and the view in which I have this magic weapon equipped. Right?
Like WoW has this interface, right?
Where it's like, >> right, >> I, you know, here's what your stats are right now. And here's what your stats would be if you dropped your other thing and used this thing, right? this one goes up and this one goes down and like so that's like we can think of that as like we're looking at two different worlds which are only different by this little thing.
>> But one could imagine just to put sort of like just to emphasize that last point you made. The way that's typically implemented is taking the shortcut of the fact that equipping a weapon can't really change much. But in in our conceptualization of all games that could possibly exist, one could imagine the weapon that when equipped dramatically changed like even the shape of the world around you or like what other people thought you were and all these other things, right? Um, Legends of Rune Terra uh has a thing like this where right like you know it is a magic-l like game which has like effects on a stack >> and it has a thing that you can mouse over which basically like show me the world after all this resolves.
>> Exactly.
>> Right. And so it's like this entity is destroyed and this entity is existing and this entity has you know changed its numbers and you know like arbitrary things can happen right like show me this alternate universe that's the future right >> it's exactly like the chessboard thing it's like we want to know all of these things >> yeah yeah it's like I but I'm doing the you look ahead as part of my user interface right and then there's things like you know inworked multiplayer net code Right?
Like we have all these copies of the world. We have the copy that I am a player am looking at. We have the server's authoritative copy of the world. We might have like we might also have like the server's copy of what it thinks I'm seeing. Right. And >> and my copy of what I think I will get from the server.
>> Right. But might not be correct. Right.
All >> of that stuff. Right. Um >> and so >> you know um I'm imagining an entity you know and you know ECS has gone in a direction where it's very much about uh data oriented architecture right like um where it's it's about you know oh we want to cluster like things together so we can iterate across them uh fast and and and you know generate lots of entities and I'm not speaking to that specifically right now but I think that there is a future uh where we contemplate all of that um as a kind of inheritance through time, right? I was talking about like this inheritance graph search engine, right? Like imagine an entity system where the world is immutable. You never modify the world. Instead, what you do is you make a new world out of the deltas of, you know, from the previous world, right? And um that gets you, you know, and then we have like and so like we have essentially these links, right, that aren't is a but are was a, >> right? Right.
>> Right. And so we have we you know so like over time you can see you know and maybe you know and maybe you don't need the whole history maybe you like you comp compress at some point you have some event horizon past which you compress but over time you can see the history of um of you know the changes to this object uh or this entity you know I can you know like I can you know I can have two different worlds and I can do like I can essentially diff like I can have two different branches, right? Two different disperate branches and I can diff them by searching back to their common ancestor, right? Um and then I have a path from one to the I have a path from one to the other, right? And I can essentially diff any two worlds, right? As long as they have a common obviously they don't have a common ancestor, then you know their diff is just like everything, right? And in this case, what we mean is like well, it's sort of I mean, I guess depending on how it's stored, this may mean sort of like all it's like all the entities have to do that routing like effectively, right? Like in a sense because we may have many of these chains. It's not unless the world is literally just a serial set of which it might be.
>> Well, okay. So, >> but yeah.
>> Yeah. I mean, like to telegraph a little, right? like um you know imagine so if a world is immutable right then an like so imagine you have like so in in thief we have an ID mapped to some properties right um imagine that's not an entity um that's just like I've been calling it a jot um which is basically like that is like let's say we have an ID with some properties and that's just a collection of claims about an entity, right? And an entity is a union of these things. It's an aggregate of these things, you know, through inheritance and and and whatever else, right? Um and so a world, right? Basically, so like and now an entity has like a name, you know, Fred.
Um a world says like which Jot represents Fred, >> right? Okay. uh is a map from like entity names if you will to these jotss right um and so like if Fred doesn't change then the world doesn't change like then that like if I have two worlds right I can and that world is just a delta of like which entities changed right like I can see like you know Fred changed but Barney didn't so this world has an has a new entry for Fred it doesn't have a new entry for Barney right has was a link back to that world, right? So like I can look at this world and say and see which entities on that world change and then I can go to I can follow that link to that I can follow that link to Fred and look at its was all links to figure out you know what was different about you know if I want to diff two worlds uh what was different about uh it and um you know so um so there's sort of in the same so very similar to the dark object system you're basically talking about something where I have there is some like primal enumeration of all things that are tracked >> right >> basically >> and then in each sort of state of time >> I'm saying here are here is the like top level the top level reference for each of those that lets me like unpack what its state was at that time right?
>> In two worlds, if this person hasn't changed at all, then it wouldn't change that particular thing. Although, to be fair, at least taking your description of the dark object system and assuming that that was what was going to happen. That doesn't actually mean that the state of the entity didn't change. It means that the state of the entity quas like Qua entity didn't change. It's some of its like inherited meta properties may well have because they would be like a different jot, right?
So, I can't really I I can't really tell that this particular entity changed or didn't. It's just it's rules about how it's constituted, didn't change.
>> Well, I mean, assuming assuming that you limit yourself to a, you know, like a frozen type hierarchy, right? Like like Yeah, like yeah, if you edit the past, then all bets are off, right? But if worlds are truly immutable and a world really just represents a state of a a point in time and there's no going back and editing the past, >> right? Well, or I'm just saying more like uh you like you said, you could just say like we don't anything that can be inherited can't be edited or can't change. I just mean more like hey at this point in time guards became evil, >> right, >> as a category. Well, uh what was his name? Larry. Yeah.
>> Um, Larry, he still has he appears to not have changed between these two because he still has the exact same description. I am a guard.
>> But his actual, if you actually wanted to evaluate him, he is different now because he inherited from guard.
>> Sure. Sure. Sure.
>> If however, you can't edit those things then. Yeah, I agree. Right. Cuz he would have had to >> and there but there is at least a record that guards became evil and you could >> like So you'd have a in the world you'd have >> forward propagate. Yeah.
>> Yeah. And you could search backwards >> certainly >> to Larry from guard assuming you know if you can if you assume some some things about the kind of graph I'm describing right.
>> Yes it is knowable it's just not trivially knowable I guess is the thing I would say.
>> One of the things that really inspired this line of thinking for me actually was um working on games like Magic the Gathering. Um, you know, we worked on Pokemon, we worked on uh we worked on Pokemon, we worked on Kaijudo, which you know is kind of baby magic. Um, and you know, we were talking about we we actually had a migra had a bid in for the uh magic rules engine. Um, uh, but um, just thinking about, you know, uh, I don't know how familiar you are with magic, but it has passingly. I mean I >> it has it has buffs, right? Like it you know like you can say you know you can say like all creatures are blue and you can also say blue creatures get plus one plus one, right? And so like you have all these passive effects, right? And they have so like you have sort of like the the explicit state of the world which is like this card is on the table in this position, >> right? Um and then you have and you know and it has these numbers printed on it but then you have the implicit state of the world which is like oh this is what these numbers are after all the buffs have modified them right like this is a classic thing that you run into you know like buff systems are a classic thing you run into in uh in games right where um you end up doing things like you know you end up like having the like rerun all buffs you know thing where like we reset the entity back to tabularasa and then you run all these functions on it these mutators on it and now you have right like and then you know and there's all this pain around like when you do that and you know and all that stuff um and I don't know that this obviates that pain but it does allow you to contemplate the explicit world and the implicit world as different worlds that you could diff between or you know whatever And so for example and and so you know one of the nice things about that for something like net code right is like like if I can diff two worlds then that's what I can send you like I can just send you um I can just send you a diff um rather than you know having to like uh it's not it's not like we're tracking all the state and then we're running a literal like file diff on the world you know like we're like running through all the binary like doing equals comparisons to get this minimum minimal thing to send to you.
It's like we it it's kind of emerges from the way you just build the logic.
Right.
>> Well, you're just kind of saying look, we're going to make we're making the changes, >> so why don't we just record the fact that we made the changes, >> right? Right. Which I guess gets back to my 74 keystrokes, you know, thing. Um Yeah. Yeah. Um so it was coherent.
>> Good for me. Um >> yeah. No. Yeah. Yeah.
Yeah. So, that's kind of um what I'm thinking about and I have like I have a lot of detail I could go into on that, but um >> um you know, I kind of want to, you know, build the thing.
>> Okay. And you don't have occasion to do so in your current project? I guess >> eventually, you know, I mean, it's one of those things where it's like I'm kind of a gunslinger. help out a bunch of different R&D projects, but it is part of my mission to sort of like come up with stuff like this and uh >> okay, >> at work. So maybe maybe um >> well, thank you very much for coming on and talking about everything. It's been a pleasure. Just like it was the first time, I'm glad we recorded it this time so that other people can listen.
>> Nice. Yeah, it was it was fun to do it again uh and do some more. Uh well before you go, can you tell people like I don't actually know. So can you tell people a little bit about like are you going to do a lot of stuff on the YouTube channel? Like like where can people find you or do you want them to find you? Let's let's start with that.
Do you want people to find you and if so where?
>> That's a good question. I am uh Algorithmmancy Tube. You're going to have to spell that.
>> I'll put the link in the description for sure.
>> I am Algorithmmancy on Twitch. Um I I haven't been streaming a lot lately. I do need to finish playing through Black Parade. Most of my streaming is me playing out games I worked on or or a version of that. Like I I streamed the entire System Shock remake. So I didn't work on the System Shock remake, but I worked on the original. So I did a you know like original Dev Reacts stream.
>> Oh, that's cool.
>> I'm doing a one for I don't know. Um for Do you know what the Black Parade is?
>> Um >> I I don't think I've ever heard of that.
>> It's a thief mod. Ah, >> that was it's a it's like it's essentially a 10 mission thief prequel.
>> Oh.
>> Um done as a fan mod. Um but it was only released in like 2024 or something or 2023.
>> So very new really.
>> It's a very relatively new thief mod and I have been playing through it. Um though I haven't it's been months and months since I've done a mission and I think I've got like three more left or something. But um yeah, all it's all on my YouTube channel. Um also my uh you know I did a few uh shorts about math on my YouTube channel. Um geared at more like high school students who are asking what's the Pythagorean theorem good for?
Um >> oh okay.
>> And uh you know and you know video games is the answer of course. Um, and uh, yeah, so most of it, my stuff's on YouTube or uh, also eightkindsofund.com is all of my game design lectures. Um, >> yeah, we didn't really talk about that, but uh, for people who don't know, uh, like obviously you've done a lot at the GDC used to have class every year on game design, right?
>> I still do.
>> Okay.
>> Uh, yeah, I've done it. Uh, I think we just did the 25th uh, this year. So, uh it would have been the 26th except for co >> Right. Right. Yeah. Okay.
>> Um but yeah, we've been >> almost continuous.
>> Yeah. Almost continuous uh game design workshop at um uh at the GDC and you can find kind of the materials from all the past ones up on that website when I'm good at putting them up. Um eight eight kind it's the digit eight kinds of fun.
Every all of my game design talks maybe a programming talk or two. Um, but all my game design stuff and also on my YouTube channel you can find the talk I gave on the thief object system.
>> That one's actually very interesting too and like very relevant to all the things we talked about. Kind of gives the overview of how things worked. So I'll definitely include a link to that one in addition to the other links at the bottom for people who want to jump straight to it.
>> Absolutely. Absolutely.
>> Well, Mark, thanks so much for joining joining me. Hopefully we'll do this again sometime, man. And we'll uh maybe we'll hang again sometime. We'll see.
>> Definitely. Thank you for joining me for this interview with Mark Mock LeBlanc. I hope you enjoyed it. And if you did, I have another video with Mach that I'll be putting up shortly where he he actually to this interview he brought some code snippets that had nothing to do with the thing we were talking about.
He just had this kind of cool thing he wanted to show that he would had been thinking about recently. It's really neat. It's about how you pick uh from a set of items randomly. And he he kind of shows this new technique that is is really interesting. It's a different way of framing kind of an old way of of doing things that I absolutely loved.
So, I made that into its own separate video and I'll be posting that shortly.
And I'll be posting a number of sort of paper walkthroughs where I go through all of the original papers that I use to sort of construct the narrative that you see in that presentation, The Big Oops.
So, if you're interested in the full historical context, I've got a bunch of videos that I'm preparing on each of the different paper sets that I will be posting in the run-up to this year's Better Software Conference where I'll be giving another computer history presentation, which I also hope you'll join me for. If you want to keep track of all of that or any of that, if it interests you, you can always find it all on my website, computerenhance.com.
And if you are interested in following Mock or seeing what he's up to lately, you can look at one of these websites here. He kind of has some some different stuff, you know, depending what whether you want his YouTube channel or uh his game design stuff that he does with the GDC. And I'll be putting all of these links in the description below. So, you can always just head down there and click on the one that you're looking for.
That's it for now. Until next time, have fun programming everyone and I'll see you all on the
Related Videos
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Introduction to Problem Solving Part - 1 | Lecture 1 | Intermediate DSA
ascensionix
107 views•2026-05-29
🚀 BCS613C Compiler Design | Module 1 to 5 Schema Evaluation 🔥 | VTU 6th Sem 💯 #VTU #bcs613c #exam
Pranavaa-y4y
104 views•2026-06-02











