So, this is a difficult game about climbing. What is this mess? Tell us how it works. Um, so it's all one huge level. The whole game? Yeah, the whole game is one huge level. So, I can zoom in here. Let me just do something. I think we might screw something up here. It might be a little weird. Let me just try reset everything cuz everything it Yeah, I had a feeling. Okay, Thomas, I should have prepared a little bit. I wanted to get This is the same with Daniel Mullins. Daniel Mullins when we opened up inscription, it was all broken, which is hilarious. Yeah, let me just get back to the beginning of the game. Okay. So, I have a cheat where I can fly obviously. So, okay. So, this is the beginning of the game. I think most people who have tried it or seen it recognize this part. So, you come up here and we climb. And that's great. And how does the water work? So, the water is generated uh at runtime. So, right
now there's nothing. This is just a this is not the water. This is just like the background water. Yeah. And so, the water is generated when you start the game. It just generates like I kind of explained it pretty well in my video I made, but it just generates water. Uh and um based on just little I think I'll if we Oh, you know, it just generates water, Thomas. It just generates generates water. Yeah. Come on, man. You don't know how to do that. Okay. So, now we should be able to Yeah. So, now you can kind of see the water here. Yeah. So, it's just like a card, like a layer. Is it matching directly to the 3D of the plane? Yes. So it's sort of like Oh, so the water is generated. Where am I? So there's a plane that goes like this and attaches to a point and then it generates a plane backwards as well. Right. Okay.
So from a third party perspective or whatever, you'd have this wave. This is from And so it just draws straight down like this polygons. Uh-huh. Okay. And then it also draws it in that direction. Did you code this from scratch, bud? Yeah. What? That's not super It's not super complicated, actually. It's pretty simple. There's some tutorials online. You kind of have to They're very bad, but like it gets you started at least. So, it's like just like It's like this, right? Mhm. And so, it makes sense. I just don't know how to do it. Uh it took it took a few days for sure. Like Okay. Well, I'll get I'll get Chad GPT to do it for me. Yeah. Yeah. Yeah. Yeah. Yeah. That that's the solution. You even see how there's like a bit of a misalign here. You can And that's why you have that line there. It It's a nice clean seam. Yeah. So, the line is because you want ah you want like a bit of a refraction. See that? Yeah. Right where the surface is. Um that's so cool. That's genius.
So, I put that line like on top of everything. And then I don't remember exactly how I did with the shader here, but it was a bit of a shader trick to put him in behind the water. Mhm. But not fully because there's a bit of a thing here where the game is actually rendered using three cameras. I think this might be what I get asked about the most, like how is this game rendered? Like what what's going on? So, I don't know. Can you turn off cameras? Yeah. Okay. So, I'm going to turn off all other cameras. So, this is the main game. This is the main camera. And the reason it's like just doing that weird stuff in the background is because there's nothing rendered there. So, there's the main camera which renders the game, which is an orthographic camera despite the fact that it's Oh, could you click on the main camera for me? I want to see the settings. Sure. Okay. I was Okay. Yes.
orthographic because it's really hard to make a a a game with precise with precision when it's not orthographic. Is that correct? Exactly. Like I could probably switch this to non-orththographic and it's completely broken obviously. Yeah, actually. Yeah, you can't really see anything. Never mind. You can kind of see a little bit of parallax if I fly around. If you look at the tires and stuff. Yeah. But then if we increase the field of view, you might you might see it a little bit more, but yeah. Um Yeah. Okay. So now it's actually in 3D, but then you can see how we have parallax on that rock. I don't know. This is probably motion sickness inducing. I can see it. Yeah. If you look at the wheel, you can really see it. Yeah. And it might even look better, but it just it makes it like it makes it like it was very difficult. Like maybe this section looks good, but then there are other sections which just wouldn't have worked out. Like this actually looks pretty good. Well, the game is all
about if if it's a rage game, you better be sure that the hand looks like it's actually on the right spot or people are going to be pissed off cuz it's like that just a subtle a subtle change in perspective is going to make them feel like, wait, I was touching it or I was holding it in reality. In reality, the camera made it look that way. Exactly that. I agree. Like that's what I was feeling as well. It's like it's got to be uh it's got to be precise. Like it can't be there can't be any confusion. So um yeah. So what I did was I'll just restart the game so that we're not like totally okay. So this is the game, right? So this is the main game camera which is only rendering the stuff that you can climb on. But this isn't very interesting, right? So I was like, well, we need another camera which renders the background. And I'm pretty sure this is how Bennett Fod's game is rendered as well. Like you'll have an orthographic plane and then a perspective plane for the background. So
if we turn on the background camera, now we actually have a background. And you can see that there's parallax. If you look at the tree, it's got parallax. It just looks a lot nicer and it kind of Oh, yeah. makes it look a little more interesting to look at. But uh I I think it's like everything. I think it's so crucial. Yeah. It's it's what makes the game feel scary. Totally. Gives it height. And so then the other thing is I wanted also to have things that block you that it's like, oh, you can you can't go through this rock, right? Mhm. Like you can fall and slide on it. Same goes for up here. Like I wanted these rocks to be like a protective barrier, right? The problem is like it looks like you can climb them, right? Like there's no there's no perspective on them. They're orthographic. So I was like, well, what can I climb on and what can I not climb on, right? Like I don't know if that but here it's like what tells you that you
can't climb on these rocks here over on the left, the darker ones. So what I ended up doing was to um create another camera which is the foreground camera which also renders in perspective. Boom. Like that. Oh. So let me just go full screen. So that that is you can see how that comes at you. And the reason I couldn't use the same camera for the background and the foreground is because obviously the foreground should be on top of the game and the background should be behind. So, I unfortunately had to do two cameras. Maybe there would have been a better solution, but so now you can really feel how that kind of just like you can see that I can't climb on that, right? Because absolutely a it's coming at you, but I also created a shader that depth ramps off like the so the closer it is to camera it goes darker. Smart. That is, you know, you really feel like that's probably not climbable. Same if I come back down to here, like you can see how dark it is
and how it, you know. So that's how I solved that. It took me quite a while actually to figure out how to make it clear that you can't climb it. But I think I think it worked. I don't know. What do you think? I think I think it's perfect. And I think you're following a lot of like game design rules there just subconsciously. Um games like I said earlier that these Rage games, their foundation is clarity. Uh yeah, clearly communicating what is and is not the rules. Um and if you were if you didn't have that foreground, I think that there would be so many people who felt like it was just unfair because they're like, I I thought I grabbed something I should have grabbed. Yeah. Um this is great, man. You know what's funny is when we look at it from the editor's perspective or from the scene view, there's there's a sense of relief that I get in seeing this because when I first played this game, I'll explain what I mean by relief. When I first played this game, I felt like such a fraud because it looks so clean and it's like the way and this
is true with every game, you know? It's like it looks so like the developer was so so perfect in their development. It's just so clean and perfect. And when I was playing it, I was like, it's just so precise. And I'm sure it is precise, but when we look at it from this angle, it's like there's a lot of of it. It feels messy. Smok and mirrors. Yeah, that's right. And I think a lot of developers listening and watching right now, I think they might feel relief, too, because when they're in their projects, they're like, "Why does my project feel so gross? Why is it when I open it up, it's like opening a trash can?" Yeah, I know the feeling. And I think every developer is It feels that way, you know? They just Totally. Yeah. There's a lot of cheating I had to do like the arms. I had that in the video as well, but like I had to do this. That's so funny. which is, you know, to get the shadows right to connect. Can you can you uh possibly move the camera so that we can see it in real time? Uh, how do I do
that? Like uh just grab your like that. That's so funny to me, dude. Yeah, it's pretty weird. In your head, you're like, "This is just the way the guy looks." But in my head, this is how it goes. Yeah, but it's like I tried a lot of different things, but the problem is if I push him closer to the rock, then I started getting intersections and stuff. And actually, I also had to write a a shader that kind of cheats so that the guy is always rendered on top of the rock no matter what. So even if he penetrates, you're still he's still on top. But the shadows obviously get screwed up. But this was basically the best way to because it was really really important for the shadows to connect even if the arms look a little long sometimes. Yeah, but uh yeah, to just to really feel like, oh man, my hand is actually on that surface. Like without the shadow, it just wouldn't work. So I mean, if you turn the graphics down, you don't have shadows. But I mean, yeah, that's how it goes, right? Can we talk about your use of lighting and fog
really quick? Sure. Yeah. Yeah. Yeah. Just ask questions and I'll do my best to answer. go ahead and um give us an idea of of how you're using fog to basically make it look like the background is more detailed than it is. Oh, okay. So, this is a trick I learned from working in VFX um many years ago. So, you can see here how it looks like there's mountains in the back and stuff, and we've got a little bit of subtle fog going on the ground, but really all it is, it's just like a depth ramp that I'm coloring. So, I've got this system where based on where the player is in height of the map, it changes the background. So, you can see as I progress up, we now we're more green, right? So, if you look at the bottom of the screen, we're more of like a sunset orange. And then we come to this green section and then it changes more into this sunset and now it gets dark.
How did you do that? Um it's pretty simple. It's like um are you using Unity's global fog system or uh No. So I'm using a plugin that's called is it called volutric fog? I think it is. It's on the asset store and it allows you to create like fog and that's what I'm using for clouds and fog. But how the sky changing script is working is that basically there's I have these objects. See? Okay. So here's an object. So here's a sky thing. So I have this folder. Oh no, that's so annoying. Oh, because I Right. So I have these balls here. So when the player reaches this point, it changes the So I have these like different things like start area, jungle, jungle 2, Rome, and each of these, you can see I have a bunch of
different color values and parameters. So it's just basically changing the post-processing and the depth processing. Yep. And so I can just add these into the game and then whenever the player reaches that point in height, it will update everything. Brilliant. So you can kind of see how it looks pretty bad in the background. Like I just have this one material for everything. Mhm. To economize a little bit. And it's all actually one object. Just one material. Yep. Uh even the boat here. You can see man. What are those? Oh, these are uh when I generate the um reflection probes like I wanted to have uh if you look at the water I see. Yeah. Yeah, you'll see. Uh so see that highlight in the water like there's like a bit of a bright highlighting in the water that's coming from those boxes cuz when I took it off it was just like totally flat. See the details? Yeah. So I added those.
Brilliant. I love that, man. Um okay, another question is um so let me just hold on to finish what I my thought here. U yeah so everything looks bad but in the game it looks good. So, I'll show you what it looks without the post-processing that depth layering. So, this is, you know, kind of looks okay, I think. And it also helps to just like fade off the background. Not important. Not a bunch of colors, right? Very monochrome. Like, you're supposed to focus on the guy and the rocks. So, but if I turn that off, you'll see how it might not look so good anymore. Um, where's the camera? Main camera. So, I think that is the foreground camera. That's actually that's probably the background camera. So here I have post-processing scripts. So this is what it looks like without that. So that's not very good. No. Um, so yeah, you can really do a lot with just using the the Zbuffer that comes out from Unity automatically and
just coloring that and tinting it and stuff. That's right. I don't know if you're using that for your game, but Yeah. I mean, I just use a standard fog and then I mix it with a volutric fog. Yeah. Like I wanted the control, right? like I didn't want to I didn't I know I don't like the black boxiness of the Unity volumetrics. So I was like I just want a simple gradient. Right. That's right. So that's what that does. So um let's talk about optimization here. Okay. And then we'll wrap up. Um you've got the whole game here. Mhm. What's being rendered? Uh well, how do you do this? Okay. Yep. Yep. What happened to my occlusion baking? I think because I'm making a new map, it's probably broken potentially. Um it looks like it is. So, but it it's a collision calling, right? Are you doing any other sort of optimizations like
baked lighting? Um are you are you doing uh asset streaming? Are you loading certain sections of the level or is it all loaded by default? I'm obviously I'm using the built-in occlusion culling in Unity. And the way it works is that you can see how it kind of just populates the game as I climb up. Yep. So, it's kind of very automatic as you can see. There were definitely problems with this because I do have an orthographic camera and perspective cameras. There is also even a bug with the shadows which I couldn't do anything about. So, it's rendering more shadows than it should. But yeah, it's terrible. But it that's and that's also I want to make my own engine at some point. But can we can we click the stats button if you don't mind? Sure. Um I want to see um I want to see what your tries and your batches are. Yeah, your batches are looking really good. Anything below like 500 is great for mobile. Yeah. Where are my batches? like
uh to that right now. Right. Yeah, they're at 100. Um which is great. Uh yeah. Um yeah, 100. Yeah, I tried to my goal was to sort of keep it at around 100 or less, you know, if possible. Sometimes it goes up to 200, I think. But so yeah, I used uh Mesh Baker to just combine meshes. And you can even see how they pop in. like this is all one big mesh, but obviously they were initially just like rocks that I populated like little rocks and then I just used MeshBaker to just take chunks and combine them. Can you tell me about that? Does that does that actually help your optimization? Yes. How much? Tremendously. Uh I mean it brings your batches down like crazy, right? Okay. Do you only do things that This is helping me cuz I need to do this for Twisted Tower. Yeah. Uh we have like Cuz everything's a separate prefab. Like every little thing. Okay. Um, it's not like they're individual objects. Like what I mean is like we're using like 20 prefabs for railings and we just snap
them together. So my question to you is is did you do it with just groups of objects or did you do it with the ones who had the same materials? Um, well I in MeshBaker you can create texture atlases for assets. So what I would do is I would I mean I'll see if I can find an example of this to just show you. Uh maybe I ultimately ended up cheating. I'll have to I'll have to check, but I'm pretty sure there were. Yeah. So, these are single objects. Obviously, you mark them as static, which I'm sure you've done, which then Yes. like these two are obviously the same object, and so they're marked as static, so they should technically be automatically batched. But it doesn't always work that well. So, you want to be careful about not doing that too much. Why though? Why doesn't it automatically work? Well, because I thought I thought Go ahead. you as the designer, you're better at knowing what is rendered on the screen at the same time, whereas the batching will try to figure out like, oh, well, you know, they're they're this far
apart. So, when the camera is here, I can render this without rendering that, but then they need to be not in the same batch. And then all of a sudden, you end up with like two draw calls for these because they were too far apart. Whereas you might be like, look, it's better to just combine them and even though we'll be here, I'll render this off screen anyways because it'll bring down the batch and, you know, combine everything. Here's a good example of a texture atlas because I know you were kind of asking Jonas about that. So, if you take a look at these rocks, this is like clearly a bunch of rocks that are the same that are just duplicated. Uhhuh. And then this is a rock with a different material because it has the moss on it, right? Yep. But if I look at this material, I created an atlas which looks like this, right? So it How do I Hello. Okay, so you have an atlas. So I I knew that I was going to be like, okay, I
have these different rock types that I would like to use, right? And I know that they're going to be kind of close together. So I'll create an atlas of these variations. And then when I put the rocks in there, I can just choose which which texture to use, but it's all going to be the same material. So, you know, I tried to think about zones, right? Like, okay, probably I'll have these type of rocks in this section, and then further up, I'll have different types of rocks. I'll create a different atlas. And you can do this even after you've placed everything out because the mesh baker once you it it takes a little bit of learning but once you do the tutorials and you kind of understand how it works it's very easy to just like select objects bake mesh bake textures pop and it just spits this stuff out. But if you if if you're constantly creating new texture atlases um doesn't that mean you're you're creating a bunch of different texture atlases for your game or are you reusing them? Well, I didn't do any atlases until I was done. Okay, let me share let me share my screen so I can ask the question better. Okay, I should probably mention I am no
optimization expert, but I just like watched a ton of videos and read a bunch of stuff when I had already built this game completely incorrectly, right? And then went through and and optimized. Well, I think you're doing great. I mean, you you have a massive 3D game and it's you're 100 batches, which is just great. All right, so I'm going to enter play mode here. I'm going to show you kind of what's going on. Mhm. In comparison to your scene, I'm looking at 16 1,800 batches. Right. Baby, baby, baby. Okay. Yep. Now, now we're cooking. Holy. Yep. That's right. This is why people are getting uh issues with the performance. See that? Yes. But now, if I turn shadows off. Okay. Wait. If it's on, if shadows are on, I've got 7,000 batches. Okay. Um, if I turn it off, let's double check. Did I Did it actually do anything? If I turn it off, I'm looking at 1,500. Right. So, shadows
cause a crazy batches issue. Yeah. Now, let me show you kind of what's going on in the scene and maybe you could try and um clarify why what you did makes sense and why I did what I did didn't make sense. We should also say that you have a 3D game and the player can rotate around and this game looks much nicer than my game in terms of assets and detail and different stuff. So, I mean you are going to end up with more batches than me, you know. I I agree, but I think I should be aiming for 500. Um, okay. So, let's take a look here. So, I've got these two separate ones here right now. You would you would say you would use MeshBaker to just pop those together. Well, they're marked as static, so it's not probably not a huge deal. They probably would be chunked together, but I mean, yeah, ultimately I would do that. And then uh the the brick on the wall, that's just a poly that's a ProTools mesh. Okay. So, not a ProTools. What am I
saying? A Pro Pro Tools. That's a audio tool. Uh ProBuilder. A ProBuilder. Yeah. Yeah. Yeah. Okay. I've never used that so I'm not quite sure how it works but it's like I would say like that should all be the same material as uh the pillars like that should be texture atlas together and like anything that's like within the Yeah. Yeah. That's what I would do at least. So it's like anything that's like definitely always going to be together. I think that should be like you could turn this whole room into like one mesh or like you could split it up into like four different meshes or something like that. Really? That would be better. I you have to test, right? It depends, right? But yes, in general, it is. And that's not because of occlusion culling. It's because of the textures. It's because like anytime you render anything with a different material, you you you're b you're boosting up the batches and they have and the computer has to do another drop call. And then when it comes to shadow casters, like every like it gets multiplied, right? Because every time you have a new object, it has to create a new shadow
caster for that. Whereas if everything is combined, it just one shadow cer. So So if you have like a million polies on that object, then obviously that might also so it's a bit of a like it's a bit of a balancing act like because if you just combine this entire room into one mesh and it's just like a massive atlas and that means there's no culling going on, right? So that's probably not good either. So okay, I don't know what the I mean that's the thing like you kind of have to just play around. Um h and also how many lights do you have in the scene that cast shadows? Um let's see here. A lot of them are baked. Okay. So they don't cast realtime shadows. So here's the real time. These are the only real time lights and they all cast shadows. No soft shadows there about 60% of them. 70%. Yeah. Yeah. See, I have like two
lights that cast shadows in my game. Yeah. That's what I found. Yeah. So, what you can do, I guess, is like one thing you could do that a lot of games do is that they will create like a maximum light count for how many lights are allowed to cast shadows at the same time. I think actually Unity does that by default, doesn't it? In the uh render settings. I don't remember, but it's something that you should look into that it's like you can set a maximum shadow cer count so that like on the lights so that maybe you have like a maximum of four. You may need to build this yourself, but it would be pretty simple because what you would do is you would just say like the closest four lights to the player. Those are allowed to cast shadows and that's it. And that's it. And then further away lights don't cast shadows. Oh, I could do that. Might lead to some popping. you may want to do some fade in script or something, but it's just something to play around with that might really bring down your batches, right? But then, yeah, combining materials and meshes that go together is
generally a good idea, I would think, cuz like I'm wondering, go ahead. Check in pro like so the meshes you have for the walls, you have walls and then you have arches. Are those how are they different meshes? The way it works is uh like this is the the base layer. Yeah. Which I don't see a problem with this. It's really low polish. Yeah. It I mean look at it. It's just like one sided. So I think it's fine. That's fine. Um but there then the set dressing is all separate prefabs. Right. So what about like you have like arches there. Mhm. Those are those are prefabs. So is that a different type of mesh compared to the wall? Yes, these are all these are all Blender and then the wall is pro uh uh probuilder. Okay. So, what I do and this might take a long time for you to do but and this might not be the best way to do it, but I can show you
something that I probably shouldn't show you because it's for a new level. And so, what I started doing is I started level designing in Blender. I don't know. Can you see this? Mhm. So, for example, here I have a lot of different shapes and objects. Like I have this, I have that, I have that, I have that. And so, this is the starting level for the new or starting area for the new level, which is like a sewer system. And so, I have all these like there's like an arch here, there's a thing here. And so if I were to just like export these separately into Unity and put them in the game, then they would all draw a different batch because even though they share the same me material. Yes. Because it has to for the batching system to work. Unless I'm wrong. So maybe somebody in the comments can correct me if I'm wrong here, but I'm pretty sure that unless the mesh is also identical, Unity's batching system doesn't batch it. So it becomes two draw calls. So what I'm doing here is that I'm creating segments for the map. So for example,
here's uh segment one there. So I take all of this and just create one exported mesh out of this, which then in Unity means that I only have one mesh, one material, right? Whereas otherwise this would lead to like one, two, three. Why doesn't Unity Why doesn't Unity static badging do that for you? Yeah, that's a good question. Um, it's just something that, and again, like I I think like somebody should confirm this and you should confirm this as well, but last I checked it's like it has to be, and I was reading this on the forums of Unity, so I could be wrong here, but that the mesh needs to also be the same, which is not so good. I mean, we should we could do a test, but it would take a while. But like, you could do a test of that. I'm gonna what I'm going to do is I'm going to I'm going to take that one scene that I'm working in and I'm going to use Mesh Baker and I'm just going to play around with it and see if I can reduce those batches. Yeah, like what I did is I just I just created a
duplication of my scene and just started like baking everything and then I just got way better performance. So yeah, you can see the same thing goes for here. This is another material, right? Like more of a rusted material. And so these are all separate objects. So yeah, what I ended up doing was to just combine them all into one. Uh would just controll J and it's boom, done. Well, yeah. No. Well, I don't do that. I just like have them separated and have them in a collection. And so I have here I have like a pipe. So these these this is how I split it out. So this is like wall rust. That's one material. So if I double click that, that's all the rusty objects, right? Oh, and then Oh, you're grouping it based on materials. Yeah. And so when I when I export like so here's one for example that I want to chunk right and I've got the pipes that like these pipes. It's not perfect yet. I'm still working on optimization but that's so when I do export I have like a a preset export settings. So I'll do export OBJ and I have like a two Unity
here. And so then it's like include selection only. So because I've now selected all these objects in the export event they get combined into one mesh. So I don't have to like combine it inside Blender. But So you're not using Substance Painter at all. Uh I do for texturing. Yeah, sometimes. Yeah. But I'm moving away less and less because I want to kill off my subscriptions and stuff. I've been thinking about buying the You can actually buy Substance Painter in Steam or something and get a perpetual license, but I'm just like I really don't I don't know, man. I just I don't like Adobe. I want to get off Adobe. But so far, yeah, it's been pretty good, unfortunately. So, Yep. But I don't know. Does that make sense? It kind of does. Not really. I I need to I I I've I've learned everything about optimization except for what like which meshes to combine. Like I I'm I've gotten really good at baking like light light maps and stuff. I've gotten really good at that. I need to look into it
more. But from what I can gather, and I I I met with uh a previous podcast guest today, his name is Conrad, and he um he helped me realize that the shadows were a big problem. So, shadows are a problem. And then and and this is for everybody listening who's making a 3D game in Unity, in particular, Unity, I don't know, Unreal, but in Unity, shadows are just brutal. Yes. like you cannot use you got to bake them or have like one totally um light source and then also uh static objects are not what you think they are at least in terms of batching at least I I can't quite figure it out yet so I need to figure that out it's one of those things where it's like it sounds wonderful and beautiful in theory but it seems to me my understanding was that in practice it's not as great as we kind of want it to be because I thought the same as you it's like well as long as it's the same material it should just be able to combine the meshes. Like what's the problem? But for
I don't remember now and it's like over a year since I did this. So I'm probably talking out of my behind now, but I seem to remember that that was the problem. It's like well actually you can't do that. And also if anything is moving obviously then it doesn't work. Okay, I'm going to let you go here. Thank you so much for your time, dude. That was a lot of fun. That was I learned a lot today, Thomas. Thank you for talking to me. I don't know how useful it was to the rest of the folks out there, but I um it was great to just talk about uh you know, state of mind when making games. Do you want to link in the description for anything? Um I guess my Twitter if if anybody wants to meet up that misses my YouTube videos, then uh you know, I'm more active on Twitter these days. So if you just want to talk to me or ask anything, then Twitter and maybe my game, a difficult game about climbing if you want to check it out. Uh, so Steam Link. Yeah. You may also be wondering how to turn that $100,000 or million dollar game idea into actual money. And some of
you might want to do it before you even finish your game. For that, I have a gift below for you. It's totally free. It's a workshop that shows you how to turn small game ideas into actual
Auto-generated captions from YouTube — names and numbers may be misheard.
Thomas Brush · 2026
Thomas Brush · 2025
Comments