Come welcome. Everybody come on in. We're going to make Twisted Tower today. Guys, I'm so excited. Sorry, I'm updating some stuff here. Today's going to be really really fun. We're going to be working on that mind-numbing bug that we encountered yesterday trying to press escape to get out of the pause menu. Sometimes the easiest things are actually the hardest things in game dev. And yes, you'll get the naysayers and you'll get the lovely trolls and they are definitely have their place in live streaming, believe me. I welcome trolls because it makes everybody happy, right? presentation. Okay, be quiet. What are you talking about? "These are the colors of the app." Okay. Um what am I saying? Come on in. Hey TruePlayGames, Goma, how you doing? Um Today's broadcast is called Let's What is it? Let's Make a Game
Episode 161. Sorry, one sec. Yeah, so yeah, there's there's a place for trolls. So trolls, welcome. But I will say this, if you're making a game, you're going to have moments where and we had this yesterday where you're like, "How How is it that I cannot figure this out?" And it's one of the dumbest things. And frankly, it's stuff you should know. But it's okay. It's totally fine to to not know what you're doing because at the end of the day what matters is the final product, right? And so far, I feel like I've done a pretty good job. I'm trying my best here to give myself the confidence I used to have because frankly, that confidence I'll be completely honest with you guys, that confidence in my ability to make games started to dwindle last year. You heard me say it a million times. Last year was a difficult year. Um but the confidence is back, baby. Because I've launched I've not only launched two demo a one demo that's doing incredible and that's Twisted
Tower and that's what we're working on today. I also launched the Brave Boy demo yesterday and oddly people like it. Um it's full of bugs. It's a mess, but it's derpy and it's dumb and so I think I I get I guess people give it a pass and they just think well it's just a it's a funny little game about a of a about a dog with a sword and that's just silliness and so it's okay that it's derpy and broken. Anyway, we're going to jump inside of Unity really quick and we're going to start working on games. We're just going to hang out and I'm going to try my best to read the chat better than I usually do. Um I know that sometimes I forget to read the chat, but I'm going to do better. Um Hey, thank you guys. This meant the world to me. I found out about this yesterday and also this morning I was shocked again. Alyssa Miles, Carlos Alvera, Stephen Hoffman. I believe Jeffrey as well, I'm not sure. Jeffrey enrolled yesterday and today in full-time game dev.
It means so much to me that you guys would trust me with your game dev journey and enroll in full-time game dev. And by the way, if you're a student, let me know in the chat. Um and let me know what you think about the program. But um look, I I love being as honest as I possibly can. It's one of my favorite things to do cuz I'm a little bit paranoid. So I want to make sure I'm super honest in everything that I say. Twisted Tower was funded for several years by 3D Realms. Um I'm at the point now in development where I'm looking for additional funding. If I could fund it with this channel and if I could fund it with podcasts, that would be awesome. And so when you guys enroll in full-time game dev, it's kind of like a sponsor for this channel. Um you support the development of Twisted Tower at this point in its development. Um so, check out the link below to get 25% off. When you click that link, it's going to start a timer for you. So, you have 5 days to get 25%
off. So, check it out below. If you want to learn pretty much everything I know about running a game studio from my bedroom. Guys, it's one thing to make a game and I teach how to do that. Godot, Unreal, Unity, 2D or 3D. It's another thing to know how to turn that into money. Um I don't make viral games. I I don't think I've ever made a viral game. But somehow I support my family. Um whether it's publishers, Kickstarter, or game sales, right? Now, I have other funding sources as well with my other business and this channel as well. But when it comes to full-time income enough to go full-time, it has always been publishers and has always been um Kickstarter and game sales. And I can teach you how to do that. So, check it out below. I'm going to turn my fan on really quick. Hey, if that's out for you, there's also a cool little webinar on how to have a $100,000 demo. Uh no, it's not a gimmick. It's actually real. You can actually turn a demo into six figures. It's not easy, but I'll show you how to do it, okay?
It's what a lot of indie game developers do. So, check out those links below and let's go ahead and jump inside of Unity and get started. Let me turn my fan on really quick. It's a hot one today. It's very very hot, actually. It's like well, it's hot for wintertime. It's 70°, which is a beautiful day. It's a beautiful day. All right, guys. Let's jump inside of Unity and hang out. Chat box on. Okay, let me check the chat. Make sure everybody's happy. Yo, Tommy Bennett. I don't know who you are, but you have a check. So, I will show you favoritism. Um what's that picture behind your window? Is that a picture or a window? What do you think? You think that's a real window? That'd be awesome if that was actually a real window. I tried.
Entomologist says, "I like the story for Twisted Tower so much. I feel like I grew these few years with your journey. Keep the magic alive, Thomas." I'm trying. Happy Tuesday, beautiful nerds. That's from XD. Awesome. Awesome. Um, it's like 6° where I live. Um, cool. Yeah, it's a TV, said TruePlay Games. Um, are we going to get a Mac version? No, it's not worth the time or the effort. I You guys know I'm as honest as I possibly can. Uh, a lot of times people ask me questions like that and my temptation is to give you this glowing, principled answer. Well, you know, maybe one day and we do want to support Mac users and it's maybe it's it'll be worth the time and what we'll do is we'll slowly stagger development for and then do Unity or a Mac after PC, but the truth is any publisher, anybody's going to tell you it's really not worth it because there's just not enough players
and they're not going to get good performance. So, no. We're probably not going to do Mac. I say we, I meant me. Cuz I I'm I'm solo now. And I'll be releasing a video about that tomorrow. Okay, guys. First things first, we're going to try and figure out this freaking pause menu. Oh, I've been dreading this all day. The pause menu. Tomer says, "Just played the demo. Great game." Awesome. Let me see if I can add a background to this chat box. Boxed. Is that better, guys? Yes, that is so much better. Text color is white. Background color is black. Yeah, let's do like black. That should be better. Yeah, the dreaded pause menu. You're
telling me, man. Okay, so if I press escape, I can close out of it. But the moment I'm in options, it doesn't. So we're going to go into our code that we're messing with yesterday. And the code is the options menu. In the options menu, uh we're going to figure I bet you we're going to figure this out in like 5 seconds. Um options menu input. We're going to take a look. Will I do early access for content creators for the full game? Yeah, sure. You know, that's what's funny. Um I can't read your name there. Wybert says I was really upset when I didn't rotate along with the merry-go-round. I totally agree that's upsetting. Um Thomas, I just read an article and I'm sorry, it should work. That's the thing. I don't know We've tried so many I've tried so many times to fix it and it won't fix.
Yeah, Ken Levine recommended Twisted Tower. Yeah, I I I saw that. Um believe me, I've I've read every single article because in I I again, super honest here. When you launch a game, you become an egomaniac. Every second of the day, you're checking um articles. So it looks like we have a brand new one from Game Rant. This is uh 2 hours ago. Judas director wants fans to check out this other BioShock-inspired action game. What does it say here? Blah blah blah blah blah. Judas director Ken Levine has suggested that fans of his work check out Twisted Tower, which is available now as a demo. Blah, blah, blah, blah, blah. Heavily inspired by BioShock. Yes, 100%. Blah, blah, blah, blah, blah. Is it good? That's the question. Encourage players to check it. It's so funny these these articles, they just say the same thing over and over and over and over and over again.
Um So, that's cool. There's Mr. Ken Levine. Yes, I'm going to flex this all day until I die. With branching pathways, Twisted Tower looks to offer high-level of replay. Not high-level, like kind of replayability. It's It'll be I mean, yeah, I mean, you'll you'll get like a 50% new experience the second playthrough. Um that gives fans the ability to play unlockable paths. That's a cool screenshot. There's no set release date. Blah, blah, blah. Cool. Um yay, thank you Game Rant. Let's go ahead and tweet this. And by the way, guys, what I'm doing now is kind of what I do all day. I just sort of scrub like an egomaniac looking for articles. What the goal is is to treat a a demo, especially during Next Fest, you're you're kind of treating it like a fire that you're like a campfire. Um you're just trying to blow embers on the fire all day long.
Hey. This is an awesome article. Thanks, Game Rant. Um great, great, great. Good, good, good. Now, let's go ahead and figure out what the F's going on with this pause menu. Uh you know, we had this issue on back pressed, on back released do all this. Now, let's do a little debug here and figure out if it's even registering. My theory is what we need to do is go ahead and it's right here, back action. I'm going to call it exit options action. Right? And I'm going to have it essentially have a totally different name than back action because for some reason I think back action is being declared somewhere else and I have no idea where
it's being declared. So, we're going to do that. On enable, on disable, do all that crap. Um back action that action that canceled on back release, on back pressed. Okay? So, we're going to try that. Pressed and then we're also going to do released. Whenever I drink coffee, can I get a and does anybody in the chat back exit options action get their does their stomach or their side just kill them when they drink coffee? Every time I drink coffee it's immediate pain. But I can't stop. My son played Brave Boy today with me and we had good fun. Hey, hey uh Ash, did you write a review? Guys, you are so helpful and I really really appreciate you writing those reviews. It be honest, you know, what you think. I don't want you to write anything you don't believe. Um but you were also helpful yesterday. A lot of you were commenting saying, "Dude, we can't play
the Brave Boy demo." and I was like, "Nah, that's not true. Y'all are crazy." But then I looked and it's not on the Steam page. So, I had to go into there's a secret button in Steamworks where you have to click it and it shows the demo button. Okay, so it's not doing it at all and I think it's because I haven't defined it. So, let's go ahead and try and define it. Your gallbladder is too dry. Drink water. You know, you're probably right. All right, let's go to the options menu here and we're going to take a look and see what's going on with the back button. What is this? Uh Okay, there's a parent here. There's no inputs being set here. I'm just checking something here. Sorry guys. Player input, what's that?
Nothing. Okay. Anyway, let's go to our options here. We should see um Oh my word. Right here. Options menu input. We should see the ability to exit options. There it is. Okay, so let's set it to cancel. And we'll see if this solves it. I mean, please God, you know. Um What is that? We got a weird issue there. Let's hit play. It's not supposed to hurt. Yeah. Cold brew got rid of the feeling. So, is that feeling normal for you guys? That's a sign, man, to stop drinking coffee. Yeah. Um Yeah, it just kills. Um okay. Okay, I pressed, but it's not doing anything, which is awesome. That's That's all I need to know. It works.
If game object dot active return if context started is Okay, good. So, I need to do this. Right? And I think that's it. But it has to be on release, so that when we get back to the other page we can press escape again. The issue we were having yesterday was we press escape and it fires twice and both pages exit because it's down for both. So, let's see if that fixed it, man. Thomas, you got to find the right coffee beans. Is that really what it is? Okay, guys, I think this is going to solve it. Seriously. I mean, I'm I am I you know, I've said this a million times, but I don't Sometimes I say things I don't believe. But, really you do need to take a break, you know, and it typically it will solve it. No!
I believe what we need to do Okay, guys, is it possible there's something wrong here. We need to like deregister the back button. Do this with me. We need to deregister the back button. Thank you, Ag Agos. Thank you for writing reviews for both demo.
Uh you guys are just flattering me and making me feel so good about myself. I've said this a million times, I'm one of the most self-defeating people I know. I I truly am incredibly insecure. So, thank you so much. It does mean a lot. And I'm I'm just saying that. I come across cocky and sarcastic, but I'm very, very insecure. What's the answer? Someone tell me the answer now. Now. Do it now. Tell me the answer right now. What's happening here? Because I need I need to deregister this so that it doesn't fire here. Maybe get with the back button is doing and put it in on release. There's no
such thing as on release. I feel like I need to deregister it when it goes back. Like I need to say Is it possible to say like um What is it What is it? Let's see here. On enable, on disable. Yeah, you have to like on canceled? How do you do that?
Back action.action.canceled is the same as released. Really? Yeah, I know. So, this is working fine. This this should it should reset it. I want to reset the button. You know? I'm going to ask ChatGPT. Actually, I've been using Grok, and Grok is actually pretty awesome. Uh I want Uh how do I even say this? I know believe me, I don't like using callbacks, either. It's a pain in the butt. Um I it's so annoying. We're so close. Like, we are so close. So, basically, what I need to do it's it's hearing the release
immediately. And what I need it to do is I need it to say, "Hey, the release is done. Reset." So, like, I need it to do something like this. Exit options.action.like something. dot reset Maybe that's it. We'll do it up here. Return? Uh yeah, you might be right. Return might do it. You know? Son of a b- Release, and then it does both, and it shouldn't. Son of a f-
Yeah, it sounds like the the the Uh-huh. Uh-huh. I don't know why it would be listening, but what we could do is we could say um yeah yeah yeah yeah yeah. That that's that's an idea. Here, we could do this. We could say only disable unpause occurs only I'm so close. Is that Is it Is it this? If if Yes, if the if the options transform is deactivated then go ahead and unpause. I have a theory this isn't going to work. I don't think it's going to work. But let's go ahead and try it.
Oh yeah, turtle tank. We're having problems. OH! WE GOT IT! NO! WHY? UH! It's so good. It's active there. Why? Why is it active? Options menu is false. It It the the the It is So it should work. If options.transform.gameobject, I need to do dot active self. Yeah, we
Lenny We were so close, Lenny. We're so close, guys. Please God. Will you do this for me, Lord? Will you make this happen for me? Will you answer my prayer? No, you will not. So, we cannot do it with this. We cannot say if the options menu is active or is false, then we can go ahead and unpause. It doesn't work that way. So, that doesn't do anything for us. Tom Thomas, go to your input action asset and generate a C# file. Within that file, you will find a list of generated methods pertaining to your input action. Generate that file and look for on back. Is that really what it is?
I'm literally about to do something that is the grossest thing ever. I need to deregister it. I want This is what I want to do. I want to deregister on back entirely. I want exit options. that active to be deregistered. How do I deregister this? Remove action. I just want to see that. Cuz if it gets removed, then that means that it shouldn't work here, right? And then we can add it when it opens up. Karen says, "He answered your prayer." He said, "No. You'll have to figure it out." Okay, so it gets deregistered and then it just doesn't work. Can I add or
remove or change blah blah blah blah blah? Okay. The function call is unsubscribe. Really? Option unsubscribe. How do I unsubscribe an action? Action not disabled? Ooh, what is this? Act my action not performed unsubscribe. Ooh. Can we do that? Huh!
dot action dot performed Is that going to do it, guys? I doubt it. I have every doubt imaginable because my theory is we're never going to release the game if I can't fix this. You have it in on disable. Do I? Yeah, you're right. No, but that's interesting. Is it being called though? Well, let's try this first. Do you guys see the problem here? It should go back. It's closing the whole pause menu. It should do this.
Oh my word. Debug.log your on disable method. Okay, we'll do that. Debug.log uh remove on back released. But, I don't even know why that would matter because the other one is listening for the release. I'm about to do it a completely janky way and you guys are just going to be shocked at how I'm going to do this. It's going to be a horrible, horrible way to do it. Am I getting a debug? Yeah, it's happening. We really just need to yield it. I mean, I don't know how else to say this, guys.
You know, we just need we just need to yield it. And the way we're going to do this is watch. Ah, this is such a horrible thing. I'm going to do this. We're going to have a serialized field here. Ah, it's just going to be public. Allow close. And that's going to be set to true by default. It's a freaking boolean. I know that I know, guys. I know there's another way. Believe me, I know. But, this is how we're going to do it. We're going to go into and I I should have just done this yesterday. Sometimes guys, you just you just you just roll with the punches and you make a messy game and you just deal with it. But of course, what you end up getting is
performance issues, which is what we have in the demo. So, welcome to my life. We go to the FPS controller. Inside of the controller is the options menu. When it opens up, there's an animation. I'm sorry. We're going to go to the pause menu here. When it opens up, there's an animation. And what we're going to do, we're going to set the Boolean for that variable. Allow pause exit. We're going to set it to false. And then right when it comes up, set it to true. The problem with this is if you're holding escape, it'll just go ch which I guess is fine. I don't know.
No. It really? We need to go uh once the open options. Yes, right here. We're going to set allow pause exit to false and I'm going to watch this value. There's a big difference between the two It's hard to explain Mischief, but there's a big difference. And actually guys, this is the only issue we have. Yeah. This is the only issue we have with any all of the UI. So, once this is done, UI is pretty solid. Thank god. More power. More power.
We got it. Our God is an awesome God. He reigns forever. With wisdom, power, and love, our God is an awesome God. We did it. Okay. Uh Michael says, "Just got here doing some crazy making." Yeah, we're doing crazy debugs. So, it officially works. Let's see if we can spam it. We're going to use everything we can um to just break this thing. You got to be willing and humble and you got to be humble enough to break it. Woo!
Okay. Thomas, I tried your demo. It looks awesome. I had issues with the Steam Deck. Everybody always complains about the Steam Deck. Maybe I should just order a Steam Deck. Sorry, I got to pull my zipper up. It's been down all day. Thomas, are you the voice of the real boy station in Twisted Tower? I love those callouts. Yes, I am. Uh that is me. Um Another Another bug we should probably address ASAP is when you die, it'll say eat treat and that appears on screen. And we want to make sure that is not shown. So, basically what we need to do is just I guess deactivate it, uh which is fine. I actually think that's going to be pretty straightforward. So, let's
You guys see this? That's wood. All right, let's go. Pretty straightforward here. What I need to do and I could show you I'm not going to show you the bug, but basically this little tip appears that says eat treat um when you get hurt or when you're dying. And that is I believe this right here. This. So, tips icon and descriptor. That should deactivate. Now, the question is is it actually deactivated? I think it fades out. But I don't think it's deactivated. Hm. It might be. Let's Let's see. Yeah, that's great, turtle. That's That's about right. That's what we'll do.
That'll good. That'll good. Oh, yay! It's deactivated. So, what we need to do is we need to go to the character controller. And on death, we need to You know, here's the thing about making a game with a team. And it's it's nobody's fault except for mine, okay? So, I'm not blaming the team at all. But when I had a team on this game, you had a lot of different strategies and ways of storing information and references. So, this game is a big fat mess of references all over the place. And so, the question is, you know, where where is that stored? And my theory is is it's stored the reference to that tip. I think it's stored here. Tooltip text animator. Yes, it's right there. Tooltip text animator. Oh my god. Tooltip There we go. And then when you die,
it should just go away. We're going to look for the die function. Start co-routine die. And then we're going to see where that is. Yay! It's right here. So the theory is all we got to do is this. Tooltip text animator.gameobject.setactive false. All right, let's go die and see what happens. You guys ready? Yeah, we're That's exactly right. Turtle Tank says it really well. You're digging through years of other people's code when uh what people don't understand how truly difficult that is. You got it though, Thomas. Sounds like the game is getting close to release. Can never find anything. Yeah, that's about right. Um by the way, guys, I love playing in ultra wide now that the ultra wide community started uh
It's almost swore beating at me. Um and so I I set it up and got it working. And then all of a sudden I was like, "Hey, they're on to something." It's real Ultra wide is super duper fun to play in. I love ultra wide. Let's see if we can grab a snack really quick. Welcome. Uh I got to put one on the floor. Hang on. Hello. Welcome. But way, those of you just joining us, just remember you can join Full Time Game Dev below for 25% off. Um I will give you a shout-out in tomorrow's stream, and this is a great way if you want to support Twisted Towers development. Um all any additional funding can help. I'm already funded by 3D Realms, but we are I have I I haven't there's still money, but it's nice to have additional funding um because I think we're going to have another I think the summer is probably going to be I'm going to need to work through the
summer on this, and I'm doing it solo. So, any additional help would be great. All right, let's grab some snack schmackos. Thank you. Let's get hurt. Okay, eat treats there, and then I want to die. Yes! Oh oh oh oh things are going well today. Yeah, yeah, yeah, yeah. Things are going well. Was it hard to set up ultra-wide? No, not at all. Yeah, as long as as long as you know Sorry, my coffee's cold. Um as long as you know how Unity's UI works, it's not it's not hard to get set up. Cuz it's sort of built in to sort of snug keep uh as long as you set up your UI correctly, it'll it'll stay snug on the corners of of the screen. Uh this is almost ready to just build. I
mean, I might want to do a Steam upload. I could show you guys kind of how that works to upload to Steam. Oh. Bum bum. Okay, I'm looking for Sorry, give me a second. I'm looking for my list of things to do today. Uh escape for pause menu, remove the tool tip on death. Someone said they fell through the floor and I don't know how on earth I'm supposed to fix that. Um, what else, guys? Well, David Whaley gave me a really good idea when it comes to optimization. First things first, guys, what I want to do is I want to just have you join me in figuring out potentially what's wrong. Does anyone Is anyone in the chat a pro at optimization? Are you like really good at 3D optimization?
If you think that's you, now really really think. Are you a pro? Like is this something you do? If that's you, raise your hand. Who's a really good Who's really good at optimization? Oh, grappling hook. We have a bug for the grappling hook. Yeah. Yeah. Let's see here. Those are Those are Brave Boy bugs. Hang on. Four, grappling is uh buggy for some reason. I don't know why. We'll take a look at it. No, nothing with the red the You had issues, Danny, with with looking up and down. Thomas, I fell through the floor when I dashed the button a second time. Really?
Um, I fell through the floor in Brave Boy. We're not worried about that. You guys are going to give me a panic attack here. Let's worry about one game at a time. Um, no, so we got nobody who's good at optimization. Let's Let's take a look at the profiler together and see if we can analyze this together. Because we're getting some crazy issues with performance. I swear to you guys, I've baked the lights. There's occlusion culling. But the question becomes I I I will say this. If we take it a look at our lights, like our light explorer here, how many are real-time? You know, that's the question. It looks like about 70%. And most of them I'm sorry, 50% of them have shadows.
So, the theory is is that the lights might be causing the problem. Right? Like that could be it. And so, what we need is some kind of light color. Not call not color call color. C U L L E R Purple Vincent is just telling us what we already know. I'm just messing with you, kind of. But yes, you're right. We have performance issues. So, we've got CPU usage here. And here's what I want to know, guys. Let's look at this together. How I I don't know how to read this. Um The player loop is it appears to be the problem.
GPU There's GPU. It's not set up for some reason. There's GPU. Real-time global illumination. Okay, so there's you okay. So it looks like the player loop is 5.3. Let's ask Brock. I'm in the Unity profiler and when I select a moment in time to examine the CPU usage I see a number that says Oh, I know. Oh, I know. I know a lot of you are like, are you kidding me, Thomas? You don't know what you're reading? No, I don't. And just you should just get used to
that. I see a number that says 5.37 milliseconds. What does that mean practically? Yeah, I look at the hierarchy. I know how to read the hierarchy. But I want to know cuz I've I've I've worked with QA with the 3D Realms QA and they'll say stuff like, yeah, it's like 5 milliseconds. I'm like, what does that even mean? So let's let's see what that means. In the Unity profiler when you select a frame and see a CPU usage like 5.37, that value represents the total time the CPU took to process that specific frame. So 5.37 milliseconds means the CPU spent barely any seconds processing that frame. Um to understand if that's good or bad, you need to compare it to your target frame rate. 60 frames per second, each frame has a budget of 16.67 milliseconds. You're well under this, meaning your game is running smoothly with plenty of headroom. If you're running at 30 frames per second 5.3, it's still very comfortable.
At 5.37, but it's hard to See, this is the trouble, okay? I'm having trouble uh analyzing any of this data because my PC is amazing. How do I test this as if I had a bad PC? Ag OS says or Ag OS says use the worst AI on the market. It's actually pretty great. Um throttle your CPU in Unity. Unity doesn't directly limit CPU speed, but you can artificially slow your game loop. Oh, wow. We could We can run pointless math.
I don't know if I want to do that. That's not That doesn't do anything. Use the profiler simulate mode. In the profiler window, enable deep profiling. This adds overhead to every function call simulating a slower system. Be warned, it's heavy and might crash. Alternatively, add profiler begin sample and sample calls manually to specific code blocks and exaggerate their cost. Limit your PC resources. David, are you David, do you feel like you're skilled in the arts of profiling? Cuz David says you have too much code in the update loop. LODs culling, memory leaks from unsubscribed events can lead to CPU issues.
Don't add load while streaming. In task manager, you can remove cores from the process. If you have an integrated CPU, you can force the game to run on it. For GPU, install the Unity package memory profiler. It enables to make you a snapshot of a of a running game scene. Oh, isn't that Unity 6? But anyway, let's go to the uh the hierarchy and take a look. So, if we're in play mode here, let's take a look at the uh hierarchy here and grab a frame. Player loop, 98%. 61% scriptable render con- context
camera, 61%. I'm going to have to do I'm going to I'm going to do it No, not yet. Universal render pipeline, render single camera internal. So, it's the camera render. Forward ultra pipeline pipeline for the draw opaque objects is 28%. And it's probably going to start shrinking from there as we collapse this down. Quad tree node.render What is quad tree node .render in Unity? Don't let me down, Grock. I just I was just singing your praises.
Haha. It's not a standard, well-documented entry. It's probably a function or process where a quadtree node is being processed. Well, duh. Scene culling. So, the camera frustum. So, it's just how we determine what to cull. Okay, here's what we really need to know. We need to know on a base level how is the thing running right now? So, we So, we can then compare it to what my potential solution is. And I you know, I don't know. I don't even know, you know? I don't know. It I don't know what what this even means, if this is good or not. You know?
I don't know, you know? This is a whole This is a different dimension for me. Um I mean, we honestly, I swear to you, we've we've been focused on optimization the whole time. Um I wish that I wish that Unity would throw like a a flag and say, "Hey, this is bad." You know? Um W- I One thing we can do is open up a game view. Because when you're running the scene and the game view, it can get pretty slow.
So, I want to see what happens to our frame rate. Cuz if I can get it to be a really low frame rate this way, yeah, good. Okay, we're at a low frame rate. That's a pretty good way to simulate things. So, I'm at uh 40 frames per second. Let's go to our um light explorer. That's great. So, the question is, okay, well, what happens if I kill the lights, right? So, let's go to our light explorer, and I'm going to go ahead and go to all of my real-time lights. You can see that they're all flickering and they're running right now. That's a lot of information. What am I currently at? 48 frames per second on average. So, we're we're somewhere around 40. Okay, so let's go to our My My suspicion has always been it's the lights. Always, always, always. Um so, if I disable all of these real-time lights, heck, let's even kill them. Select. How do I select all of them?
Pause. Delete. How do I select them? Disable and see what happens. Why are some lights still flickering though? And the frame rate's still the same, you know? That's so weird. Some of them Uh we need to delete them. Okay, here's what we're going to do. We're going to exit play mode. What were we looking at? We were looking at an average of like 45. So, in not in play mode, I'm going to delete all these. How do I select them all? I can't remember. Grab them all here. These are all real time.
And I want to delete them all. Delete. Hit play, and now let's take a look at the new frame rate. Basically the same, isn't it? I mean, we're now at 60. What the hell is this place? Oddly, why is it that when I delete those lights, there's no baked information? There's no baked information on that Wait, yes, there is. Okay, so we have baked information. Yeah. So, that's good. That's baked, good. So, we're looking at somewhere around 60 right now. Now, let's go back and then bring them back and look at what it is around that area, and we'll see what we get.
Bye-bye, Unity. Come back later. Yeah, we're already doing forward plus. It might be the fog. You might be right. So, I think this is a great way to test this is just to have This is what Grock missed. If you have the game view open separately, and you say run it at 4K, you're going to get like a lat or a you're going to get a lower frame rate. So, the question is, all you got to really do here, this is my theory, is just have it running right here at 4K. And then you can look at the frame rate, and as you delete stuff, you should see a a jump in frame rate, you know. It went from 47 to 60. The lights are having a low impact.
Really? You think 13 frames is low? I think that's awesome. Okay. What happens when I pull this out like this? And I'm going to I'm going to zoom out so that I have to see everything. Okay. So, as long as we stay in this position, we're looking at about what the Steam Deck was handling it at. Okay. So, we're looking at basically what Steam Deck is. This place. Steam Deck is pretty bad for Twisted Tower. So, my theory is, if we if we go to
rendering, light explorer, and we delete all of our real-time lights, a lot of these are still doing something in the update. I'm going to delete all of these. And now let's see what happens. So, we got 10 frames. Well, eight or nine. Let's write that down. Optimization notes. Removing all lights in the exterior gives us 10 frames. Good to know. Jumping from 30 to 40. Is that true,
guys? I do I am curious about the shadows, yes. Like if I turn off all shadows for all of them, what happens? Still pretty slow. But let's make sure those lights aren't selected. There we go. So, shadows aren't the problem. No. Yeah, even when you turn off shadows even when you turn off shadows you still get a low frame rate. So, it truly is the light itself being real-time and not the shadows. After all the shadows only render 60 units away from the player. So, that's something to consider. Right?
So, that's one thing. One. Two. What about the fog? So slow. Good, I like that it's slow. Let's remove the fog. Fog exterior, kill it. Not much of a jump. Two frames. Two frames. I mean it can help for sure. But not not really much of an impact in the visuals. It's important for the visuals. I mean it really captures the mood. So I'm going to say rem- uh disabling the fog is not a noticeable impact.
The object has to have disabled casting shadows. Yeah, but if you disable the lights they're not going to cast shadows either. What about the directional light? What if I remove the directional light? Just the directional light. It doesn't really save us much. So it's not the directional light. Uh okay, what about post-processing? Right? We're looking for things that are potentially obvious. Nope. It gave us like a frame. So it's not post-processing. What about physics? Do I have any bodies? Uh find anything that's a rigid body. So what do we got here? What are some of
the rigid bodies in this game? I I have a theory that it's the rocks. We're going to remove all of these rocks. Let's do that. That gave us uh No, but that doesn't count. Hang on. We got to zoom out here. The rocks gave us seven frames. But I don't know cuz I just disabled them, but they're still here. So, the rocks gave us seven frames. Let's get rid of the plateaus as well.
Let's delete them. So, that gave us four frames. Gen Z virus Everyone, please tell him to look at a CPU main thread. Okay, we'll look at the CPU main thread. And we will Is that true that the CPU is what you want to look at in the profiler? Is that really what matters? I don't know. I really don't. So, the CPU main thread is currently at
What about physics? Do we have a lot going on with physics? It's hard to know what would be Physics used memory 16 megabytes. Dynamic bodies, we have 44. 44 dynamic bodies. Okay, so what? Gen Z, what are what are you saying? So, we want to select this and what's the point? What's your point? So, the biggest one is the player loop in the main thread. Travis, you got a you got a consistent 60 on a on basically a Steam Deck. Click on the CPU section. I am. It's right here. All right, Gen Z. What do you want me to do here?
CPU bound means your biggest frame rate restriction is CPU and not GPU. So, let's see what our GPU is. We'll put GPU in there. And if we look at GPU, for some reason I can't see it. Okay, there it is. Wait. Yeah, why is it that I can't see it? Oh, that's real-time GI, Thomas. What are you doing, dude? We've got Here's another question, guys. I've got 10 GB of textures rendering. That's That's potentially a huge issue, honestly.
So, let's go ahead and uh at least write that down. Is having 10 GB of textures a problem? Seriously, I mean, I don't know. Okay, what do we got here? So, what were you saying? GPU usage. It's right there. We got to play here. It does seem huge, doesn't it? But like here's the question, right?
If I set my textures to low, the theory is shouldn't that then go down? Right? So, the memory went from But it's still at 7.3. And 5.67 GB of textures. Did you have the textures packed? That mean Okay, optimizing GPU will not help our frame rate. Do we agree? Yes or no? Optimizing GPU won't help our frame rate because we are CPU bound.
Okay, so you you guys your theory is that we're not combining textures properly? Wait, what was the first one? We agree we're CPU bound. Okay. Is having 10 GB of textures a problem? Let's ask Rock. No, Justin. Justin, I know what you're saying. I agree with you that that's a memory issue and that doesn't necessarily translate to performance. I totally
agree with you. However, I have heard that that is not true. I've heard that from followers on Twitter and also chat GPT. So, just some research. I don't know I don't know who's right, honestly. Um so, it 10 gig Wait, wait, wait, wait, let's see here. Yeah, textures themselves don't directly hit CPU times. The 10 GB can cause indirect performance issues. VRAM overload. If VRAM is maxed out, the CPU stalls as it swaps textures. So, you'll see spikes in the profiler. It might crash. So, that that to me explains the crashes. We're getting some crashes. So, let's write that down. This could be causing some crashes for some folks. Okay? Loading 10 GB from a disk takes seconds or minutes, especially if uncompressed.
You'll see this as long hitches outside gameplay, not in frame time. Although, what if I have will I see a hitch or a frame drop when enabling a large batch of objects with large textures? Yay! That is so good. This could be why enabling large chunks of the game at run time on various levels cause a frame drop. A significant frame drop. Uh $5, textures are issue. Make texture atlases, start sharing some maps
for multiple objects. Okay. Thank you. We may need to make texture atlases. Which is a whole other thing. But let's see what Grock said here. Shrink that 800 to 200 megabytes with a blah blah blah cutting upload time significantly. Instead of enabling and disabling, use an object pool. Keep objects active, but off screen invisible. I don't really want to do that. Level of detail, swap the low res textures initially. No, I think we can just honestly um I think what we can do is just compress all of our textures. Your GPU might muscle through, but on a weaker system, it's a slideshow. What does that mean?
Yeah, I agree David. I think this is it's cause it's definitely causing load time issues. I've known that from the beginning. This is certainly causing causing large load times. Now, the question is this. There is this button here. This is what I have an issue with honestly guys.
There is this button here. Max test texture override. I think I'm going to have to do a re-import of this. I'm going to ask Grok here. Is there a simple way to simply um re-import all assets with a maximum size? Okay. Select all textures in the project windows type T textures in the search bar. Adjust max size. Re-import. Ooh. Or automate it. Texture max size tool. All right, let's use this. Uh put in the editor. Go to tools, re-import textures with max size.
And then you're going to have to wait, obviously. Can this I like the script. Can you also make it so that crunch compression is available in the tool. Because crunch compression is amazing. I love crunch compression. Window analysis memory profiler. Yeah, the problem is I don't think I think that's Unity 6, but we'll take a look. Thanks Thanks guys for helping out. Seriously, this is amazing. Uh, what was it? Window analysis memory profiler? Okay, no. I thought it was Unity 6, but we can take a look. All right. Um, let's hit play here and take a look. I think everything's enabled. All the lights are enabled.
Okay. So, here is our full resolution. We're going to capture a new screenshot. Memory snapshots, blah blah blah blah blah. This might include passwords, server keys, access tokens, and other personally identifiable data. Okay. Well, we're not going to share my screen. Hang on one sec. Okay, so we got some kind of snapshot here. I'm going to open it up. I don't know what this does. 9 GB. Is that good or bad? All right, here's our snapshot. One sec, let me see if it's
Okay, guys, here's what we've got. Um we've got tons of textures. So, pick up high-res backup is 207 megabytes. Right? Then the rest are pretty tiny. But there's a lot of them, you know. So, my theory is we need to use that tool to compress all of our textures down. Right? Um this one it's so funny. This one is causing such a huge issue. No, no, no, that's wrong. It's not causing a huge issue. It's It's It's the combined total, honestly. But you know, if we if we were to
select, say, this one here, which is like 21 megabytes, uh if I find it in the project, there it is right here. You could see it's got a max size of 4,096. So, what I can do is I'm fine with the max size. Uh what we need to do is crunch crunch compression. So, it's currently 21.3. My theory is is that if we use crunch crunch compression, we can keep the high resolution. We can go back and we'll see what Web Diff 2. Y'all remember that, okay? Web Diff 2. And we can see if that one is now much smaller. Although, it should say it here. I don't know why it doesn't say it anymore. It used to say it. Wait, there it is. Now it's 2.3 megabytes. So, it went from 21, watch this. If I turn off crunch compression, you can see it my face in the way. 21.3 crunch compression reduces it, if you do it at 50, it reduces it
by like 80%. Is that Is that the right number? Alexander says no, compression is only for disk size, not run time memory. So that's 2.3. Let's see if it's a Web diff is a going to show up here. So it's like number 50. And we'll do another snapshot. We'll do another one. Hold tight.
David, do you want to explain that? No, I agree that I I agree that this will solve the load time. I think it's also going to solve enabling a large batch. Let's say I enable the second half of a level, cuz that's kind of how we load things. If I load a second half of the level, I feel like it's going to help with those those frame drops. We have another uh snapshot here. So this one's 13.13. I think it's cuz where my camera's pointing. No, you can blame me, Gil. That's fine. I'm the project lead, right? Well, yeah, Gil. That's called crying
over spilt milk. We got to solve it now, though. All right. What was it called? It was something Yeah, it's significantly smaller now. It's 2.3. So, the question is, guys, the question is this. Is this a Is this a big deal? Does this help? Using crunch compression. Let's Let's get an opinion. And I'll ask Grok as well. Give me a breakdown of how this helps performance.
Load times, GP CPU, GPU, etc. So, my theory is it helps load times primarily. All right. Before, after, blah blah blah. That's a 90% reduction in texture memory footprint. The perform Let's all agree here or disagree. Let's all read this together, and we're going to agree or disagree with Grok. Okay, shut your mouth, Grok. Um loading 20 megabytes from a disk. So, 5 to 20 times increase in speed. Sure. Initial game startup scene transitions or addressables. What's addressables?
In Unity, it's a powerful asset management system that simplifies loading, unloading, and managing assets. Uh reference assets by address. Load them dynamically. Yeah, I don't I don't know I don't even know what that I don't even use that. Um load times, good. What about CPU performance? At GPU. Okay. Smaller textures are faster for the GPU to sample. This cut per pixel shader time slightly, though the bigger win is memory bandwidth. Negli- negligible. So, it's negligible for GPU. The CPU doesn't process textures data directly, but it orchestrates upload and
render setup. Small textures mean less data to push to the GPU. Impact when enabling objects, your earlier question. This is amazing, by the way. Like, personally, this is way better than any information I've gotten from ChatGPT. CPU times for render.render or texture2D.upload drops. A 20 megabyte upload might have taken 5 to 10 milliseconds, now it's less than one. So, those frame drops we've been getting in the demo, where you're loading chunks of levels, according to Grok, we should see a significant impact. With that. That's something to consider, y'all. Oh, that's a whole other bag of worms. That's from Justin Barnett. But there's no direct hit in terms of
the actual performance. Your CPU frame time wasn't bottlenecked by textures before, so this is more about headroom than a huge CPU win. So, the hitching is is a win. Far less jarring, good. On weaker systems, you'll hold 60 FPS or 30 FPS without dipping below. What? Really? 10 GB will crash it. Wait. So, are you saying with crunch compression, I should get Uh okay, here's what we'll tell him. I've been getting reports
that Steam Deck is barely holding 30 FPS. Do you think that using crunch compression to reduce texture size by 90% will give me 60 FPS? At barely 30 frames per your game's frame time is likely hovering around 30 to 40 milliseconds dipping below blah blah blah to hit 60 blah blah blah. Your 90% texture reduction impacts the Steam Deck like this. After 1 GB fits easily within 8 GB leaving 7 GB for mesh render targets, no swapping, no stalls. Likely 5 to 15 milliseconds shaved off
frames bottlenecked by memory thrashing. If VRAM was your main issue, this could jump you from 33 milliseconds to Okay, so we're going to get uh All of this is a grain of salt, guys. All of this. But the theory is we get 15 a jump of 10 to 15 frames. Uh 5 to 5 to 15 frames. No, 5 to 25 frames. So there's there's marginal Will it help you get to 60 FPS? Yes or no? Crunch compression
will increase my frame rate. Okay. Significantly? Do we agree with Grok? Guys, what this is is this is the coolest thing ever. We've got uh basically what do you call it? You've got an LLM that is scouring the internet and grabbing opinions from the internet. But I've also got your opinions. We've got 540 people. So let's let's also distill down all of your opinions. If I use crunch compression and I drop it down uh the the size of these textures to 10% which it will, will it help our frame rate?
I mean, we can reduce the size of the textures. That's fine. Uh crunch compression is so beneficial to the size though. I mean, it's like it just reduces the size so much. Well, Vasis says, "Do a little test." I mean, it's not a little test. You We've got to go through all of our assets and use a tool to set that all up. So Jason, we don't I don't know if the texture size was my bottleneck. Um I don't know. Disk loading is not the issue necessarily right now, guys. We're looking at frame rate. I'm trying to figure out, is this going to help frame rate? Yeah, it says yes, expect a significant FPS boost. 10 plus FPS, possibly 20 plus
if memory was the main choke point. How do I know if memory is the main choke point? How many draw calls do we have? We're looking at um 2,700 batches, 5.7 million tries. Set pass calls 560. So, again, 3,000 batches, we're saving about more than half with uh batching. 4.1 trillion I'm sorry, 4.1 million tries.
David says, "Come on, compress the textures. It's going to take an hour. It's going to take 3 hours, so you guys won't get a stream." If I were to compress every texture in this game, it's going to take it it might even take all night. Furious says, "Thomas brush too much memory means disk swap. Disk swap means slow down in frame rate." So, Furious, you you think this is going to help the frame rate if I if I drop the texture sizes down? How about this, guys? Here's what we'll do. Can you write me a script that can uh that is an editor tool that s- finds all textures used in a scene, and I can compress them
with crunch compression, and choose a max size. All right, that's what we'll do. We'll just do it for this scene, okay? To to satiate you guys. The first thing we need to do is we need to take like a screenshot of all of this. Um so, let's go to play mode here and like do like a really far shot looking at something like like the castle. Okay? So, let's go ahead and grab a screenshot here or a a snapshot. Um I love this memory profile. This is really cool. And we're going to go ahead and grab a a capture here. So, we're looking at I really need it to be like right there. Hang on. I I know. I know I'm not screen sharing screen sharing yet. Pause. And then we'll capture
a snapshot here. So, we're looking at 3,000 batches, 5.9 million tries. So, I'm going to take the snapshot. And it's going to take the snapshot and then that way we have it and I can like rename it so that I have it and then I can do another snapshot with all of our texture sizes texture sizes using crunch compression. Jason, we're we're trying to to optimize the freaking demo because we're getting players who are it's crashing or they're getting huge spikes um frame drops. They're they're getting frame rate issues. And and and the theory that that it seems Grok Grok seems to believe that if we just use crunch compression on all the textures problem solved for everything. Load times are significantly reduced. Uh the hitching when we're when we're activating various sections of a level that will significantly reduce to like 10% of the hitch. And then we're also going to see a frame increase of 10 to
20 frames, which is exactly what we need for Steam Deck. Okay. so I've got my screenshot. I'm going to or my snapshot. I want to delete some of these snapshots though. Give me a sec, guys. Yeah, we've got occlusion calling. Yeah, we are we we're using the profiler. I want to delete this one. Hang on, guys. And by the way, I wanted to say a huge huge thank you to all of you for helping me out with this. This means so much to me. Every game developer has their weakness. Um, and it's important for you to just know. Look. Just admit, "Hey, this is my weakness." And um, just admit it. And so for me, it's it's
definitely profiling, optimization, and creating really unique gameplay mechanics. That's a weakness I have. I'm really good at story and mood and atmosphere and all that. All right, so we've got one snapshot available. Let's grab this code from Grok. This is going to be called scene texture compressor. And I believe I need to put this in the editor. Give me a sec, guys. Give me a sec. Let's add a script here. Scene texture compressor. Um, good. We're going to open that up in Visual Studio. So, Alexander says, "When Unity loads a crunch compressed texture, it decompresses the texture to DXT on the CPU, and then uploads the DXT compressed
texture data to the GPU. Meaning what? You're right. It won't be my weakness after this. You're totally right. All right, Visual Studio freaking open. Um there it is, scene texture compressor. Good. Save that. Of course we have an issue, grok. Texture importer does not contain a definition for get default. Why? Let's take a look. I'm getting this error. Regular says you're brave to do this on a stream. No, I'm just getting free uh
free stuff from you guys. I've done this so many times. And I also know the the base-level principle, like the philosophy of game dev, which is everyone sucks at it. So, what the heck? Everyone sucks at something, so you should be ashamed if it you didn't do the whole thing. You You You bet your A that you cut it off. What the heck, dude? Thomas, is it easy to have a game compatible with Linux? I've no idea.
We use crunch compression for Never Song and I we saw a significant load increase and we had to make that game for mobile. Uh and mobile has barely any RAM. So, uh okay. Well, let's go ahead and use this tool. Compressing textures. 2048 is fine. Find and list scene textures. There they are. You got guys, you got to admit this is just amazing. Do you know what this would have cost me 2 years ago to have a developer build this tool? It would take and it would have taken them like 3 hours. So, let's go ahead and do it and it's going to take a while. I should have pushed on GitHub. No, I don't I don't have it running on Linux. Does it run on Linux? I don't
know. I have no idea. I haven't tested it on Linux.
No.
You said it chugged a little, but it was playable. JCE. Regular says, "So, have you understood how to not do something for your next project?" Always. Every single project you learn something new. To those of you who said, "Just do it. Just just do it. Just crunch it, and then move on." Are these real books behind me? I don't know. Let's check.
I'm going to read that. What's that say? Holy crap, Thomas has legs. You know, I feel like this uh crunch compression thing's going to solve a lot of problems. Oh, have I read these books? No.
Those are my wife's. She reads tons of books. I don't read. Do you guys like the music? Well, we'll see, honestly. I got a message on Twitter. Maybe someone's trying to help. Jason says, "Crunch compression solved my diabetes." Oh man, so this going to take a while, guys. I'm going to head to the gym. But hey, thanks for hanging out, guys.
This is really fun. I'm going to let this run. Uh it might take a year, 2 years, but check out Full Time Game Dev below, 25% off. The moment you click that link, you're going to get um the timer's going to start for you personally. So, you have 5 days to enroll and get 25% off Full Time Game Dev and join the program and join 4,500 students worldwide. Let me know if you're a student, by the way, in the chat. And let me know what you think about the program. Look, if you want to learn what Chris Stair learned, Bart Mamzer and Everflux Games and a lot of these other reviews as well. And by the way, Chris went full-time, Bart went full-time, uh and Everflux went full-time. Uh Saltar went full-time, Antonio Thomas Stewart went full-time. Really cool. That's through funding, uh whether it's Kickstarter or how to, you know, pitch to a publisher. I could show you how to do that. How to get, you know, actual income from your game by hitting the Steam front page and wish lists and all of that. And also, you're going to learn how to make a game in Godot, Unity, or Unreal, 2D or 3D. You can take your pick, whichever engine or dimension you want to learn.
Um you're going to learn from an actual indie game developer. And hey, sometimes I don't know what I'm talking about, like today's live stream. But any game developer who tells you that they know what they're talking about with everything, they're lying. So, don't listen to them. Listen to me. Buy my course. Right? No, but really, it is going to really it is going to help you a lot, and I think it's a great course. So, check it out below. You're going to learn a ton uh about how to actually make money with your indie game. And I'll give you a shout-out tomorrow, just like I gave Alyssa, Carlos, Steven, Jeffrey, Alexander, Thierry, Thomas, Anish, Sergio, and David a shout-out today. All right, guys. Thanks so much for helping. Compression ended? No, it didn't, you liar. We're going to be stuck in this limbo forever. And this is just for one scene. Um
Auto-generated captions from YouTube — names and numbers may be misheard.
Thomas Brush · 2026
Thomas Brush · 2026
Comments