Dude, turn up the volume, Thomas. There we go. Ooh, that's nice. Come on in, guys. I know it's been a while. I was in the Bahamas, building a church with some friends, and that was a lot of fun. But now we're back to the grind, back to hanging out, live streaming with you guys, having a good time. Come on in. Welcome, welcome, welcome. Let me go ahead and pull up the chat and I'm going to put you right there on this monitor so that I can see you guys talk to me. as I work. Today's going to be super duper uh chill live stream. We have like some small bugs and stuff we want to work on for Twisted Tower. Nothing crazy. Um but it'll be fun because we're just going to hang out. You guys can ask questions. We can talk. Um pull up the chat. I'm going to put you right there on this. Okay, good. I'm there. Hey, Mike. Jimmy, how you doing? Let's pull up the chat here. There we go. Okie dokie.
Okay. I can't zoom in. Hang on. There we go. All right, Thomas, how you doing? William Price Gaming, what is up? Welcome, welcome, welcome. All right. Hey, I wanted to say a huge thank you as always, guys. Huge thank you to the new students. David W., Jeff H, Michael R. Sarah, he M Renie O. Thank you so much for joining Fulltime GameDev. And by the way, if you want to get 25% off, check out the link in the description. You're going to get 25% off full-time gamedev. What is full-time gamedev? Fulltime game. Fulltime gamedev is my constantly updated. In fact, I'm going to be doing a lot of updates later this year as well, additional content. Um, but yeah, uh, massive program that I've created. Basically teaches everything I've learned about making an indie game and not only that, making a demo and getting funded, right? That's what I'm all about is finding a way for you to go
full-time. So, that's what this course is all about. Whether it's publishers, Kickstarter, or just surviving on game sales from your previous games or working with platforms, right, to make some money, like for example, Apple Arcade. There's a ton of ways to make money as an indie. I not only teach about that and how to go full-time, but I also teach about how to actually make a game uh and make a good one. Whether it's uh made in Unity, GDAU, Unreal, take your pick. You can learn any engine you want with this program. You're going to get 25% off for the next five days, depending on when you click that link. If you click that link today, you'll have five days to join full-time gamedev. You can join Chris Stair who went full-time. He got a publisher. Bart Mamor got over $100,000 for the first big game and went full-time. Or Everflux Game got funded on Kickstarter. Um, these are all students who went full-time with the help of the program. So, check it out below. This is a great program. I think you're going to love it. And if you don't, well, 30-day money back guarantee. So, there's no questions asked here, guys. Just email Thomas at fulltimeamedev if you don't like the
program. I'm not going to ask any questions and you'll get a refund. So, there's really no risk for you um to enroll and use that 25% off coupon below. If that's not something that's interesting to you, then there's also a webinar below that teaches you how to make six figures with just a demo. I can't promise anything. I can just tell you what I've done in the last decade. All right, guys. Enough with the ad reads, Thomas. Let's go ahead and jump into today's schedule of events. Okay, what do we got? Today's schedule of events. Wow, we've got a lot of good stuff here. Let me pull it up here. Okay, so basically, let's see here. Hey Tom, this is from James Henderson. Hey Thomas, I hope you enjoyed your trip. I enjoyed my trip a lot actually. Hey Jason, how you doing buddy? Miss you, dude. Um, what was I saying? Oh, trip was fun.
A lot of fun. Um, got to build a church roof um for on the island of Alra. That was really, really cool. It was just a couple days. Um, but it was a lot of fun. Um, okay. Incorporate voice acting and story beats. I can't do this just yet. Incorporate jump scares. I can't do this yet. Just yet. Incorporate any other interesting moments. There's something to be said here. I'm I'm curious if we can create a new balloon type that spins when you whack it and sprays out sprinkles. Don't you love it? Why not? Okay. Features. Uh, this is a lot of Steam features, so we don't need to worry about that. Boss battle finalize ending. Hide UI. We could probably do that today. Um, pitch with a tuni shaded. Do tuni shaded. Do a tuni shaded build.
Okay, I might I might try that. Um, I don't know why, but we might try that today. Um, what else do I got here today? Let me look at my other list. We also have optimization and that is mesh combining. Trying to combine some meshes, right? See if that's going to work. So, let's go ahead and jump inside of Unity and get started for the day. And by the way, guys, if if my lighting is a little off, I'm I'm in the middle of getting some blackout curtains. So, I'm all the goal is to have blackout curtains that I can close. Always if always consistent lighting. If you don't have curtains to black out your office when you're doing YouTube, you're always going to have an inconsistent look. And so the idea is to black it out completely. So let me go ahead and open up Unity here. And I think the first thing we're going to do is we're going to go ahead and just create a hide UI um trigger. And um I think I want this to be on the startup object. Yeah. Okay. So
there's a level startup object. And what I want it to do is when a a scene loads up and there and the startup hits awake, I want that awake function to hide the UI. Fortunately, we have a cheat code that was already created that hides the UI. So, all I got to do is find that code inside the cheat code and use that same function to hide the UI. But I also need to remove all weapons, which we have a function for that as well. So, let's go ahead and remove all weapons because this is for the last scene of the game where there's a story moment. I don't want the player to have a weapon, and I don't want them to um I don't actually don't want them to be able to sprint, and I don't want UI except for crap. Except for dialogue. Dang it. We're going to need to do that. So, let me go ahead and see if I can fix this. Uh, I'm going to fix this on the list.
This is going to be interesting. Hide UI when entering last sequence. Remove weapons. Remove sprint. Remove all abilities. Man, we got we got some work to do. I didn't think about this, but man, we've got a lot to do. Okay, we got this. Uh, XPS says, "I loved the podcast today, man. Um, okay. Let me take I'm going to go look at this podcast here. I was worried about the podcast today because it just was not performing well and I was like, "What is this? Why why don't people want to watch this?" Because it was it was with Daniel Mullins, the creator of Inscription, but
now it's actually going up in the chart. So, that's good. Oh, it's getting exponential, too. Yeah, this one should do well. Thank God. Yeah, that was a good podcast. I'm glad because I landed in the Bahamas last week only to find that number one the nobody wanted to watch that episode and the audio was off and so everything was broken. I was I and immediat immediately deleted the episode and I was so frustrated. But looks like it's doing well today. So that's really really good. All right. Well, let's go ahead and just create essentially on startup here. What I want to do is have the ability to hide um or to for to clear all abilities
um to so and then clear the weapons. Hide the UI. Man, I need to write this down. I just wrote it down. But remove weapons. hide UI and stop uh remove sprint. And I don't think this needs to save necessarily. I think as long as it's in that scene, it can happen with uh startup. Um, remove sprint, hide UI, remove weapons. Hide UI except dialogue. That's important. Remove sprint and remove abilities, man. We got a lot a lot to do here, guys. Um, okay.
Teleports have a functionality in them that allow us to remove weapons. So, I'm going to double check that. So, I'm going to go to floor. I think it's floor five. Foxite says you need to do the other thumbnail. It's more clickable. I don't I don't know, Foxite, because I'm getting pretty good results today. I'm looking at my data. Uh, this video is number six out of 10, which is way better than the other one that I did last week. So, I think and I'm I'm seeing an exponential growth curve. So, what's cool about YouTube is within the first hour, you can see, okay, am I am I flatlining really fast? Are the views way lower than typical? And you can also see if it's curving up, which is awesome because that means the algorithm is moving in your favor. I'm looking at the data right now. I wonder if I could show it to you guys. YouTube is really fascinating to me.
Um, so if we can see here, let me see if there's anything in here that you shouldn't see. Yeah, I'll show it to you guys. Okay. Do you see how it started to trend upward? That means that that title and thumbnail is rocking. Rocking and rolling, baby. So, I'm happy with it, man. All right. Um, I'm going to go ahead and jump into a scene really quick. You can't see it yet, but uh I don't want you guys to see it, but just hang out with me, guys. Let's make games together. Um, there is a trigger. That should teleport us. And that that teleportation trigger removes um Oh crap, I gotta open up something. Hold on. One sec, guys. One
sec. I got to log into something to keep working on this. Uh, Johnny, how have you ma made any multiplayer games yet? No, I have not. And boy, I don't want to, I tell you that. Yep. Cool. Uh, Abdullah says, "Hello, Thomas. A love from Pakistan." Cool. Sorry guys, I'm logging into something here. I'm getting something freezing here. One sec, guys. Yeah, multiplayer dev as hell.
100%. Okay, I think we're good. Hold on. Hold on. Trying to log in here. Okay. Sorry. Our Unity is just really slow right now. I think we're okay. Okay, cool. So guys, inside of Visual Studio, I have this one script called teleport trigger. What I'm going to do is I'm going to look inside of this teleport trigger. There is a function. And often times, guys, you can't remember everything remember everything. You're not a freaking dictionary. So sometimes you have to go and look and say, "Okay, how did I deactivate all weapons?" In this case, look, we have a function here in the game manager called de deactivate all weapons. So what we're going to do is we're going to go into the startup
script and we're going to fire that function, but only based on a boolean, right? So, if I go to my startup startup, level startup is just basically a bunch of cool little functions we can fire at the start of a level. It's completely independent of the game manager, any persistent object. So, it'll do it every time on start, which is great. So, we're going to say if um remove all weapons on startup on start. Let's do on start. Then do it right. Great. Pretty straightforward, right? Serialize field. We're going to do a boolean remove all weapons on start equals false. That's great. Um, what else? Well, we also we want to remove the sprint ability, right? So, how do we do that? Um, let's do a new boolean. serialized field boolean remove uh all remove sprint on
start equals false. Good. Um I'm curious how we're going to do this. I believe it's going to be in our player statistics. Oh, by the way, let's clean this up. We don't want that. That's messy. Okay. If remove sprint on start game. Oh my goodness. It knows how. There's no way it knows. Yeah, I I thought so. Look, it it thought it knew, but it doesn't. Yeah, that's what I thought. Is it in player statistics? Let's see here. Where is it? Let's double check something here. Let's go to our FPS controller. There is a there is a variable here related to sprinting that I want to take a look at. There's something that needs to be
checked. Has sprint ability player controller hasp sprintability equals false. I'm going to remove all of these. So basically what I'm going to do is clear all of these abilities. I'm going to create a function called clear all abilities or set all abilities to false. That's really what I'm going to do. So, I'm going to put it inside of the player controller right here. Um, public void remove or uh set all abilities to false or how about disable all abilities and it will be temporarily. So, disable all abilities temporarily. It's not going to save necessarily. I guess it will actually. So, that's fine. Um, disable all abilities. And then we're just going to say has sprint ability equals false. Has wall run ability equals false. Has double jump ability equals false.
Um, and frankly it should be enable all abilities with a boolean enable equals true. Um, and then we're just going to say enabled, right? Has grapple ability equals enabled. Has what else? Slide ability equals enabled. Right? This just basically what this is going to do is going to force the player to stop and to slow down, right? Um, oh, is this your first time exist? This coffee is cold. Is this your first time exist? Welcome, welcome, welcome. Come on in. Come on in, come in, come in, come in, come in. By the way, those of you just joining us, if you want to join Full-Time GameDev, which is my massive program that teaches you how to turn your small game idea into profitable game studio, something I've done several times, um, well, a handful
is the right words. I think three different times. Check out the link below. Whether it's Kickstarter, whether it's whether it's pitching to a publisher, whether it's making money uh from, you know, uh selling your game on Steam and hitting the Steam front page, whether it's getting press coverage, whether it's YouTubers and streamers, right? All of that, all of that you're going to learn in this massive program. So, check it out below and I will give you a shout out in tomorrow's live stream just like I did right here. Okay. Oh, wow. Has dash ability equals enabled. Dude, this is great. So now what we go what we do is remove all abilities on start. That's really the function name we want, right? Uh there we go. Remove all abilities on start equals false. If it equals true, then all we do is player controller dot
enable all abilities false. So bang, weapons are gone. Abilities are gone. So that's done. Cross out. Cross out. Cross out. Hide the UI except for Hide. We need to hide the UI except for the dialogue. Let's see what the chat is here. I'm sorry, what the uh cheat code is here. Everybody wants Everybody wants Everybody wants a piece of my attention. Alex, my game design teacher was highly against taking away control from the player in any way at any point. What? Vernab read from hashmap all keys. What? Nasser, great developer Johnny K. Do you talk to me? What? What are you guys talking about?
Let me look at the ch the cheat codes here. I got to pull them up. You guys can't see it right now. And believe it or not, as much as I harp against the GDD, we do have, let me fix my hair, a GDD that we are going to use. I've been using it for like just notes and stuff and it's always changing. It's not really a GDD at this point. Let's see here. I'm pulling it up. Give me a sec, guys. All right. So, the the toggle UI is the cheat code. So, what we're going to do I'm going to go to my start up here. I know you can't see the screen. Give me a sec. First things first, remove all weapons and abilities on start. So, here's how we're going to
test this. I'm going to clear out all of my save data. I'm going to enter play mode. Then, I'm going to collect all weapons and abilities. I'm going to save it. And then we're going to hit play again and see if it clears it. Okay. So, I'm going to max out. I have all the cool stuff here. That I'm going to kill this really quick. Uh, enable saving. Yes. Okay. Now I can press V and save. Good game saved. Awesome. Uh, so if I press play and load, it should I should have all those abilities. Is it necessary for devs to
have cheat codes? It helps a lot. I don't know what I would do without it. It's It's very important. Okay, so that works. Now that that works, what are we going to do next? Well, let's test out that startup, the the scripts I just wrote for startup. Remove all weapons on start and remove all abilities on start. Ready to test it out and see what happens? Let's hit play. Oh crap. It's almost like it's pulling save data. I was so
excited. What comes first, awake or start? Why doesn't that work? Dang. Blast it. Let me Let me do a little debugging here. attempted to clear out weapons. This should be optional. If uh fade quickly or if cut to black, do this. Bull cut to black equals
true. I'm going to set it to false here. So, deactivate weapons. We don't want it to cut to black. Okay. Let's also do this. Enable all abilities. We're going to do a debug.log. log tried to clear all abilities. We might need to create some kind of uh yield here that occurs. Uh it it does it after like two seconds. Yeah, 3D Realms is my publisher, correct? All right, let's see what happens in the debug.log. I believe it's occurring. Look
guys, I'm actually not There we go. Attempted to call. No, that's not it. Guys, that debug's not happening. Do you guys see it here? I wonder if it's because we're getting Perhaps a null reference exception. I'm not sure. Wait, wait, wait. Yeah, if that's true and that's true, it should do this. What?
Juny Dorjani says, "How do you recommend making 3D models if if you're okay at art but don't know where to start?" Johnny, I would I would definitely learn Blender. Um, don't necessarily worry about humanoid models just yet. I would just learn hard surface modeling, right? So, I don't know. I could not tell you why we're not getting a debug. What?
We going to need to do one here as well. Okay. If we get that and it's it's at least doing this. I I think I think we might be getting like a weird null reference exception or something like the weapon controller doesn't exist yet. I don't know. I Well, it I'm not worried if it's occurring before save data right now. I don't even know why those debugs weren't even aren't even showing up. So, let's try again.
Okay. It hurt. It happened here. But then there's a null reference exception here. What? What it should say? Attempted to clear weapons.
I don't understand. It's happening there, but it's not happening here. We're not This is not occurring. Is that because the player weapon controller doesn't work? Let's see. Plus the weapon controller. Let's test this out, guys. We're going to figure this out. I promise. Okay. I have a theory that it doesn't
exist. No, it's there. Okay. it it exists. So, it should be able to fire this function, right? I'm going to put this here. It's almost like it needs to know that the weapons exist first. And I So, I think we might need to wait for a yield. We need to do some kind of enumerator or um co- routine and yield it out because I feel like it's going to happen here, but it's not happening here. And I'll remove all of these. Obviously, guys, we just want to have these different flags that we can click on. So, this is annoying. So, this is the weapons issue. But I wonder if all my abilities were
removed. We'll we'll double check that as well, but I have a theory that it's not. So, let's go ahead and take a look. One here. That's it. What? What? We're going to put one here. Good grief, Thomas. How is this happening?
What on earth? Attempted to clear out weapons and then boom, it tries to change the weapon and there's a debug issue. I see. So we need to create a a I enumerator that waits maybe 1 second.
One sec. Bro, I haven't Googled in so long. It's wild. Okay, the enumerator is going to call be called remove all abilities and weapons. So, if remove all weapons on start here, let's just do this. Remove all
abilities. Okay, we're going to do remove abilities or weapons. Got it. All right, we're going to wait for one second. Wait for everything to load. Then we just say boom. Right. So here we just do a start co- routine remove all abilities or weapons. That's it. Okay. The theory is is waiting 1 second will help everything to load first and then that removal will occur. Good.
Good. And all abilities are gone, too. I can crouch, but that's it. Can't sprint, either. Yay! Thomas, you win. Thank you. So there's an issue here which is the hammer does not dis does not get removed and boy I don't know actually why um what happens if I do this I'm going to do a little boolean here called remove knife and that equals false. And then we're going to say or remove knife equals
true. That's about it. So it's saying look by default don't remove the knife unless this specific function tells you to. I know it's pretty ugly, guys. We're at the end. We're at the tail end of development. I've said this a million times. I don't care if we've got ugly code at this point. I'm just ready to roll. Deactivate all weapons. Do we want to remove the knife? Yes. Right. All right, let's go. This kind of stuff, by the way, is the pain of making games. Um, it is so Okay, good. So, for some reason, I have the
knife. Um, or the hammer. It's It's the hammer, but I really need to be able to remove it. So, And we also want to be able to equip a certain weapon, which is the empty weapon. This is going to be tough. It's changing the weapon to one, right? We really want to change it to zero. Let me double check something here. Macwood says, "The game is your game is going to rock. Good work, team." I sure hope so. The the main issue we have right now is the optimization of the game is not done yet. Um,
good. Thank you, Lord. And all we're going to do is this. I know this is disgusting. We're going to do integer change to weapon. By default, it's going to be one, but we're going to set it in the level startup. We're going to set it to zero. Get rid of all these debugs. Don't need those. My favorite color is blue and [Laughter] pink. That doesn't work, Tuck Mac. Because this controller is linked like a
giant a giant android with wires coming out of its chest. It's linked to the entire game. The game manager, the save system, it's like an octopus of wires. And so we can't just put in something new because then the save system will break. All right, let's go. What am I doing? Oh, yes. Let's double check here. It's over here. By the way, those of you just joining us, check out Fulltime GameDev below. See if it's something you're
interested in. Let me know in the chat if you're a student of the program and what you think about it. But yeah, check it out below. Uh it's 25% off for the next five days, depending on when you click that link. Um yeah, check it out below. learn how to make a game studio from your bedroom. At least you learn from somebody who's done it, right? Okay. Um, hide UI except for dialogue. Thanks, Phillip. Let's do toggle UI and let's see if the dialogue works. Man, without sprint, the game is
much harder. Hey, good. works. Made it to the final part. This place. All right. Yay. If we go to our cheat codes, we'll see what all we got to do is go in here and see what the function is. What the function? Other UI canvas.game object set active. So, what's other UI canvas?
Dang. We need We're going to need to We're going to need to figure out what that is. We got to Fast controller. Take a look at it here and we'll go to controller here. If we go to the player cheat codes, what I want to do, that's really, really gross. I'd rather this be in here. Yeah, I'm going to do it in here.
other UI canvas. All other UI that can be hidden for cinematic effect or with a cheat code. Right? Then what we're going to do is we're going to go to the cheat codes here. Son of a Oh, let's see here. Cheat codes. Where where did they freaking go? There we go. So, this right here, we're going to create a function inside of player statistics. By the way, all of our UI is stored in player statistics for some reason. So, anyway, we're going to create a function here. public void. Uh, why are you doing this?
Stop. Stop. Stop. public void uh enable other UI boolean enabled equals true and all we do is this. Oh, look at that. Basically, it's it's toggling it, right? And you know, I'm not sure that that's what we want to do. We could say [Music] this. We're going to need another one called toggle. Right. So, this is how it
toggles. And this one is going to be enabled toggle. Okay, let's go to our cheat codes here. I just want to I want everything to be nice and concise here. So, we're going to go to game manager player statistics toggle other UI. And then this over here, enable other UI. We're going to do that inside of the level startup, which is here. If uh hide other UI do it, do it. Do it. Player statistics dot enable and we're going to set it to false. All right. So, this is not this does not exist. Serialize field. Serialize field boolean hide other UI equals
false. Then we also need to make sure we're telling the player statistics what that other UI is. Okie dokie. So, player statistics. What we're going to do is drag that other into here. Uh, where is it? Oh, wow. We already have one. I think. Do we? Oh my goodness. It already exists. So, we need to go to this
here and we need to go UI other. Is it UI other parent? I guess it is. That's fine, I guess. UI other parent. Blah blah blah blah blah. Check it. disabled. It's really not. Let's change the language here. Is active is much better. Um, set active other UI. I like things to match the actual words that are being used. Set active other UI. Good. Um, that's good. That's good. That's good. Level. Uh, I'm sorry. Player statistics. We need to kill this here, which is this. We don't need that anymore. Level startup. Height of the UI. Good, good, good. Wait, what is this? I'm not getting an error here. And
I should. Okay. Oh, and then one final thing here, which is the cheat codes. We don't need this anymore. This is redundant. All righty. What? Man, let me clear out Visual Studio. It's not showing us those squiggle lines for errors.
[Music] Wow, the podcast is doing pretty good. We're almost there. We're We're making our way up. Okay. Why am I not seeing errors? Does anyone know? I don't know why I'm not seeing errors in uh it's like I I Let me Let me double check with Grock. Let move that over here.
Yeah, I don't know why the errors went away. So, let's double check here. Grock. For some reason, Visual Studio is no longer showing red squiggly lines under errors. Tools, options, text header, general, show error squiggle is checked. Okay. Tools, options, text editor, general. Tools, options, text editor, general
Show error squiggles option is checked. Show error squiggles. Yeah, it's set. Some reason that's not doing it though. It's so weird. Yeah, we can save the changes here. Let's enter play mode here to take a look.
See if the toggle UI still works. It does. Good. All right. Next, we need to go to the startup function and do the same thing or the startup class and do the same thing. All right, let's go to startup here and hide other UI. And this should do it, guys. Yes. Brilliant. So, this is what's going to happen in the last scene. Nice and slow. Oh, we can't see anything. Can't do any of your
abilities. No shooting. It's over here. All right. Very good. Very, very good. I'm not seeing the chat for some reason, but um it's okay, I guess. So, those are all set up properly. So, now I need to just go to the last scene, which I can't show you guys, and uh just basically flip those those toggles off and we're good to go with setting up a more cinematic sort of scene where you can't move around. Isn't that great? Brilliantly done, Thomas Brush. Damn, you're there. There you are, Foxite. Good, good, good. Okay, that's all set up. I'm going to enter
play mode just to double check. I can't show this to you guys, though. Brilliant. It works. Yay. Hey, Thomas. I just noticed your beard is getting bigger. Why, thank you. better. Um, all right. We got that done. Um, I'm actually surprised that
happened as fast as it did. That was 55 minutes. Let me go ahead and see what else we got here. Mhm. All right, let me remove this. I know you can't see it. All right. [Music] Um, I guess if we go to our optimization list here, I could probably do something from that. The destroy all meshes that are inside
enemies that are unnecessary. We've already done that. Ensure enemies are hidden by default. when playing an initial level. That's interesting. And by the way, we got a big problem, guys. I totally forgot that we have a major issue. Oh my goodness. Let's go to GitHub. Do you guys remember how last week we worked on this crazy object activated trigger stuff before I left.
We added a bunch of for loops that objects get activated and deactivated. That's supposed to solve the hitching problem. So basically when you walk into a new area, it should activate all these objects. So I guess we can move into this and try and fix this. Although I'm I'm pretty certain that this is just not going to work. But it could be. You never know. It could be that this is almost done and all I need to do is tweak some code. I don't know,
man. Oh, Austin says the trampoline sound effect still plays when game music or when game sound is turned down in the demo. So, let me go ahead and fix that really quick. Thank you so much. Bounce pad large. There it is. The issue there is the audio source is not going through an audio mixer. So, I need to set it to gameplay. And that solved the problem. Yay, Austin. Thank you, buddy. That's fixed. Um, yeah. Now to solve this hitching problem, the idea is we can slowly load a bunch of objects with a for loop. But man, this was way more
complicated if I can recall. The issue was Oh man, it's been like a week. If we go to if let's close out all this stuff here. If we go to our object activator trigger, this is our object pool. So essentially guys, what we're working on here is when you go into a new area in the game, it instantly activates a ton of objects. The problem with this is that it causes frame hitching. Um, and so my theory is instead of redoing the entire level loading system, what we need to do is
just use a for loop and activate the object slowly in sequence. Of course. I doubt that that's going to work. Activate all objects conditionally. Occlusion calling is fine. That's mainly that's only for meshes. That's not for all the other components
um like physics and audio and all that stuff.
[Music] This is tough. I don't know what I'm looking at. I don't know what I'm looking at. Essentially, this is irrelevant because this is activating the parent object. Ah, I think I got it. I think I got
it. We never want basically there's these objects here that start with D. Those are basically these are like folders and if it's D um it will deactivate it, right? And that entire object will deactivate. What I wanted to do instead is all of the children should get deactivated. That's really what we want. We don't want to deactivate recursively everything including the parent. So, here's what we got. What we need to do on awake all that gets added. Okay, hang tight guys, hang
tight. We're looking for a starts with function in the game. There it is. This isn't happening in the game manager. So, here's what we're going to do. Okay, first things first here. Deactivate all children inside of S2. There we go. That way we're not deactivating the
parent. Deactivate all children inside of S2. There we go. That's all we want to do. If it starts with E, you set it to true. So bare minimum, we're going to see if this works. Okay. Basically, what's happening here, guys, is when we start a level, there are objects, giant folders. Basically, they're just game objects. empty game objects that contain a bunch of children. Uh when we hit play, if it's has a D in front of it, it will deactivate it immediately. What I want it to do instead is simply deactivate the children. So, let's enter play and see if it works. Yes, we will combine static geometry as well, although I'm not quite sure how we want to do that exactly. Okay, so far so good. And I'm being serious, by the way,
because I I'm seeing all these just deactivating. We just need to clear the game manager, which is great. So, the good news here, guys, is that all of the children um all of the children of these objects are deactivating, but Oh, boy. This is real real problem. There's whole there's there's giant issues with saving as well. But it could be that these aren't that big of a deal. You know, we're going to double check. Um, so let's see what happens here. Let's take a look here at object activator trigger. All we're going to do now is we're going to say,
"Look, I think I've got this. All it is is this right here. Okay, hang tight, guys. I'm figuring this out here.
Which this one here there's no boolean. All right. Delete this. So all we're doing here, guys, is we're trying to make it so that giant sections of levels can load slowly through a for loop. so that we're not getting crazy frame hitching, you know. Yeah, separate seeds are fine. The
problem is it changes the whole save system and it changes the way the levels are laid out. It's just massively different. Um, no. I think I needed that. Yeah.
[Music] So basically this is saying if the object we want to activate starts with E or D, we want to activate all objects. Why is that there? We want to activate all objects over five seconds. If we go here, we need to say Oh my goodness. Okay. Why don't I just do Why am I doing that start co- routine activate objects
co- routine boom boom boom which objects list that is the which object pull here. Uh set active and then objects per frame. We're going to do five. Um but there's an issue here which is activate object. We don't want to activate or deactivate these objects that start with E or D. So what we do is we say if which objects list J.Name doesn't start with E and it doesn't start with D. Man, we're getting some weird stuff here. It's not showing me errors, which is really frustrating. then go ahead and
properly set it active. So, all I'm saying is look, if if if it's basically one of those folders, we don't want to set it active to false or true. Um, otherwise, go ahead and set active all the children over the course of five seconds or five objects per frame. You know, it'll be pretty slow. I it might cause even worse frame hitching. I I don't know. Um I don't know. That's awesome. Paradox, thank you. Paradox says, "I love playing your interviews in the background." Thank you. All right, you guys ready to try this? This is going to be really strange. Um, there's a lot going on here that is over my head, something I'm not really familiar with. Um, there's
obviously better ways to do this, but at the end of the day, we're trying to resolve frame hitching. So, step one, step one is to take a look and see, okay, are objects deactivating properly? Yes. Good. Good. Enabled. Good. [Music] Awesome. All right, let's test this out. So the idea here, this door choice hub should activate over I would guess like two seconds, right? Tiny, I have a to share. It's about the prize. It just did it. Holy crap,
that was awesome. But we just had an issue with the dialogue. Isn't that crazy? Look, it's happening slowly over time. You guys want to see it? [Applause] Watch. See that? I am really shocked it actually did [Applause] it. The deactivation. Same thing. So, what I'd like to do I'm I'm I'm shocked that that works. Um, how many objects how many objects
per frame? If well, it's if it's running at 60 frames per second, you could get like 120 I'm sorry, 180 two 240 objects in 4 seconds. One, two, three, four. which you know um that that would be um how many objects per frame uh one object per frame is 60 objects in a in a in a in a second. Yeah, I'm going to do one and see what happens. I just want to see it go. But I have a theory that the frame hitch is going to happen. My hope is that it's not as bad, right? You could use delta
time as well, Thomas. Well, yeah. I'm saying minimum our goal is 60 frames per second. I'm I'm basically thinking of the worst case scenario. Um, wonder how this is working. Objects per frame. Do I need to do this at delta time? Does this need to be timed delta time? Guys, does that is that uh is that we need need to do? Well, I I totally agree, Simon, but um I'd rather see objects popping in and out than
hitching. Um so we're getting some issues here. Cannot convert float. Yeah. So this needs to be a float. I don't know if that's going to work though. Um because I is going to need to be rounded. So, we're not going to do this. We're going to go back in time. We're going to set it to one. all the naysayers in the chat. All right, you ready, guys? So, I'm fine on startup having things activate and deactivate instantly. That's totally fine.
Tiny, I have a confession to share. It's about the prize, so handle it with care. The prize is not quite That felt really good. I did not see any hitching. Did you guys Why would game objects cause hitching if they are called out and not rendered? Because a rendered mesh isn't the only thing that slows down your CPU or your GPU or whatever. You know, you're going to have physics code. You're going to have audio code. You're going to have object startup scripts. A ton of code on start. Um, that's that's that's why. Um, does
that help you at all? Patre, however you say your name. Okay, look. I'm going to see if that caused hitching. You guys ready to take a look? Let's watch the stats and watch the frames per second. I have a confession to share. Here we go. It's about the prize. So, handle it with care. Good. So, it's slow. I mean, it it it took a while to appear, but the hitching was almost gone. I mean, I felt it a little
bit. So, what do we [Music] do? So, that took like 4 seconds. Um, let's ask co-pilot here what to do with this in my selected code. I'd like the objects per frame in to be a float and I'd like it to be frame rate independent.
This means that uh please adjust the for loop accordingly. All right. Yeah. So, it's going to be a little bit different here. It's going to be an I enumerator or no, it is an I numerator, but it's going to use um essentially a timer.
Yeah. Um yeah, I think that's fine. objects per second. That's better. That's what we want. So really, you know, I would rather it be the load time is always sort of the activation time is always two seconds. One, two, bam. You know, um, that's what I would prefer. So, let's let's ask a co-pilot to do it. However, I've changed my mind. I want it to I want the objects per second variable to actually be called load time. And
basically all of the objects will activate in a specific amount of seconds. Remember the object list is going to be variable. Sometimes it will be a lot of objects, sometimes it won't be. All right, let's see what happened. [Music] Everybody. All right. What do we got? Okay, that's interesting. We'll see if it works. Um, all right. So basically, look, we have load time and we can set it up however whatever we want it to be. In
our case, I think two seconds is great. We're going to do two seconds for our load time. You guys want to try it? cold and cold or rendered does not equal active 1,00%. Active is you got shadows being rendered. You know, you've got um lights, you've got um real-time light information hitting dynamic objects, you've got code running, you've got awake, you've got on destroy, you've got start, you've got pulling save data. All that stuff is happening even if something is culled. Culling is purely a a mesh thing. All right, let's go.
Tiny. I don't know why it stops. A confession to share. It's about the prize. So handle it with care. The prize is not. That was very slow. One, two, boom. I don't know if that was actually actually two seconds. What What do you guys think? Let's double check. You know what we need to do? We need to find all the objects that are nearest to the player and spread out as if a bomb went off. This is like Minecraft stuff, especially on a Nintendo Switch. I got Minecraft for Nintendo Switch um for my kids and boy is it trash. You
know, that did feel like six seconds, didn't it? Elapse time plus equals time delta time. If elapse time gets greater than time per object you said it felt like one second. No. Let's try it again. Let's set it to one second. See what we get. But I gotta admit, guys, this is pretty cool. You know, this and if if we can adjust the code to basically start the object activation nearest the
player and it spreads out in sort of a bomb explosion explosion, then what we can do is actually make it much slower. We can just, you know, let's try it again. Okay, here we go. This is actually really fun and and kind of encouraging. I'm sure we'll get some save issues, but we can try it out. Tiny, I have a confession to share. It's about the prize. That was way too slow. Something's happening here. Time per object is load time, which is one, divided
by how many objects, which is like a thousand, right? So this is every single iteration. Do it. Do it. Do it. Do it. Do it. So I think what I'm going to do here. I'm going to set this back to what it was. But what we're going to do instead here. Wait. Uh what? Hang on.
There we go. Objects per frame. Objects per second. Yeah, I actually like that better because it's consistent. But what we needed to do is we need it to sort the object list based on the player's current position. This gonna be fun. Sort the uh which object list based on the players position which is game manager. Player transform.position. Watch.
How do we sort? I need a function that will sort the which object list based on the players position which is game manager.controller.t transform.position based on the player's position magnitude, isn't it? Is it magnitude or is it It's got to be magnitude, right? It's essentially the hypotenuse. Yeah. Here we go.
What is happening? All right. Sort objects by player distance. Player position equals that. Good. Sort A to B. And there's distance A and distance B. And it's comparing the two. Okay. Yeah, magnitude is my what was my thought process, but let's see if this works. First things first, you know what I mean? you're going to sort that list. So the moment we want to activate an object, we want to sort it, right?
Um, that's great. I think that'll work. Once it's sorted, we can have a slow activation and it spreads from the player, you know. Um, we could do it even, you know, how many how many objects per second? Whoa. We could do 20 objects per second. No, we could say 100 objects per second. No, 20 is fine. Let's try that. Let's just see what happens, you know. All right, guys. Name the song. [Music]
[Music] All right, let's try this out. You guys ready? Here we go. That's right, Mike. Good job. Vector 3 square magnitude is the fastest. Tiny. I have here we go. You guys ready? Let's watch. It's about the prize. Here are all of our deactivated objects. The prize is They should spread from the player.
What? Uhoh. Why? Let's do 100 objects per second. That's weird. Oh boy. Why is this happening
guys? Look, that's crazy. Okay, they all deactivated properly. [Applause] Go here. They're getting deactivated. Okay, they they deactivated really nice. For some reason, they deactivated great that [Applause] time. That was awesome. The hitching's [Applause]
gone. It's not perfect, but it felt like it was gone. A twisted night. Oh, we got an issue, guys. We don't want to add objects to the list if they're deactivated. Now, that's the question, right?
For some reason, it appears to be activating certain things that it shouldn't be. Let's double check. That's pretty wild. [Applause] That feels really good. I I I am weirdly impressed. The problem is is if we move like this, what happens? What kind of screwy stuff can we [Applause] do? Ow. I'm looking for issues. I mean, there's
one. What is like that's not an issue, but we'll double check. Okay. Yeah, we got some issues. So, there's some stuff going on. The problem isn't Mesh's prime video, so I don't know what this is. [Music] Okay, I I have a theory and it's this is actually pretty cool. I I uh have to gather my thoughts though. I can feel a little bit of hitching. It's subtle.
Um I'd like to see it occur from the top view and see if it's actually coming out from the player's position. I don't think it is. [Music] Um, no. I know that's Z fighting. Um, I need to They should be there though at all. So, let's go ahead and try this again. I want to see I have a theory that it's not spreading out from the player. Um, okay. I'll turn it down. Sorry. All right. Volume better. Okay. So, here's what we're going to do. A confession to share. It's about the
prize. So, hand care. The prize is not quite what you'd expect. It's true. But trust me, you'll like it more than you. Let's watch it and see what happens. You guys ready to see it? All right. So, we're going to be right here. Watch it spread out from here. That's what it should do. Yeah, that's weird. It's not working.
Okay. What is A? What is A and what is B?
I'm trying to figure something out here, which is which object list dots sort
try another method. Uh you do line traces for real-time lighting only optimization. Yeah, let's try this new method here. [Music] I
mean, well, let's try it, I guess. We're getting an error here. The reason I'm using C-Pilot for this is I don't understand. I have never sorted a list before in my life. Oh, we need to include Okay, we need to include it. Good job. Who was that? CDG. Good job.
Okay, we'll try this. I doubt it's going to do anything different. Something's wrong with the logic entirely. I don't know, but let's double check. Welcome.
All right, let's take a look, guys. I have a confession to share. It's about the prize. The prize is not quite what you'd expect. Still doing something weird there. I'm not sure why.
Give me a sec, guys.
Give me a sec, guys. I'm just thinking
here. Can we figure this out, guys? What's going on here?
If you activate too many objects at once, it causes a frame I don't know if this object sorting is correct.
Hey guys, I love you guys so much. We're not getting frame hitching anymore. The problem was already solved. The frame hitching is gone. So, it's working. We just need to figure out how to activate the objects closest to the player. That's all we got to do. No, it's not a mesh thing. So, it's it doesn't have to do with LODs or culling. It's a it's all the scripts. When you have a thousand objects activated at once, it's going to cause hitching because they're all firing start. Okay. What is
happening? I mean, yeah, we can we can take a look at the list, sure, but it's pretty obvious when you look at it. It's they're like in groups. It's weird. It's really weird. No, we're not activating meshes. We're activating objects. So, a sphere collision wouldn't work because the object is deactivated entirely.
Jeff, what are you talking about, bud? Culling group. What's a culling group? What's a culling group? What are you talking about? Well, it's not that the scripts are heavy. It's that objects on start, when you have like a thousand objects fire a start function that pulls like save data, then you get a a hitch. All right, let's follow Jeff's instructions here. How do I use culling
groups to activate and deactivate objects? Create a calling group. The calling group tracks the visibility of objects within specific bounding spheres. Okay. Then then there's a manager activate deactivate objects. That is very interesting.
How do I create a calling group instance? How do I create a calling group instance? Each object you want to track needs a bounding sphere. Yeah. Sadly, we're going to have to add a bounding sphere to every single object.
Yeah. Sadly. Each object you want to track needs a bounding sphere. Okay.
I'm not saying you're wrong, Jeff. We're looking objects to callull. That's the thing I'm confused by. Look, if we take a look at this right here.
I mean, this this is really cool, Jeff. I don't know if we need to do it, though, because as it stands now, all we really need to do, we just need to activate the the object based on the distance of the player. That's all we need to do. Um, and and then we're golden. This is not working. It's just not working. [Music] Um, and I can't quite figure out why. Like this giant lamp here that should activate almost immediately, you know, because it's right there. The player's right here. It should immediately appear.
The same is true with this light. It should immediately appear because it's so close to the player. So, I'm not quite sure what sort does. No, no, no, no, no. We're not going to use a sphere collider. What's it going to collide with? They're they're deactivated. Okay, the list sort method in C is used to sort elements of a list in a place in place meaning it modifies the original list and arranges the elements in a specific order. Default sorting is um one to whatever the max number. You can provide a custom
comparison function to define how the elements should be compared. The comparison function takes two arguments A and B in returns. A negative value if A should become before B zero if A and B are considered equal. When sorting a list of objects, you can use a custom comparison function to compare specific properties. No, I don't want to do that, Eduardo. We've got a problem. It's you're you're right. We could do that. But the real problem here is that objects are not activating based on the player position. Hard stop. That's the issue we have here.
These are all the positions. Thinking like maybe it's because of the global position versus the local. No.
Here's what we're going to do. I'm going to enter play mode. We're going to take a look at the list. Wait, we got an error here. What? Why? What? These are game
objects, I believe. Right. Isn't that true? Isn't the list made of game objects? Yeah. Here we go. Let's take a look. We'll go over here. I'm going to fall. to right here. And we're going to test this. So, I should see that lantern, these poles right here, and this this light activate immediately.
Nope. Nope. That's wild. We're so close. where I mean it it it seems like it's almost random, you know. Let's let's double check again. I want to I want to load up my take a look at the list here.
Okay, let's take a look at this object activation trigger. Believe it's this one here. Okay, because we have three four different pools. pretty far away. Okay.
Oh man. Oh, what a [Music] [Music] day. There it is. All right. booth counter purchasable box. No.
What? There we go. Okay. Wow. That's just not true. The first one on the list, it's not sorting it for some reason. Hang on. Hang on.
Yeah, we're creating level streaming right now because the hitching is a problem, but
I have a confession to share. It's about the prize. The prize is not quite what you expect. It's true, but trust me. Okay, that worked properly in reverse. So, like what the heck? That that was great in reverse. So, I'm not too sure what's happening here.
It loaded from back to front. Yeah. Let's see what happens here. I mean, okay, it generally worked, but the problem is no, it does work. It does work. I see. Okay, I figured it out, guys. There are four object pools scattered throughout that area. And each one of these when I hit an object activation trigger, each one of these begins the co- routine. So they're all going to be appearing
slowly as we load. So all four of those object pools immediately start to activate. So that's why it looked like there was objects over here loading, right? Um that's because they're part of a different pool. They're just part of a different object pool. Um so I think overall what we could do is we could I maybe we could do 300 objects per frame. Was it no per second? Yeah, we could try that. Let's see what happens. We're going to We're going to try 300 objects per second. Realtime lighting, shadows, uh physics startup, the the there's a ton of things
that happen when an object appears. It is activated. Look how many we have. Look at this. Look how many objects this is. This is just the parent objects. These objects appear and activate. Look how slow that is. Okay. I mean, you guys all have um you're all confused and and you're making me confused, which is okay, should it be that difficult to activate objects? My theory is yes.
There's a lot of objects, you know. So, it's it's that's just the way it is. Deactivate. Let's try it. I have a confession to share. It's about the prize. The prize is Not quite what you expect. It's true. But trust me, we need to make it many more objects. What about a thousand objects per? Does that work? actually. Yeah, there's there's
thousands of objects with start functions. So, of course, you're going to get a a hitch, you know. Nice. Is this a toy? Guess we'll find out. I wonder why it doesn't seem to be speeding up at all. You know, like if I made this 10,000, I don't even know if that would do it. You know, something's wrong with the object activation script. I have a confession. Look at that. is
about the prize. It doesn't it doesn't matter how what that variable is. It's it's not working. Um, float time per object = 1 / one second. Is that Livy? All right. Can you give me two minutes? All right. I love you. Well, man, goodness me. Hey, huge thank you to Deaf, Jeff, David, Jeff, Michael, Sarah, and Renie.
O, thank you for joining FullTime GameDev last week. Guys, if you want to join Fulltime GameDev and get a shout out in tomorrow's live stream, check out the program below. It's my massive program that I've created over the last five years just putting content together, which teaches you everything I've learned in the last decade of making a profitable game studio. So, if you want to learn how to get funded from, you know, a publisher, funded on Kickstarter, uh, hit the Steam front page, get press coverage, get YouTubers to play your game, all of that is marketing stuff. That's business stuff. That's half of the course. The other half of the course is how to make a game. Whether it's Unity, GDO, or Unreal. You can take your pick, 2D or 3D. Pick whichever engine you want to learn in the program and jump right in and learn how to make actual money from your indie game. I've been published three times. I've secured funding on Kickstarter twice. I've hit the Steam front page multiple times. I've got press coverage from Time magazine Kotaku. And even some of my students have seen awesome success. Chris went full-time. Bart went
full-time. Everflux went full-time. Check out the reviews in the link in the description.
Auto-generated captions from YouTube — names and numbers may be misheard.
Distilling the key insights…
Thomas Brush · 2026
Thomas Brush · 2026
Comments