
Teardown is a 2022 sandbox puzzle game developed and published by Tuxedo Labs. The game revolves around the owner of a financially stricken demolition company, who is caught undertaking a questionable job and becomes entangled between helping police in...
Loading summary
Dennis Gustafsson
Teardown is a 2022 sandbox puzzle game developed and published by Tuxedo Labs. The game revolves around the owner of a financially stricken demolition company who is caught undertaking a questionable job and becomes entangled between helping police investigations and taking on further dubious assignments. The game stands out for its technical achievements, particularly its use of voxel based rendering, which enables highly interactive and fully destructible environments. Dennis Gustafsson is the founder of Tuxedo Labs and the creator of Teardown, among other games. In today's episode, Dennis speaks with Joe Nash about his 20 year history in game development, his passion for physics and games, Teardown, the advantage of using voxels, and much more. Joe Nash is a developer, educator and award winning community builder who has worked at companies including GitHub, Twilio, Unity and PayPal. Joe got his start in software development by creating mods and running servers for Garry's mod, and game development remains his favorite way to experience and explore new technologies and concepts.
Joe Nash
Welcome to the show, Dennis. How are you doing today?
Dennis Gustafsson
Thank you, I'm very good. Really happy to be here.
Joe Nash
Yeah, awesome. Thank you so much for joining us. So where I want to start today is your journey into game development. Because, you know, poking around in preparation for the show, it seems you come from a very much like rendering background, which makes a lot of sense. Looking at Teardown. So I'm really interested, like what was your career to date leading up to Teardown?
Dennis Gustafsson
That's actually not entirely correct. For being a game developer, I've been pretty uninterested in rendering for a long time. I've been working in games since 2001 or 2002. It's more than 20 years now and I only started tinkering with rendering really just a couple of years before starting on Teardown. Really. I've been doing some rendering of course, in order to be able to do the previous games. So that was maybe seven, eight years ago or something like that. My main interest has always been physics in games and that's also where my main part of my career has been. I worked for physics engine companies and writing my own physics engines and doing physics games. And so that's really the core of my background.
Joe Nash
That absolutely makes a lot of sense. Having experience to Teardown and the core gameplay loop. A physics background absolutely makes sense. Where does that interest come from? Is that driven by your own gameplay experiences? What got you going on physics engines?
Dennis Gustafsson
Yeah, I can't remember exactly, but it was during my time at the university when I was studying media technology. A lot of my Student colleagues were really interested in rendering and I thought somehow that physics was more interesting because of the interactivity. And it wasn't really that much used in games back then. This was 1997. We didn't even have ragdolls at that time. It was just no physics at all for the most part. And I remember there were a couple of games that started to use physics and one of them was Carmageddon 2. I remember playing that a lot to study the physics. There was also this dinosaur game, I don't remember the name now, but there was one where you could actually pick up objects and manipulate them with a virtual hand. And I thought that was really cool. So I just started tinkering with that and then, yeah, it was Carmageddon, the.
Joe Nash
One on Nintendo 64.
Dennis Gustafsson
The one I played was on PC, might have been on multiple platforms.
Joe Nash
We spoke to the developer of the back port of Valve's portal to Nintendo 64 a while ago and I remember looking at that there was one game that had like physical driven gameplay on Nintendo 64 and it was a CART game. So maybe that was Carmageddon, but I can't remember.
Dennis Gustafsson
Yeah, maybe it was a pretty silly game, but the physics was good.
Joe Nash
Yeah, awesome. So obviously we're going to spend a lot of time talking about Teardown, a wonderfully physics driven game for folks who aren't familiar or haven't experienced the game. Can you briefly introduce the title?
Dennis Gustafsson
So Teardown is a voxel sandbox game where the gameplay is based around heists. So you can, since everything is based on voxels, you can modify the environment, you can break things and they break in a physical way. Not like Minecraft where you can remove blocks, but when you remove something and explode something, they actually fly and rotate and behave like actual objects. So the core gameplay is that you're preparing a scene for a heist. You're tasked to steal a number of objects on a timer and you can, before starting that timer and starting the heist, you can go around and prepare the level, destroy things, you can build stuff, you can move vehicles. And then when you perform the heist, hopefully you can steal all the targets in 60 seconds.
Joe Nash
Awesome. Yeah, that's a great description. I think that first point you mentioned is actually particularly important about, you know, you can damage objects and they go flying off. And the comparison to Minecraft, I think one of the things that first caught my attention on it is like there are voxel games where the voxels exist to make up the worlds, make up the objects. But Then everything is aligned to a voxel grid. And that is not the case with teardown. Right. The voxels make up the geometry of the things in the world, but then they are operating in free 3D space. Am I correct on that?
Dennis Gustafsson
Yeah, that's correct. They're still on a grid, but each object is on its own grid. And then the whole grid can rotate in the world and move around freely.
Joe Nash
Perfect. Yeah. We'll come back to the heist concept because I think it's really neat and a really good way of using the engine you've built to make gameplay. And it's really, really fantastic. But as we're spending a little bit of time on the game and the engine that you mentioned. So it's built out in its own engine. Where's the chicken and egg here? Did you have the idea for the game well formed and was like, cool. This is, you know, I need to build this technology to do this. Or was it very much a. I know these are the features I want to make from an engine perspective and thus a game grew out of it.
Dennis Gustafsson
Yeah, it's very much the second one. I had no idea about gameplay when started to tinker with this. I just wanted to do cool physics based, destructible voxels. And then gameplay was actually a pretty hard one to crack for this game. It took a long time to come up with that concept and there was a lot of prototyping for different games involved in that. So it was really nice when that finally landed.
Joe Nash
Fascinating. And what kind of time period, like how long have you been working on the engine before the core gameplay loop kind of cemented?
Dennis Gustafsson
I started in 2017, I think, and then building the technology and doing prototype for the gameplay was kind of interleaved a little bit. But it wasn't until 2019, it must have been where I finally decided on the gameplay and started building the actual game.
Joe Nash
Nice.
Dennis Gustafsson
So that was a couple of years.
Joe Nash
Yeah, that's a good amount of time. So I guess, tell us about the engine. I guess a place to start. Like, what were you seeking to build? Like, what was the engine that you had in your mind before the game crystallized? Like, what were you after?
Dennis Gustafsson
So the idea for the voxels started, I think with this little voxel modeling program called MagicAvoxel. It got pretty popular during that time. There was a lot of beautiful images floating around on Twitter and I just saw them by accident and it struck me how well suited that would be for a game. And I don't think that had really been done before. At that scale. And it was also kind of perfect for physics because normally when you do destruction with polygons like you normally do with gains, you have these triangle meshes. When you do destruction on those, there are a lot of gnarly cases with degenerate triangles and floating point precision issues. And none of that really exists with voxels. Everything is nicely aligned on the grid. It's all integer math and it's much more well behaved. So that kind of clicked the whole thing. It could also be worth mentioning here that the voxels here are considerably smaller than typical voxel games. So they are on the scale of where one voxel is 10 centimeters. So there's quite a lot of them. So I wasn't really sure that was going to work. And that's sort of what inspired me to try and replicate that Magicka Voxel feeling feel in a video game.
Joe Nash
Oh, that's awesome. So the size of the voxels came from Magical Voxel, Did I understand that correctly? Fascinating. Okay, cool. That was one of my questions because that's one of the first things, you know, as a person who spent a good amount of their teams on Minecraft, like the size of the voxels is one of the first things you notice booting up the game, that and the ray tracing. And so I was like really interested in how you came by that size. But okay, that being come from Magic Voxel makes sense. So actually, you know, mentioning the size of voxel and how many of them and the performance, I think there's been, I don't know if you're aware, but there's been a couple of really amazing like blogs, tearing down teardown and the rendering and the performance of it. And lots of people very impressed by your work. And what are some of the challenges of, you know, dealing with I guess both physics and also just drawing that many voxels on the screen that you're dealing with.
Dennis Gustafsson
Yeah, I read those blogs also. It's really incredible how detailed they are and they've done a much better job than I could have done describing that. So I'm really thankful someone did it because I've been wanting to write that up for some time, but now I don't have to. And I think the most challenging issues. There were a lot of challenges both in the physics and in the rendering. But I know for a long time I was keeping lighting in screen space, meaning that when doing ray tracing it was only considering the parts of the world that you were actually looking at, which is not great because if you have a light behind Your head or if there's something blocking your light behind the head, it's not really casting shadows correctly and it's a lot of artifacts. So getting all that to run in voxel space and make it more correct, that was quite challenging to make that run at decent performance. And from a physics perspective, a lot of physics actually turn out much nicer with voxels. That was something I thought was going to be challenging to do. Collision detection, to detect if two objects are close or overlap in order to make them respond with physical forces. That was something I thought would be really tough, but actually turned up much easier than I thought. So there were both pros and cons, I think, with going with voxels instead of regular objects, so to speak.
Joe Nash
Yeah, I mean, on the physics, in terms of things that are different. I don't know if I have a well formed question on this, but obviously I noticed like, you know, as you're first exploring a physical driven game, especially a destructive one, you're like, okay, if I smash it this way, will it react in the way I expect? Were there any, I guess, particular physics interactions that you found very difficult to implement or decided didn't contribute to the gameplay and didn't implement, if that makes sense.
Dennis Gustafsson
Yeah. There is one clear candidate for this question and that is the structural integrity. So if you have a whole house, for instance, and you remove almost all of the lower floor, so it only hangs, a single voxel is still connected, but in reality it should just break. No material is so strong to be able to hold up the house. That's something a lot of people have requested, obviously. And it's also something I thought would have been cool to have in the game. But I still don't know exactly how I would go about implementing something like that, because it's really complicated when it's so generic as it is in teardown. And there are just so many voxels. There are hundreds of millions of voxels in a scene trying to untangle how they're connected. Exactly. And how much weight they're feeling, how much they're supporting.
Joe Nash
We have to calculate stresses along different lines of material types and all kinds of nonsense.
Dennis Gustafsson
Yeah. So I'm not doing that. And I think, and there have been some misconceptions about this in the past, that I think it was actually a good decision for gameplay. I don't know that since I don't know how the game would have played with it. But I, I do appreciate that you can trust the environment. If there is something holding up a building or something I know that it's not just going to randomly break like it does in the real world, then that gives you more ability to plan when you prepare.
Joe Nash
Yeah, that is really interesting for the planning stages, as you say, like, you know, you can set up like I know on my way out that I want this thing to collapse and I want it to be a single block that I knock out. Right.
Dennis Gustafsson
Like you can.
Joe Nash
You wouldn't be very stressful to do that otherwise. Fascinating. So this is I guess like a very table stakes question, but you know, what is the technology of the engine? Like what did you use to build the engine?
Dennis Gustafsson
I'm really interested in game technology and I tend to build a lot of stuff myself. Just, I mean there are pros and cons. I could have built Teardown in an engine. It would have been hard because there are no engines supporting that technology natively. So I would have to rewrite large portions of it. And I'm not sure in the end if it would have been easier or harder to do it in something like Unity or Unreal. You get a lot of things for free, but it also takes a long time to learn and you have to keep updating it and all that. But I've always also in the past written my own engines. I really enjoy it. It's a big motivating factor for me. So I'm not really planning on changing that. So I wrote everything I do use for Teardown. I wrote the graphics using the OpenGL API. It's an old API. It was old already when I started. Now it's ancient and we have replaced it since, but that's pretty much it. I do use some libraries for compression, reading images and stuff like that, but it's very low level, small replaceable bits and pieces. It's not built on any existing framework or anything like that. So it's very much a handwritten engine in that sense.
Joe Nash
When you say you've replaced OpenGL, was that with Vulkan or Dreg?
Dennis Gustafsson
It's actually a D3D12. I did not replace that myself, but it was done by Sabre Interactive when porting it to console, that was. Yeah, we needed something else for that to work.
Joe Nash
Awesome. Cool. So you mentioned that you only really got into rendering shortly before starting to build the game and obviously one of the very like commented on things is like the beautiful ray tracing. And it's I think also just as a slight aside, the fact that the like planning phase of so many levels takes part in like Golden Hour is like a fantastic touch. It's Very like, everything's beautifully lit. Excellent choice of time of day for your game. What was the way around that was like you developed an interest in rendering. You were like, cool. I now need to like, you know, I'm gonna. This interest has fueled this game or. Yeah. How did the ray tracing element come about?
Dennis Gustafsson
So I think since I have not been so interested in rendering previously, I kind of missed that whole train of learning all these tricks that you have to do in rendering. I never implemented cascaded shadow maps or all these tricks that people use in order to simulate what ray tracing already does. So I kind of jumped straight to ray tracing instead. And ray tracing is conceptually much simpler than rasterization, so a lot of things is just easier. I think that the choice of voxels was also simplified the ray tracing implementation a little bit. There were a couple of tricks that I used that you can't really do. Not as easy, at least with triangle meshes. And that is in order to calculate what light is blocked, I actually create a voxelized version of the level that is all in memory, where I just represent each voxel as a single bit. So it's basically a bitmap with hundreds of millions of voxels and I can just keep that updated and use that for ray tracing. And it's super fast to just traverse the bits in that grid instead of visiting different objects and all acceleration structures and things that you do in normal hardware. Ray tracing that's becoming popular now. So it's a very custom implementation of ray tracing that only works for this particular game. So it's not really something you can apply to any game.
Joe Nash
That's fascinating. So trace for the implications. I guess I'm most surprised that keeping and maintaining that bitmap and keeping it updated when you've got players knocking houses down in real time, I'm surprised that's performant.
Dennis Gustafsson
Yeah, I wasn't sure it was going to work. I've often gotten the recommendation to why don't you move that to the gpu? Because right now the CPU is actually orchestrating that whole update scheme. And it can be complicated if you have a lot of changes simultaneously on the map. You have to update a lot of objects, obviously, but the CPU is pretty good at orchestrating difficult, complex things, whereas the GPU is not. It's much better at just crunching numbers, just going over big chunks of data and crunching numbers. So it's a pretty hard task for the GPU to do. And I think it turned out pretty well. You can see sometimes it gets expensive if you play the game and you you've driven one of these large boats. There's a yacht for instance you can drive around. That one is pretty expensive to update because there's just so many voxels moving. But for the most part it's not really a bottleneck. You can obviously do that update on the CPU in the background, so you don't really have to do it all at once. You can just parallelize that really well while doing other stuff.
Joe Nash
Fascinating. That's very cool. Yeah, I'd seen we mentioned this blogish probably. Yeah, this is Akko Net's teardown blog. Was one I think I read mentioned that your ray tracing was entirely on the cpu I think, which was very interesting.
Dennis Gustafsson
The ray tracing is not on the cpu, it's actually on the gpu. It's only the update of this shadow volume. These are the bits that block light.
Joe Nash
Right? Okay, cool.
Dennis Gustafsson
This episode is brought to you by WorkOS. If you're building a B2B SaaS app, at some point your customers will start asking for enterprise features like single sign on, skim provisioning, fine grain authorization and and audit logs. That's where WorkOS comes in, with easy to use and flexible APIs that help you ship enterprise features on day one without slowing down your core product development. Today, some of the hottest startups in the world are Already powered by WorkOS, including ones you probably know like Perplexity, vercel, Brex and Webflow. WorkOS also provides a generous free tier of up to 1 million monthly active users for user management, making it the perfect authentication and authorization solution for growing companies. It comes standard with rich features like bot protection, MFA roles and permissions, and more. If you are currently looking to build SSO for your first enterprise customer, you should consider using workos. The APIs are easy to use and modular, letting you pick exactly what you need to plug into your existing stack, integrate in minutes and start shipping enterprise plans today. Check it out@workos.com that's workos.com so we've.
Joe Nash
Spoken a bit about the development of the heist concept and obviously the gap between you starting the engine and the highest concept coming out. I guess my one thing I'm dying to know is the teardowns that could have been. What concepts did you experiment with in that two year period before you landed on the heist?
Dennis Gustafsson
So I was working with a colleague, Emil, and we were trying to come up with different games with this and we did quite a few prototypes on that we started I don't remember which One was the first one, but we did have a heist game that we worked on, but it wasn't really the same concept. It didn't have a timer, it didn't have multiple targets in the same way that teardown does. It was more based around resource limitations. So you had like one explosive and a sledge and they were affecting different materials and you had to be strategic about where you place that bomb. And it was a game, but it wasn't really that fun because if you're given this world with infinite destruction and you have like one bomb, it's just not going to be such a fun game. So that was, I think, the main problem. And with most ideas that we tried and also some idea we had a vehicle or like a driving game of sorts, where the physics and the destruction was more like a decoration, more like a visual effect. And that was something I didn't want. I wanted the destruction to affect gameplay and really matter and not just. Not just be big explosions with things flying everywhere. You actually want to use that for some problem solving. So there were a lot of constraints. And also doing games with fully destructible worlds is a nightmare for a designer because there's really nothing to work with. You're players in this world and you don't really have anything that can limit the player. You can't place. You could place unbreakable walls, of course, but then everything wouldn't be destructible. So everything is destructible. It comes with a lot of constraints on the gameplay. Wouldn't work. Most games just wouldn't work if you added fully destructible environments because they're designed to limit the player. If you can just. If you're going to pick up key card, the yellow key card and you could just take out the walls and pick it up, it wouldn't be much of a game. I think that was the biggest obstacle in trying to come up with a good gameplay.
Joe Nash
Fascinating. Yeah, it's really interesting to hear. Just thinking about the first couple of levels and how concepts like different material hardnesses and stuff come in. How you introduce that, that first level where you're like, oh, I can't just sledgehammer through this wall because it's brick. Ah, there's a window around the side. Like, it's really interesting to think about that. I guess, like escalation of that problem solving experience from the perspective of like finding that hard as a level designer, because I think you've approached that really well. Also the limitations is fascinating because one of the things that really surprised Me in multiple ways. Because you said, now is that first, I guess, like quasi tutorial level, you've just got to smash up the first house. I was like, oh, okay, we've got a house here. There's a couple of pro papers next to it. That's cool. Turn around. Oh, there's free tractors and another stack of propane barrels. They really want me to go ham on this. I was like, so surprised how quickly you were just like, have all the tools do everything. The sky is the limit.
Dennis Gustafsson
Yeah. That tutorial level was actually. It was designed that way that you get two or three propane tanks, but it's not enough to take down the house. So that kind of encourages the player to look around the environment and see if they can find something else.
Joe Nash
It's also very interesting in terms of what, you know, what you said about the example you gave for the limitation of the physics engine in terms of not having structural stress, in terms of if you knock down all the walls of a house, but there's one pillar, there's one pixel still standing, or one voxel still standing, it will stay up. Is then interesting that the, like, the first building to destroy is literally a house where the. The intuition, I think, for most players is going to be take out the ground floor walls.
Dennis Gustafsson
Right.
Joe Nash
It's a good.
Dennis Gustafsson
That was also a very deliberate decision because we knew a lot of people were going to be disappointed for that lack of structural integrity. So we thought it was better to just. Just show it immediately, like, this is how it works. You're not going to get the full thing.
Joe Nash
Yeah, yeah.
Dennis Gustafsson
It would be cool to try and add something like that. You could also fake it a little bit by making the house in multiple parts and join them together with physical joints instead. And we do that for some parts of the buildings, but it's generally quite hard, I think, to enable that on everything.
Joe Nash
Yeah. Imagine you'd start getting into unpredictable behavior, like bits of buildings shaking, even this kind of thing, Right?
Dennis Gustafsson
Yeah. And there was actually one other constraint. In the beginning, when we released teardown in 2020 in Early Access, there was a limitation on this thing that find connected parts. So if you have a really big house and you take down the whole entire lower floor, even the last voxel, it would actually still stand, which was incredibly frustrating for people who took the time to do that. And that's something we updated a few months later. It was a really challenging technical problem, actually, to come up with an algorithm that could do that for infinitely large objects, because you may end up searching the whole level, which is hundreds of millions of voxels, so it can be really slow, but we managed to come up with a good one in the end.
Joe Nash
So you mentioned they're infinitely large objects, which makes me think of modding. So a lot of these constraints, in a normal game, you could be like, okay, well, we don't have to make this super generic, powerful algorithm because we know we're not going to build a structure because it's going to be a problem. But obviously your game is enormously popular with the modding community. And I think, actually there's an article out there that describes it as like the new GMod, which is very. I was very happy to see that description of it. What was your approach to making the game moddable? Was that a vision you had from the start to support the modding community? Was that an emergent use case?
Dennis Gustafsson
It was not there from the very start, but we knew that, or we had a hunch that people were going to be into modding this even before the first Early Access released. So we did kind of prepare the game in order to have a fully supported scripting API and all that. I think in the first version we even had a little bit of mod ability. You could like build an object in the Magic of Oxyl and then import it into the game. And so there was. We did have this idea that we wanted to support modding properly already from the start. And I think for me, that has been the most rewarding part of the whole experience to see what the modding community can do with this. And that's one thing I'm particularly happy about, that it turned out so well and we have so many people spending their free time modding this game. It's amazing.
Joe Nash
And I guess as a developer and as someone who you mentioned earlier, really enjoying building your own tools, how do you think about providing that development experience for your modders? Is there any particular tools or things in the API that you were really interested in making a good experience?
Dennis Gustafsson
I think in the beginning we just did what we needed in order to build the game, but made sure that it was in a format so that it could be used for other things as well. But as time went on, we started implementing recommendations or requirements from the modding community. So now it's been a little bit of a mix between the two. It's not really a full platform. There are still some things that are really hard to do for the modders, like implementing a custom character controller, for instance. Some people have tried and failed, and it's not really, it's very much not designed to do that. So it's kind of hard. And I think at this point it's going to be hard to change the API because we have so many mods using it, so we're a little bit locked in. And I guess that's the downside with all software when that you keep updating that you kind of get locked into a corner. And there are definitely some things I would have done differently if I knew where it was going, but for the most part, I think it turned out fine. Actually.
Joe Nash
I realize this is a really hard question on top of your head, are there any mods or the work of modders that really surprised you, where you were like, oh, I didn't think anyone would be able to do that with this engine.
Dennis Gustafsson
Yeah, there's a lot of them. I think the first time I felt that must have been the portal gun. Someone obviously implemented the portal gun in Teardown and that. I was just amazed. This shouldn't be possible. They had like a rendering from within the portal using. We didn't even have a way to draw pixels on the screen, so they were using the UI API to draw big rectangles and they just did lots of them. And doing Ray cast, it had their own little ray tracer from within the scripting language to render the portal and then put them in the world using sprites. And it was. It was just incredible and not something I would have ever thought would be possible. So, yeah, things like that are really fun to see.
Joe Nash
So also, the game has been around for a while now, and you've been, you know, it's been a journey, like you've been acquired and then, I believe Saber are no longer part of the chain. You're directly under Embracer, is that correct?
Dennis Gustafsson
Yeah, there's been a little rough path last couple of years. I sold the company to Sabre Interactive. They were owned by Embracer. And then about maybe half a year ago, Embracer got rid of Sabre, or Sabre got rid. I don't know, they were changing ownership.
Joe Nash
Embracer did a lot of things about half a year.
Dennis Gustafsson
Yeah, they did a lot of things back at that time. And in that process, Embracer really wanted to keep us, so we changed owner to be under Embracer instead. It hasn't really affected us that much, I must say. We do have a little bit more control now, which is good, but it's been relatively smooth, I would say.
Joe Nash
Yeah. So across all of that, you know, game is reaching level maturity. It's got a great user base building great Content on it. How are you thinking about the future of Teardown or of Tuxedo Labs? Are you, you know, is there anything else cooking in this engine? You think about future titles? Are you working on more stuff for Teardown?
Dennis Gustafsson
Yeah, I've been doing for the last. I'm actually not that much actively working on Teardown anymore. We now have a good team doing updates and working on that. I've spent most of this year actually researching new technologies and new types of rendering and whether some of that ends up in Teardown or a new title is not really decided. But it's been a lot of fun to get back to more tech research. I haven't really done much of that in the last six, seven years. It's been mostly just crunching out features and code for the existing one. Really happy to be back at that.
Joe Nash
What is it that's given you that space to do it now? Is it just because where Teardown is, is it life cycle or is it like a stage of Tuxedo Labs growth?
Dennis Gustafsson
I think the main thing that enables me to do that is the fact that I sold the company because I wasn't really interested in running a company. It was quite surprising to me how Teardown took off and I had to spend a lot of time, you know, salaries. Management is just these day to day things you do when running a company that I don't enjoy at all compared to technology and programming. So that was the main motivating factor for me to sell it and kind of take a step back and really focus on the technology. And it's been taking maybe a year to do that full transition to have build a team that can take over all those tasks of maintenance so I can focus on something new. And I think that kind of happened beginning of this year. So awesome.
Joe Nash
Very cool. Yeah, it sounds a lot like the story of the Zatronics acquisition as well, where he was just like, I don't want to be running this company, I want to make cool games and yeah, very, very understandable, very understandable impulse. I don't want to push you on revealing a gear version reveal in terms of what you're doing with it, but you mentioned up and coming rendering technologies that you've been looking at. Is there any particular named techniques that the audience might be interested in?
Dennis Gustafsson
I finally learned Vulkan.
Joe Nash
Oh, nice.
Dennis Gustafsson
I've been stuck on OpenGL for so long mostly because I'm lazy and now I took the time to learn Vulkan. I'm not sure I really like it. I think it's a bit too low level for me. It's just you have to do everything yourself, even the not so fun parts. But the reason I wanted to learn Vulkan was to get access to this hardware ray tracing that's been cooking for I don't know how many years now. Did it come in? Was it 2018 or something when it came out?
Joe Nash
I think yeah, it was when the proprietary RTX cards and whatever start landing. Yeah, yeah, think about that.
Dennis Gustafsson
Yeah. And it's actually really useful. Even when. When ray tracing voxels. I thought that it wouldn't be so useful for rendering voxels because it's designed to work with triangles, but it turned out that it's actually quite useful for what we're doing. So I've been looking into that quite a lot to build a fully hardware ray tracing supported graphics pipeline, which has been really cool because then you can do proper path tracing and you get much better lighting and performance is awesome. And you get around a lot of restrictions that we had. We had a limitation on the world size, for instance. We couldn't have more than 4,000 voxels across the world because of a texture size limitation in OpenGL. And now that we have hardware ray tracing, we don't really need this big bitmap of voxels. We can just operate directly on the objects. And also trying to get rid of restrictions that make life easier for modders to build, make it easier to build content and faster. That's what I've been focusing on the most. And also starting to look into physics again a little bit. It would be something I'm wanting to get back to. I haven't really done that much yet in that, but I'm slowly getting there.
Joe Nash
Is that just perspective of like, you know, just revisiting that it's been a while. Or is there like, you know, kind of the same with rendering? There's new hardware that's enabling you to tackle problems again?
Dennis Gustafsson
Yeah, I don't think from a hardware perspective, it's not really. Not that much you can do. Well, you could do some physics work on the gpu, but it's not really well suited for it. So it's more about technologies and algorithms and also other types of simulations. I've been looking into fluid simulation, for instance, a little bit, and also soft body simulation and see if that can be combined with voxels. Yeah, there are some things cooking. I have shown a little bit on Twitter about that, but I expect that to be hopefully a lot more during fall this year.
Joe Nash
And going forward, the fluid's particularly exciting here. I mean, there are water based shenanigans in teardown very, very early on. So, yeah, that's a very exciting area of exploration. Awesome. Well, Dennis, thank you so much for your time. I think I've run to the end of things I wanted to ask you and, yeah, it's been absolutely illuminating. Thank you so much.
Dennis Gustafsson
Yeah, thank you for having.
Joe Nash
Sa.
Software Engineering Daily hosted an enlightening episode featuring Dennis Gustafsson, the visionary founder of Tuxedo Labs and the creative force behind the acclaimed sandbox puzzle game, Teardown. Engaging in a comprehensive conversation, host Joe Nash delves into Dennis’s extensive 20-year journey in game development, his profound passion for physics in gaming, the intricate mechanics of Teardown, and the future technological ventures on the horizon.
Dennis Gustafsson's foray into game development is deeply intertwined with his fascination for physics rather than rendering. Clarifying misconceptions early in the conversation, Dennis states, "My main interest has always been physics in games and that's also where my main part of my career has been" ([02:24]). This passion was ignited during his university years while studying media technology. Unlike his peers who were captivated by rendering, Dennis found the interactivity of physics more compelling. He reminisces about early inspirations, mentioning games like Carmageddon 2 and a pioneering dinosaur game that allowed object manipulation, which fueled his desire to explore physics-driven gameplay ([02:36]-[03:54]).
At the heart of the discussion is Teardown, a voxel-based sandbox game that centers around executing high-stakes heists. Dennis provides a succinct overview: "Teardown is a voxel sandbox game where the gameplay is based around heists..." ([04:05]). Unlike traditional voxel games such as Minecraft, Teardown distinguishes itself through its highly interactive and fully destructible environments. Dennis emphasizes the unique physics-based destruction mechanics, explaining that "when you remove something and explode something, they actually fly and rotate and behave like actual objects" ([04:53]-[05:21]). This level of realism elevates the gameplay, making every environmental interaction meaningful and strategically significant.
Dennis’s journey with Teardown involved developing a bespoke engine tailored to harness the power of voxels for both rendering and physics. The inspiration stemmed from MagicAvoxel, a voxel modeling program that showcased stunning visuals, leading Dennis to believe in the potential of voxels for game development: "The idea for the voxels started... it was also kind of perfect for physics..." ([07:02]-[08:19]).
One of the primary technical challenges was implementing efficient ray tracing within a voxel-based framework. Dennis shares, "Getting all that to run in voxel space and make it more correct, that was quite challenging..." ([09:00]-[10:29]). Despite initial concerns, Dennis found that collision detection and physics interactions were more manageable with voxels compared to traditional triangle meshes, although implementing structural integrity—ensuring objects break realistically under stress—remains an ongoing challenge ([10:50]-[12:17]).
Teardown's rendering engine was meticulously crafted using the OpenGL API, allowing Dennis complete control over the voxel-based rendering system. He elaborates, "I wrote the graphics using the OpenGL API... It's very much a handwritten engine in that sense" ([12:39]). However, recognizing the limitations of OpenGL, especially concerning hardware ray tracing, Dennis has embarked on transitioning to Vulkan. This shift aims to leverage hardware-accelerated ray tracing to enhance lighting and performance: "With hardware ray tracing, we don't really need this big bitmap of voxels... we can just operate directly on the objects" ([31:20]-[33:16]).
Dennis discusses the innovative approach of maintaining a voxelized version of each level in memory, represented as a single bit per voxel, which streamlines shadow calculations: "I actually create a voxelized version of the level that is all in memory, where I just represent each voxel as a single bit..." ([14:03]-[16:29]). This method significantly optimizes performance, allowing for real-time updates even as players manipulate the environment extensively.
Teardown's flexibility and robust modding support have cultivated a vibrant community of creators. Dennis reveals that while modding wasn't the initial focus, the team's foresight led to comprehensive support for modders from the outset: "We did have this idea that we wanted to support modding properly already from the start" ([25:15]-[27:29]). This dedication is reflected in the game's scripting API, enabling players to craft intricate modifications. Dennis highlights a standout mod where players implemented a portal gun, showcasing the community's ingenuity: "Someone obviously implemented the portal gun in Teardown... they were using the UI API to draw big rectangles and... put them in the world using sprites" ([27:20]-[28:16]).
The ability to modify and extend the game’s mechanics not only enriches the player experience but also perpetuates the game's longevity and relevance in the gaming landscape.
The conversation transitions to the business side of Tuxedo Labs, where Dennis discusses the company's acquisition by Sabre Interactive and the subsequent transition to Embracer. Despite the changes, Dennis notes that the transition has been relatively smooth, granting the team greater autonomy: "We do have a little bit more control now, which is good, but it's been relatively smooth" ([28:28]-[30:09]).
Looking ahead, Dennis has shifted his focus away from active development on Teardown, entrusting updates and maintenance to a dedicated team. This strategic move allows him to delve into new technological explorations, particularly in rendering and physics simulations: "I've spent most of this year actually researching new technologies and new types of rendering..." ([29:23]-[34:02]). Among his interests are fluid and soft body simulations, which promise to push the boundaries of interactive environments in future projects.
Dennis's foray into Vulkan marks a significant step in advancing Teardown’s rendering capabilities. Although he admits that Vulkan's low-level nature presents a steeper learning curve, the benefits of hardware ray tracing are undeniable: "It's actually really useful... you can do proper path tracing and you get much better lighting and performance..." ([31:20]-[33:16]). This transition not only enhances visual fidelity but also removes previous constraints, such as the voxel grid size limitation imposed by OpenGL.
Furthermore, Dennis is exploring avenues to integrate more sophisticated physics simulations, aiming to enrich the gameplay experience with more dynamic and realistic interactions: "I've been looking into fluid simulation, for instance, a little bit, and also soft body simulation..." ([33:26]-[34:02]). These innovations hint at exciting developments both within Teardown and potentially in future titles from Tuxedo Labs.
The episode wraps up with a reflection on the successes and challenges faced throughout Teardown’s development. Dennis expresses immense satisfaction with the game's reception and the creativity of its modding community. He remains optimistic about the future, eager to apply his technical expertise to new projects and continue pushing the envelope in game development: "I've been wanting to write that up for some time... It's been a lot of fun to get back to more tech research" ([09:00], [29:23]-[34:02]).
Dennis Gustafsson’s insights offer a compelling glimpse into the intersection of physics, rendering technology, and interactive gameplay. His dedication to innovation and community engagement underscores the enduring appeal and technical prowess of Teardown, solidifying its place as a standout title in the realm of voxel-based sandbox games.
Notable Quotes:
Dennis Gustafsson ([02:24]): "My main interest has always been physics in games and that's also where my main part of my career has been."
Dennis Gustafsson ([05:21]): "They're still on a grid, but each object is on its own grid. And then the whole grid can rotate in the world and move around freely."
Dennis Gustafsson ([10:50]): "There is one clear candidate for this question and that is the structural integrity."
Dennis Gustafsson ([14:54]): "So since I have not been so interested in rendering previously, I kind of missed that whole train of learning all these tricks that you have to do in rendering."
Dennis Gustafsson ([27:20]): "Someone obviously implemented the portal gun in Teardown and that... they were using the UI API to draw big rectangles and they just did lots of them."
Dennis Gustafsson ([31:20]): "It's actually really useful... you can do proper path tracing and you get much better lighting and performance is awesome."
This comprehensive summary encapsulates the depth and breadth of Dennis Gustafsson’s conversation on Software Engineering Daily, providing valuable insights into the technical marvels and creative vision that underpin Teardown’s success.