/How to debug your game | Live from HQ | Inside Unreal

How to debug your game | Live from HQ | Inside Unreal

Video: How to debug your game | Live from HQ | Inside Unreal

Subtitles

>>Amanda: Hey, folks! Last week was chock-full of exciting announcements and demos at E3. We were thrilled at the showing of Unreal Engine teams. There were so many games we can’t wait to get our hands on. With over 75 games on display at the show, the annual challenge of selecting our Unreal E3 Award winners was monumental. From heavy hitters like Borderlands 3 and The Final Fantasy VII remake, to small-yet-mighty showings from Way to the Woods and Creature in the Well, we had the privilege of speaking to teams of all sizes and going hands on with many of their passion-projects.

Dive into our E3 2019 recap to find out who’s taking Home top honors and receiving prizes from our great partners, NVIDIA and Intel. Epic Games CTO Kim Libreri is something of a legend in the visual effects industry, with film credits including The Matrix and the Oscar-winning What Dreams May Come. In our latest Visual Disruptors Podcast, FXGuide's Mike Seymour talks with Kim about how virtual production techniques are changing the face of VFX pipelines, how his team has advanced Unreal Engine technology by pushing it beyond its limits on special projects such as A Boy and His Kite, Hellblade: Senua’s Sacrifice, Meet Mike, Siren, and the new Chaos demo, and they discuss The importance of the annual Real-Time Live! To wrap Things up, Kim shares what he believes is next for Epic Games and real-time technology. Listen to the full podcast or read the blog for an overview.

We’re excited to announce the official launch of the new and improved Unreal Online Learning site. Now it’s Easier than ever to learn Unreal Engine and level up your real-time skills. Whether you’re an advanced UE artist or developer, or you’re completely new to the Engine, you’ll find courses designed to help you get the most out of Unreal at your own pace. Find curated learning paths, earn points and badges and more. Check It out and let us know what you think! Released into early access in December, Contractors has become a fan favorite VR shooter. Developed by the four-person Caveman Studio, the game features some of the best graphics for a multiplayer VR shooter with polished-looking gun models and a full body inverse kinematics system coupled with smooth performance. In our interview, the team shares tips on how they achieved the game’s high visual fidelity while keeping VR's steeper performance requirements in check, how they Designed a shooter around VR's strengths and weaknesses, and more.

Formed in a Canadian basement two years ago, Vancouver-based Precision OS is now a flourishing business that provides orthopedic surgical training in virtual reality. After years at Radical Entertainment, Black Box Games, and the industry giant EA, the team wanted something different. Since making a mistake in The operating room could have significantly grave consequences, the team now helps ensure that orthopedic surgeons get to practice on virtual patients before they Operate on real ones. Space sandbox game Astroneer has been a popular indie title that's been in the works for years. It has officially launched, but System Era Softworks isn’t resting on its laurels, and plans to continually update and improve the game. We sat down with creative director Adam Bromell and engineer Sam Wolpert to discuss how they designed Astroneer, implemented its stylized graphics within a procedurally generated world, and overcame technical challenges over the course of its development. Whether you’re training paratroopers to identify reference points for new drop zones, or predicting the path of airborne hazards, the accuracy and realism of your simulation is critical. That’s just one of the reasons Booz Allen Hamilton turned to Unreal Engine.

Learn more about the company’s impact on fields from government and defense to healthcare and energy and how They’re using Unreal to do so. Now on to our weekly karma earners. Many, many thanks to: Everynone, IndieGameCove, Shadowriver, Nebula Games Inc, that_lightworker, T_Sumisaki, Maksym Nosatov, XanderWraik, and Ted_Undead. If you’d like a shot at your name up here, head on over to AnswerHub and help out your fellow devs. First up for our Spotlight lineup is ZED, by Eagre Games. ZED is the story of an aging artist that is lost in regret and the haze of dementia. Inside the dreamscape of this creative mind comes undone, and then players Reassemble the artist's fragmented memories into a final, lasting legacy: a loving gift to his Granddaughter. Next up is a beautiful interior scene.

The artist has really showcased a stunning interior here. The layout is well-balanced and they’re leveraging ray tracing to really make it pop. Nice work. Last, but not least, is Lux. This project from the University of Hertfordshire is a final year project made by two students, with a little help from freelancers. Lux is a local co-op puzzle game. What you see here is a vertical slice and I’d say the pair are off to a fantastic start! Thanks for joining us for our News and Community Spotlight. Have a great week! ♫ Unreal logo music ♫ >>Victor: Hey, everyone, welcome to Another episode of the Unreal Engine Livestream. I'm your host, Victor Brodin. With me on the couch, I have a familiar face that some of you may have seen before, Mr.

Sam Deiter. >>Sam: What's up, everybody. >>Victor: One of our instructors on the Unreal Engine Learning Team, Education Team? >>Sam: Yeah, Education Team. >>Victor: Yeah, something like that. They make lot of the content that we all learn from, and that's why we're also here today because we are going to talk about how to debug your game. Oh, before we get Into that, I want to mention that if you saw our Community Spotlights, we will be handing out keys to ZED. Which, if you are one of the lucky few that get to play it, make sure you play, because it is gonna be great, I think. Looks great, anyway. Without further ado, we're going to talk about how to debug your game. This will mostly be around Blueprint and the tools that we have in Engine that can help with troubleshooting we will mention a few guides and ways that you can prepare yourself for success. >>Sam: How to think about debugging Your project, because it is more than just, like, throwing something in there and checking for value. >>Victor: Yes. >>Sam: We have some good stuff in store for you guys today.

>>Victor: Although that happens as well it. >>Sam: It does happen, I was saying that. Yeah, yeah, it kind of happens, but there's a ⁠— There's a rhyme and a reason. We'll get ⁠dive into that a little bit here in a second. >>Victor: Yep, yep. We have prepared a slide. I think we'll just start off with that, and we will go over some of the topics. >>Sam: I will get the mouse out of the way. First, we've got prepare. I think you actually did this one. >>Victor: I did this one, yes. >>Sam: I'm going to let you take the lead on this. I was like, wait, that's not my point there >>Victor: Yeah, a few points I want to point out there is preparing yourself for, sort of, as you call it, easy troubleshooting. You will always have bugs, you will always have problems, things will break, they will go wrong, and occasionally, they are very small and simple mistakes. Preparing yourself and your project and setting it up in a way that helps you identify them quickly is something that I think a lot about nowadays when I make my projects.

One of the key things to that, especially if you are working on a team, is to use a style guide. This style guide can be, like, there are good style guides, there are bad style guides, but the most important thing is that you actually use one and that you stay consistent. Like I said, we were not going to mention too much in [inaudible] or debugging, but a style guide helps you so much when it comes to finding Assets that might have been corrupted and knowing what you are looking for. Because everything, deep down, is just a file path or a name, right? You don't have any nice icons in the content browser, or anything else that you can look at. When things go wrong, all you're looking at is text. >>Sam: For those who aren't aware, when he's talking about style guide, we mean a guide for how your project should be set up and Assets should be named. There are many different types of style guides out there. But there is both visual and written style guides, just in case those who might not be aware of what we're talking about.

But I do like your point here, it is better to be consistent, even if the initial naming conventions are bad. >>Victor: Yep. >>Sam: I think consistency is easier, especially when you are debugging. Even if you do have a really long variable name, at least you can, instead of checking for that name, it is the really long one. Well, I don't remember what it is, but it is the one that's 16 characters long. >>Victor: Yeah, and one of the style guides that I personally use is one that one of our community members, Aller wrote. >>Sam: Yeah. >>Victor: Mainly, you know, there might be reasons why you'd want to have the prefix, the prefix is the first couple of characters of the name, of your Asset, and, you know, there might be reasons why you don't want to follow that precisely. But what I learned a lot about from the style guide is if I've got a project or folder hierarchy in your project, when you start scaling your project, having consistency there will help you a lot, especially just managing it.

Because when you are up to a couple thousand Assets, there's a lot of just sort of folder browsing and going about, and if you bring a contractor on your team, or someone else who continues to work on it, it is much easier if they can just go and read the style guide and see, oh, this is how ⁠— Or even if it follows one that they've used before where it will be much faster for them to get up to speed with the project. Always make sure you comment your code. It doesn't really matter how little, just ⁠— All the details you can pipe in there, or even as little, if you don't have much. Just comment it, it Makes it more legible, it is easy to get an overview look of what your logic is doing. Then, last point under the prepare is make your game modular. I like to say that code is for humans, and computers just read zeros and ones. That's what we compile down to.

It's for us, we need to read it, we need to understand it, and we're the ones working with it. Preparing your game and making it modular, it is much easier to find, oh, it breaks in this Class instead of, oh, I have several thousands of nodes and ⁠— Now, I know that some people say you shouldn't have several thousands of Blueprint nodes in one Class. But it is possible, you can do it. It all runs. Keeping logic in separate Classes, whether those are active components, sync components, Actors, other various objects, will help you track down issues faster instead of just the output log saying, oh, it broke somewhere in the event graph. That's a little tricky to track down, and I have been there myself, and it's not some ⁠— You would rather stay out of that. Our second point is think.

Do you know what's failing, sort of ask yourself these questions before you just start adding break points everywhere and piping in more pin strings than you had when you initially wrote the logic. Do you know what's failing, are you looking for number, or a reference, why isn't it working, and don't go with your gut, and always double check your work. The amount of times that I have accidentally left an execution node, even when I went to Package the game and nothing is working, and you are going, oh, no, the Engine is broken, and there are bugs everywhere, and it is just ⁠— No, you just forgot to plug it back in. >>Sam: Yeah, definitely make sure you are ⁠— you know why something is working and don't just assume. Because it could have been that you wired something backwards, or maybe you miswired something, and it is working because it is actually broken, so to speak.

When you undo it, it doesn't actually work anymore. That is probably one of the most important things to debugging is just don't base your guess off of a hunch. Make sure that you have an answer, at least something to figure out what's causing the problem, and don't just, "I think it is this because of this." You know, if you think that is, make sure that you investigate it. Don't just rely on your gut instinct of why the bug is happening, because it can often lead you down a path of heartache and sorrow when you cannot do what you want. >>Victor: If it is something quick like, oh I had this, or it happened before, if it is something quick to act on, then you can certainly do that. Just don't go breaking everything on that hunch is what we are trying to say.

Then it is just, you know, time to execute, be scientific in the way that you approach your problems. I think we can go to the next slide. I like three, so I put execute there in the end. Yep, that's part of the slide. I didn't have time to grab a rubber ducky, so just imagine one here. If you are not familiar with the concept of rubber ducking, it comes from some programmer back in the day who had a rubber duck on his desk, and he started explaining his problem to the rubber duck. It has nothing to do with the entity you are talking to, This is just for your synapses, they fire differently when you start speaking the problem out loud. I can't even list on my fingers and toes how many times I started writing a question on Unreal Slackers, and as I'm writing the question I figured out what the problem is. >>Sam: It is common. I have exhausted all my resources, typed up the email, and then I'm like, you know what, let me try this. that's exactly how it goes. >>Victor: Whether you prefer a rubber duck, or any other entity, maybe even imaginary.

But speaking it out loud, or in this case typing it, can really help you when you are so stuck that you don't even have any other scientific steps to take in your troubleshooting path. You are just stuck. That's when I really like to ⁠— >>Sam: It also helps when you are trying to figure out a logic issue, if it is a bug or a bug with logic, because they are two different things and they both result in code that doesn't really work in a desired way. Speaking things out loud can really help you step through the problem and expose things that you might not necessarily have thought about before. This is why you say it out loud to someone else, or an inanimate object. I prefer talking to somebody else because I'm not a fantastic programmer. It helps to, you know, when you're talking to a programmer, someone who is more experienced than I am, when they kind of help you connect your ideas together.

I want to do this, or what you are talking about is 2D vector math on, you know ⁠— I was talking to one of the Programmers about trigonometry, and he said this whole thing is called vec surfaces, look at this one specific part of it, because it is really difficult to figure out something that you don't know the right question to ask. Which can be one of the most ⁠— It is one, I think, of the toughest problems in video game development is literally trying to figure out, how do you know what's wrong when you don't know how to ask what's wrong until you figure out what's wrong. It is a very difficult question, or a difficult thing to overcome. >>Victor: Usually, someone who is not working on your project, and they are not aware of your logic in the problem, they will start asking some very basic questions, if they are a good troubleshooter and those basic questions can also either lead them to finding the problem really quick, because you might be so into it that you are not thinking about the first couple initial steps of what you have been doing.

Keep calm, look for the check box kind of deal. That obviously depends on if it's a tool that is not working the way you intended to, or if that is actually your logic. That's the concept of rubber ducking. It is very, very useful. Next slide. Yeah, let's get into some of the options that we have in the Editor. >>Sam: Print String, this is going to be your bread and butter. I mean, whether you are a C++ programmer doing something outside of Unreal, like you work for Tesla and you are writing code, Print String is your bread and butter for debugging. It is not a bad way, or a lame way to go about debugging. It is the way that most people will end up doing it, because it is very fast. You can color code the text, and there's pretty much ⁠— There are very few things you can't actually print a string out to, or hook up something to print out a string to. I use this for everything, like ⁠— There are so many ⁠— I can't even think of how many things that I use Debug Print String for literally everything, Like, one good thing is we're going to show you a mobile project, like, on your device, like on my phone here.

It is really hard to tell if you have done a tap or not, an input touch. It is really easy on your input touch, you just add ⁠— One of the first things I add is on event, begin play, or when the touch first happens, I add a little bit of a Print String right there just to put text that says "input touch." I know that my touch is working, because without your touch working, without knowing that the touch is working, you are like, wait, is there something wrong With my phone, does it not have enough battery, is there something with the screen, is there something with Unreal? Is it my screen protector? My wife, has, like six screen protectors on her phone. She is super clumsy, so you have to really tap on the screen to make things happen. But having that ⁠— knowing that right off the bat, boom, okay, I definitely know that the input is being sent out, so this is somewhere past that point. I leave those in there for the lifetime of my project until I have ⁠— actually, I never take them out. >>Victor: That brings us back to the prepare part of it.

Whenever I'm writing multiplayer code, I leave all of those Prints ⁠— they are always in there, right? When I create a session, when I'm looking for session, I will add a Print that this is what's going on, so when I go back and I am reading through one of the logs of the development build, I can see that, oh, the widget button that is supposed to create the session, it fired, I actually ran the function of trying to create the session, and then it failed. I know, or if it is ⁠— If it just dies or crashes for some reason, I know until which point my logic is working. That boils down a little bit to what I've done at the bottom of the slide here, which is A macro that I almost tend to set up in every single Actor that are working, which is to have a Boolean that I call "debug visibility" and I will have a macro that I call debug Print String, just so it is different from the function name Print String.

This allows me to leave all of my Print Strings as part of logic, and then I can just, oh, I'm done debugging, my logic works, I can go ahead and toggle that ball to false and the next time when I discover ⁠— Maybe I iterate a little bit and I possibly adjust some logic that affects some other logic, I can just simply, instead of going back and , oh, I got out of the string again, you can have a bunch of appends that is added to ⁠— Which I think we're gonna show in the project later, what an append is, and I won't have to go back and add them back again, and sort of write in little explanations, sort of doing multiline Print Strings. This is just an easy way that you don't have to, oh, I'm done, delete all the strings, make sure the execution lines are hooked up again, none of that matters.

You can use this in there and use that Boolean to toggle print to screen on and off. Just as a side note, if you do this, I think this is more useful if you're actually writing print strings to C++. But if you add warning: as the first step and the same with error that will actually color the text in the output log which can be really useful. That's when you see the warnings stay yellow, you see the errors are red, that's because they start with with warning and error. >>Sam: One thing to note, don't forget that Print String literally just prints a string, and your space counts as a Character. Don't forget to, if you are, like, in a string you put right here, if we're doing something, like I might do my ⁠— What I do personally is my value:, and then a space.

I will see my value:, and that space right there is super important because without it, whatever I'm trying to look for will be pushed right up against the colon. This just makes it a little easier to parse that information. Also if I wanted to extract all of that stuff out of the text file without having to do some Python stuff, I know I can look for ⁠— Because the space again counts as a character, space, whatever— That thing that I'm looking for, and then I can just do, like, find all of those, or cut all of those out, you know. These are things to think about when you're doing this. Maybe it will take you longer to write a Python script than it would to do all that stuff by hand. But if you just think a little bit about how you're going to do things and put a little bit of forethought into, okay, I'm not very good at Python scripting, but how can I do this with control F? What am I really using Python to do, and it is just basically to get rid of data, to give you data in a more usable format.

How can I do this? Maybe I have to do it in two or three steps instead of just one, but that beats, you know, spending weeks learning Python to not be able to actually do what it is that I want to do. But I spend maybe two or three, it takes me two or three clicks to do instead of 50 because I got a little clever with my debug output. >>Victor: That's similar to how I search for Assets sort of in Explorer, not in the Content Browser, and that's why the prefix for Assets is very important. Yeah, and so one that I tend to, because I usually experiment with particles and I might not be so consistent where I put them, and I'm like, oh, where are all the particles that I'm sitting on that I should delete now because I want to minimize the size of my build, I just go p_, that's what I search for and, by the way, shout out to a tool called Everything.

READ  How to Generate Art - Intro to Deep Learning #8

It gives you amazing indexing. I should totally have put that on the slide. >>Sam: It is one of the two programs that I install, that, and this thing called SageThumbs. >>Victor: I don't know what that is. >>Sam: SageThumbs shows you targets inside of Windows Explorer as thumbnail images. It Is called SageThumbs. It is a little hard to find, because it is a little bit older. I think you can get it from SourceForge software. >>Victor: It's one of them. >>Sam: Yeah, that's one of them. That, and then Everything basically indexes your entire computer ⁠— >>Victor: In seconds. >>Sam: It takes a little while to index it, and to access the index, you get it, like, on MacOS, I forget the name of their search bar.

I was explaining it to somebody and they were like, oh, so It's like such and such on Mac? I guess? It sounded pretty much the same, because once it's done indexing and I have three drives on my computer here at work, and two at home and, you know, I have, like, 2.5 terabytes of storage here at work, and whatever it is that I'm looking for, I do a lot of stuff with the Infinity Blade Assets, but I always forget the name of the project that I put the Assets in. Just like you, I'm like, Infinity Blade, like, Ham Bone, because that's the name of the big meat sword, it is called the Ham Bone because It looks like ham with a bone in it, and then I find that, and then I find the project and I'm like, oh, yeah, I remember what it was in, the 4.19 features, whatever the thing that I imported into. Yeah, so Everything makes it super easy to find, pretty much everything, as the name implies.

>>Victor: It is great. Then when it comes to Print Strings on tick, they're fine to put there, but there's a few things that will help you when you're doing that. Something that I like is to set the region to zero, because instead of just [blup] it will keep printing and the default is, you can see one line and if you have eight Actors all printing something on tick, you can actually see them all at the top. >>Sam: That's a good idea. >>Victor: All of the print strings that are individual events, like execute this, and we want to display for two seconds, that is displayed below, which is useful. My final tip is do not print to log if you are printing on tick. There are many reasons why. One is if you have a long, like, play test, your log file will be huge, and it will seriously impact the performance. You might start thinking you have performance problems when all it is related to is you are printing strings. >>Sam: Your players can say, as I play the game more and more, my performance degrades more and more.

It is because it is trying to write all this stuff in the log files, like 3GB, then 4GB, now 5GB, then 10GB, and now it's bigger than the amount of RAM that they physically have in their computer, and now what do they do? >>Victor: I'm actually not sure what happens there. >>Sam: It will crash. >>Victor: I think that covers Print String, we are definitely going to go ahead and use it, show it in a little bit. Draw Debug, extremely useful. I like to use them, I think they use them more when I do VR development than flat game development. >>Sam: Yeah, what have used these for, I use them in action RPG to figure out ⁠— Ah! I was trying to make some explosion damage, just to find out that we use a different type of system, so the stuff is not hooked up to the standard.

velocity and things like that. But I got super complex with the debug sphere, drawing every tick where it was going, because I'm like why is there no damage happening? Then some things were getting damaged, but that was a bug in the code. But, Yes, these are super ⁠— actually, in one of the VR tutorials, when you plot your play space around you, your Vive interaction area, you use the Draw Debug ⁠— I think it is the Draw Debug line, or box, I'm not sure if it is the box or the line, but basically to plot out— You get the location, and then you plot a box around that. That's pretty cool. Then I use the Draw Debug box to basically draw where an action RPG again, when the player vanquishes the enemy, he spawns a bunch of loot and it just basically makes a box in space and picks a random spot within that box to spawn it, but I didn't understand that.

I didn't understand what it was doing, so I set up what it was doing with a Draw Debug box so I could better understand what it was doing in the World, because it was basically, like, a one for one kind of swap. These things are incredibly useful. >>Victor: Yeah, because the visual representation of what you're doing can really help us humans understand what's going on, and you occasionally need that, and these are very useful tools to be able to do that. If we go to the next slide, here is something ⁠— Actually, you know what, I will go one more after the console— Keep going, okay, keep going, I want to bring it up right now. Keep going, there we go. Okay. I guess there could have been more meat here. But it is a good mention to bring up the Visual Logger, and there is not any need for us to go over this here, because there is an amazing talk done by one of the developers from Rare, Andy Bastable, he goes over how they use the Visual Logger in Sea of Thieves, I believe. Just a quick break down in what it does, it allows you to record whether they are locations or lines, directions, during runtime.

Then you will actually see a representation of those debug draws afterwards. >>Sam: Basically, if you heard of something called heat mapping, that is precisely ⁠— >>Victor: Yeah, yeah, yeah what it is for. Heat mapping, the first time I heard it was in reference to Counter Strike where the level designers are figuring out where players spent the most time, where they died most often, and sort of, and so you used that heat mapping to get an idea of how the game actually plays out, you know, after several thousands of play throughs, you get a pretty accurate heat map of where action takes place and you can use the information to improve on the level design. >>Sam: The first game I worked on was called Stargate Resistance, and it is a third person Stargate game. We used heat maps to figure out, like, basically how big you should make the levels, like what are the max extents to where people are playing. We found out that there would be basically a lot of, depending on how wide the hallway was, the first person to enter the hallway would be the person that is always going to win the battle, or things that we didn't think of or, what else did we find, there are so many things that we found out.

We found out if we increased the jump height by just a little bit, we ended up making the sniper rifle less deadly. Just insane things that you never thought that you were going to ⁠— just ⁠— I didn't think that that was a thing, or something like that, can be found with heat map data. It is really, really useful data, especially when you are debugging, because it can brings you insights to how people are using your product that you never thought were possible before. >>Victor: Yeah, and watch the video, he goes through a lot of it, how they use it and why. Console commands, so if you are not familiar, you are just starting out, the console is essentially our way of inputting ⁠— telling the computer to do things without actually, sort of ⁠— >>Sam: It is enabling and disabling preexisting logic that you can access on the fly. For example, all these little memory charts over here only come up when you put in the stack command for them, they are constantly going in the background, but the stack command invokes them so that you can see what they are, and then you can get rid of them when you no longer need to have them. >>Victor: I put a couple of, I think the ones that I used the most on the screen.

and something that we figured out two hours ago was shift when you have the 3D Viewport in the Editor in focus, you can use shift L to toggle all of these on and off. You can actually keep the ones that you like to view the most instead of having to type them in every time, and you can use shift L to toggle them on and off, which is really useful. I haven't tried if that works in a development build yet. It could, but I don't know. If someone knows and wants to try that out, that would be great. We don't have time before the stream, but right after, I thought it was a really neat key bind. The same goes with the other ones, if you are toggling stat FPS all the time or stack rendering, you can assign those two keys. >>Sam: Some of that stuff I do on the beginning of event begin play, I assign it to the console command, and then stat FPS and stat unit just so that they are on all the time when the game is.

Especially if I'm doing anything with VR, that's the first thing that I put on, stat unit or FPS, but usually just stat unit. >>Victor: What is worth mentioning, you can call console commands at runtime in your game code by using execute console command function, and that is very useful. >>Sam: Tie them to a key, 1-3 or something like that. >>Victor: For 4.22, what I like, they started working on is an Editor Utility Widget that gives you a visual representation. Because, for game designers that don't need to dig into this too much, but they might, you know, have been told, hey, you know, keep an eye on your draw calls when you are designing your Level, instead of them remembering stat scene rendering, you can have a button that, you know, that sort of just says ⁠— >>Sam: It looks at it and it says, hey, you are starting to get too many objects, think about reusing or removing, that's pretty cool.

>>Victor: Yeah, and it is just easier to have a button, and then key binds, you forget them. It is hard to remember ⁠— >>Sam:Or recycle them a lot. Oh, wait, one doesn't work because I took that out. >>Victor: Apparently shift L also shows the print, prints on your screen, so you don't have to dig through console logs as well. That's really cool. That's why I love chat. Just helping us out and making everyone a ⁠— >>Sam: More efficient developer. >>Victor: Yep. We mentioned that you use it by default in the English, US, and I think English as well, Editor, you use the tilde key. It is called the tilde, right? >>Sam: It is called the backtick. >>Victor: Oh, the backtick. Why do I refer to it as tilde? Oh, is it the same— >>Sam: On the US keyboard, it has the tilde above it, but tilde is not ⁠— Backtick is the actual name of the key. >>Victor: That is what is assigned to the keybind in Editor. >>Sam: In a German keyboard, it is in between the greater than and the less than, and the question mark key.

It is, like, right there. >>Victor: Yeah, and there is someone ⁠— I don't remember why I figured that out, that is not the same across, I was helping someone in Europe. >>Sam: Yeah, somebody was like, I Don't have a tilde key, I have a backtick key. Not everybody has US keyboards. I was like, oh, I'm Sorry. >>Victor: Sorry. But you can reassign that to another key that is maybe in the same location? I don't know what that would be on another keyboard. That is really quite useful. Digging into these, and what sort of all of these mean, we are almost getting into a little bit more performance and optimization here, but there are plenty of docs online about all of the stack groups here. >>Sam: What they are, and you can find them useful for and how they can be applicable to your project. >>Victor: Yep.

If this is something that you want to dig into at the end of the slide, I will put the slide on the announcement post on the forums, I have quite a long list of videos and guides that are targeted towards this kind of stuff. There is one about performance and optimization there, where they go through a lot of these things. Cool, next slide. Output log. It is also sort of bread and butter, I almost want to ⁠— >>Sam: Yeah, let me ⁠— >>Victor: I thought I did an edit there. As long as you post ⁠— we will open it here for you, so you can go ahead take a look at it. >>Sam: This is the output log right here. We found out at the last second that something is weird with this project, so I'm not going to be playing it because I have a feeling that it is going to crash when I do that. But, right here, is basically where everything is going to be ⁠— you can see, like, I don't have encryption files here, if I go all the way up to the top.

When you go up to the log file inside UE4, that is actually what you're looking at. This is just what's going on inside of UE4 right now. This is super useful because, say you are connected, to my mobile device right here, I can see stuff ⁠— What's going on kind of in the game. In my device, I get a little bit of information back on this one, not a lot, but a tiny little bit. If I want to get more Information on what is going on specifically on my device, and let me take a step back and clarify that again. If I was launching this game and I was running it and it was, like, a PC game I was playing on the PC, I will get a ton of information out to the Output Log Window. If I'm getting information on a device like this, I will get double the amount of information.

I will not get information from the actual device, the battery levels, how hot it is, what java commands it is running, things like that. To do that, I have to use something called ADB Log Cat. It is a little complicated to set up and use, way out of the realm of most people. If you come here to window and you come down to developer tools, we actually have this device output log, which is right here. I'm just going to dock this down here. Here, I can select my device and go ahead and start a project really quick. I'm just going to start this AR project. You can see here, and let me move my thing down, get it down to the bottom so it auto populates, and basically right now, it is trying to get the best GPS provider, it doesn't work when you are indoors. But the cool thing about this, if I come over here to my Command Window, and type in stat FPS, stat unit, stat memory, and my memory is okay, and then what's going to happen is, and I don't know if you guys can see that ⁠— >>Victor: We need a manual soon.

>>Sam: Ahh, I can't reach. Basically, what ⁠— Oh, wait, I can put it back up there. >>Victor: It is a tiny little ⁠— You can see, we actually do see ⁠— >>Sam: You guys can see that, it is very tiny here. >>Victor: Oh, Greg is coming in to help! >>Sam: Yeah, we broke the fourth Wall. >>Sam: all right, hold it, keep it Right there, I will type in stat none, and they are all going to go away, yay, just in time for it to get unblurry. We will try it one more time. Stat FPS— >>Victor: There's a tiny green line right there. There we go, all done. It was a 5-finger tap, shift L. >>Sam: There we go. Stat none. >>Victor: They are all gone. >>Sam: That is really cool, because I'm doing this, like, to normally put something in ⁠— Thank you so much, I appreciate that. To put something into this device, I do the four finger tap, I get the Command Line Window, and recently we added a common console commands, which is pretty cool, but this is still me, four finger tap.

Okay, I got my FPS. Now, let me put in my stat unit or whatever else I need to put in there, and then I wanted to get rid of it or change it, and it is simple to do this inside of this window right here. I think I also have ⁠— No, I don't. >>Victor: You can use the up arrow to see all of your previous commands. >>Sam: Yes, that's what I was looking for. >>Victor: I use that all the time, and then another little thing I wanted to mention, once ⁠— If you are debugging individual play sessions and you wanted to search ⁠— You have a prefix in your debug or bp_ because anything that is executed in the Print String in Blueprint will have the name of the Blueprint, the World context for that. I should make a note to bring ⁠— Okay. Because I can't remember all these things.

What I do in between each session to make sure that I am only reading log from the previous session instead of trying to figure out where I started in the next session is you can right click inside the output log, and then clear log. That will just clear it. It just makes ⁠— Now when you do the next play session, you will only have logs related to the previous play session in the Editor. Your log file will still contain everything, as far as I know, I don't think I split it up. >>Sam: No, I think it saves everything out. You are making a log, and it saves it out to a log file, but this outputs it to this window. If you clear this, it is not going to clear what is in the file that is saved under. >>Victor: No, it is not going to clear, it is not deleting, but is it separating it between different log files to do that.

I don't think it does. >>Sam: Not out of the box. >>Victor: I don't remember offhand coming across that. Really useful, and something that I will figure out later. It is nice to bring these things up. Chat was asking if it works in iOS, and it does. >>Sam: Yes, it works in iOS, and it works for Android. It's 4.22 and beyond, it might be in 4.21, but 4.21, it only works with Android and not iOS. The reason being, this is actually funny, the deployment server, the person checked in their log. It is trying to write to a read only file, so it kept crashing because you cannot write to a read only file. As soon as we turned it to writable, the problem went away. When your deployment server is crashing and you are trying to use the command thing on the iOS and it is just not working, make sure that your deployment server log files are set to writable, not read only. >>Victor: Good to know, I feel like I would have been able to come across that at some point. Now we're getting into a little bit of ⁠— You have done the initial steps, prepared the project, you are calling in everything, and the code that you are iterating on is just not doing what you want it to.

The break points is not specific to Blueprints, they are common in C++ as well. That's where it comes from. Essentially, what break points do, you put a break point in somewhere in the execution chain of the logic, and wherever that function is being called by the logic, the runtime will stop and it will put focus on the function that the logic broke on. At this Point, you can now step ⁠— Every single step in your execution flow, you can go through that. We have a few ⁠— I think it is 4.19, we received a really nice update to this. Now we can do some things that are much more common in Visual Studio, to step in, step over, and step out. When you step in, if you put a break point on the macro or function, if you step in, you will step into that function. You do want to see what is going on inside that function.

Step over will just go to the next function or macro in your execution line. Step out is if, oh, you only cared about the first half of logic that you had in your function. Now you can step out of that and take me to the next thing. >>Sam: Yeah, it is if you had a couple functions that were nested and the problem was in the second function it went to it, okay, that's fine, I'm going to step out and go back to where I was at the top level is kind of what that does, or that has been my experience with it. I'm sure there is someone that says, no, it actually does this. But that's my understanding of it, anyway. >>Victor: Next slide. We have something called the Blueprint Debugger, and I am not 100 percent on this, I wanted to bring it up because I have seen it being used in very efficient ways. The Blueprint Debugger in 4.22, maybe 4.21 as well, this is what it looks like today. You are presented with three tabs, which is call stack, Launches, and execution flow.

I think what I find really useful is the call stack, I'm making a reference of how we can print to that. But the call stack will display the entire call stack that occurred when the break point was hit. That means the logic that was executed prior to the break point, right? >>Sam: Yeah. >>Victor: A useful thing is you can manually print this, and so the little function node that we have on screen up there is called Stack Trace, that will actually print that call stack into your output log, and your log file as well, which is really useful when you're digging into something that's just not working, you don't know why, and you need as much information as possible about what's going on, I tend to drop that Stack Trace in there, especially I think I have used it a lot when doing multiplayer because it is harder to ⁠— When I'm doing multiplayer, it is easy to go back afterward and read through your Logs and so I tried to be really detailed, and that's what I mentioned before, I put Print Strings before something happens, after something happens.

READ  Little Baby Bum | Boing Boing Bounce Bounce | Nursery Rhymes for Babies | Songs for Kids

If it was successful, if it fails, and then adding a Stack Trace there when you are digging into something that is hard will just give you more information about what happened there. Another good tip there in the same vein is to try to, um, not necessarily collapsing, but using functions and macros as much as possible where it makes sense, because when you do hit the Stack Trace in the prints, it is not going to say, Editor, it will give You ⁠— Oh, it was somewhere in this event graph, and it will give you an ID, that I have not figured out how to track it down yet. If you have it in the macro, it broke in the macro or in the function. At least then you can track down where it is happening and you have less of an area of logic to trouble shoot and figure out where things are going wrong. The second one is Watches, if you have ever ⁠— We will bring it over to the Editor, you can show how to enable it.

I see that you have some going on there already. You can watch this value. >>Sam: It will work ⁠— I do not want to run the project, it crashed when it auto saved, I had no idea, I was working on it before we came over here. I was like, I will zip it up really quick. Well, I will zoom out and show you. I made a little AR image detection thing for the Raleigh EDU event in Unreal Academy, we used it to detect pictures of my dogs. I have been wanting to use the location services stuff where you can get the GPS signal from your phone, and you can do stuff with it. Basically, what this Blueprint is doing is down here, I've got some GPS coordinates, and I am figuring out the difference between my current latitude and longitude, versus the spots that are in the parking lot.

If it is greater than, if one is less than the ones in the area, I have a MultiBool and then basically, it will do that, I'm working on ⁠— It doesn't spawn in the right spot, because of my math. I'm using the wrong type of degree in my sine formula, in my math expression right away. >>Victor: Sam rubber ducking right away. >>Sam: Yeah. Then basically we spawned a little Mesh in the World where the thing is, once you get there, you scan the image and then if you do it four times, it says, hey, you win. It is on Event Tick, so it's like, do do do do do, so what I did is I let it go for a second, which prints a bazillion things to the line and then I stopped taking the actuators. Then I basically remove all the widgets, I remove the UI, and I recall the start-up code here, to add the UI again and when I re-add the UI, the UI is set up and re-initiates it itself.

I don't initiate on Event Play, it starts all over again, and the game restarts. This down here is the pin node that he was talking about, this basically ⁠— I Needed to know, and the reason is because I was testing on my phone, and one, the phone cannot be connected to my computer, and even if it it was connected to my computer, there is still no way for me to pull off, like, look at my graph and see exactly what is going on, and I can't. That is just not possible on mobile debugging with UE4. What I had to do is get super clever with my Print String, so on this one, I wanted to make sure that Work 1, its value true or false, it did it for Work 2, 3, 4, I came over here, I'm like, work one is set to true, 2 is set to true, so I can tell throughout my flow, like, did I actually make it to the right place, and did I set the variable that I need to be there? Over here, what I'm doing is basically, this is my Get location, where I'm getting the signal from the GPS, and on the screen, I'm getting the latitude, longitude, and altitude and this horizontal accuracy is just basically my accuracy for how accurate my tracking is.

I'm printing these, and I will figure out over here, over to the Viewport, I did it through a bunch of text. This is easier for me to do than through A UMG Widget. I could have done it through UMG, I have another project that does it through UMG, but I started working and I would get one little part to go, and eventually when I'm done it will go back into UMG. But all of this stuff right here is color coded too. Your horizontal accuracy will go green when it is good or red when it is bad. The hint text will change, green if you haven't found something, or yellow if you are in the area, green if you are ready to take a capture. Your altitude changes color based on how high you are, dark blue if you are at 0 or negative, and white, if it goes too white as you are higher, the clouds are super high, that latitude and longitude does not change anything, and neither does time stamp.

The reason I did that, I wanted to make sure that having this guy right here, the tracking ⁠— The Horizontal accuracy, having all this stuff in red ⁠— The reason I chose red is it is easy to show up in the AR. White and black, black is too dark, and white is too dark sometimes, if that makes sense, because there is light estimate going on. I found that red actually reads the best, red and green read the best for whatever reason for bright environments. I found that making the stats color coded ⁠— I immediately turned it on and I don't have to look at the number. I can tell that, oh, my tracking sucks, let me get out of the building and re-start the app. Okay, my tracking is green, perfect, that it is tracking the way that it needs to be, so that is one thing I don't have to worry about on this run through. As I start to press the buttons and figure out, you know, here ⁠— it says hello, but usually you can see this is my first thing, the Event Begin Play is literally the first thing I have because I want to make sure that I'm actually doing something, because I know that it is working, I haven't disconnected from there.

But here, I'm taking my Longitude, latitude, altitude, figuring out what high default values are doing, I'm printing them out to see what info is going into them. This thing is kind of cool right here. One of the issues with debugging stuff is a lot of times, it is hard to debug on your storage platform, phones or let's say the Oculus Quest, for example, how the hell are you supposed to debug on a mobile platform that is not attached to anything to your computer, right? You can send it over the air. Android code allows us to do that, but it is very slow. How do I debug something when it is on my device versus the PC, or what if I have logic that can only work on one, but I need to build the logic and test it to make sure it actually functions, so how do I do that? We have this nifty little node called Get Platform Name, and actually what I did, I did a little like this. I did a Print String and then I plugged this guy into here, I ran the game, and this actually shows up in your log down here, so I was like, okay, my platform name is Windows, I call it PC for some reason, I put in PC, it is called Windows.

Basically, it is going to get the platform name, it is going to check, does the platform name equal Windows, if It says, we will say we are in Windows. If it doesn't, however, what we're going to do is we're actually going to run the code right here which invokes the AR session, it launches the start AR menu, and then the actual AR debug menu, which none of this stuff will work on PC because it doesn't have the DLLs. It just will not work at all. But, what I'm doing for this, I go to a location, I tap, so what I can actually do is put in a number, press the one key, and then run the logic and see if I'm getting the result that I need, right? Then I press two, see if I get the result that I need. This is how I found out that I had some ⁠— Every time I would go to my second point on my GPS, it would always turn true.

So I went to the third point, and they would both be true until I got to the fourth point, which would never actively activate. It was because I'm not very good at vector math, apparently. It was basically because what I was doing, I was adding their values, so I was checking to see if the current latitude and longitude were greater than where the spot is supposed to be. If you look at it, on a grid like this, then on spots like 2 and 3, they are always the upper right hand corner is always going to be true, because it is always going to be greater than the value that we coming in. What I needed to do was actually compare the two distances and then see if they are greater than a little threshold right here, like I have this, you know, I'm seeing if this return value is greater than .00001, so if it is, then that means yes, and I'm in the right location. Again, trial and error. This right here, you can see this is my testing code, over here.

I will set this into my nodes because my current latitude equals my current latitude, 00, that's what it is when it starts on PC, because there is no GPS on your PC. I will plug this into my first bool right here, I will be able to fire it off, and I will see somewhere down in my Logic that I used to have a print statement right here that would say, setting this variable, and then after this, actually, you see I have it right here, spawned. Because this thing doesn't spawn in the right location in the World, I added spawn right here, because I don't know if it is actually spawning or not. I have seen it two times, depending on where I'm at in the real world, it might not show up, it might be super far away, it is getting cold, so I need the verification it is spawning.

Again, we will spawn right here. Yes, it definitely did spawn something and it also definitely set work one to true, so I know that's working, and then right over here, what it is basically doing, it is printing out this, it set the work to true. I know that I'm at the work spot, I know that it is spawning the object, and I know that It set the variable to true, signifying this area has been reached. I know all of this stuff happened because I printed it to the log, using all the Print String stuff. Asking for this project, it is not ready to go out. It is very, very experimental. It is so experimental that it doesn't actually work on this computer. >>Victor: I wanted to mention, this is all done in 4.22. All the features of GPS location they are using to make this ⁠— >>Sam: It is all ⁠— you need to come here to your edit, I know that this is not what we were talking about, it is called Location Services.

There is an iOS implementation for it, a Blueprint library, and an Android implementation for it as well. The major differences between the two is basically⁠ — On Android, we have Return Horizontal Accuracy, well, on iOS, you have Return Vertical Accuracy, that's the main difference between the two systems. In terms of Blueprint functionality, I'm sure there is some stuff that Apple does behind the scenes. I just don't know about it, because I don't do real hard core Apple development. >>Victor: Few of us game devs do, I think. But thankfully, there are some very smart people that can make sure we make all this. All right, so, someone is bringing up as well, it is more debugging than actual logic, yes, that is true. That is quite common, especially ⁠— >>Sam: There is even more to get me to this point, to figure out ⁠— I was sitting down with Tom Shannon, drawing it out to the light board and figuring it out, and then it dawned on him that he has some experience from the enterprise world about what's going on with GPS.

I have no experience with GPS, What I was doing was right, and it made total sense, but someone who has a little bit more experience in vector math and surface topology, you know, you have to compare the distance between the two points and, you know, I need to get this precise value. No matter how much debugging I did, you know, I was able to explain ⁠— I will take that back. I was only able to explain to him what was going on because I had done all of this debugging, because I knew the exact numbers, I knew exactly how far they were apart from each other, I knew which ones would go true, which the other ones were going true, and being able to give him that much information after we plotted it out, oh, it is doing this. We verified that is exactly what it was doing, we wrote, like, it took me, I have been working on this for pretty much all week and most of last week. It took 10 minutes to build this section, these nodes, and copy and paste the rest of the points, it works flawlessly now.

But I would have never been able to express to him why it was breaking and not working if I hadn't done all of the Print String debugging that I had done to basically get my case and figure out what was going on. >>Victor: That boils down to how, eventually if you come across something that might actually be an Engine bug, and we don't have your use case, right? If, for our engineers who look into it, you have to do your due diligence at that point and provide us with precise steps on how to get to the same problem, or status, of your logic that you have. We need all of that information to be able to get to that, so we can see the same problem and then we can try to figure out what's going on. >>Sam: People are probably going to roast me for saying this, it is very rare you are going to come across a straight Engine bug with as much testing as goes into stuff. I'm not saying that we write bug-free code, there are definitely Engine bugs in there, but there are far fewer than I think people are think about.

I think it is more stuff, there might be something with your logic, the way things are set up, or permissions on your PC, than a bug inside of the code, because it goes through a heavy QA process. Again, that's not to say, hey, there isn't a bug in the code. But if you find a bug in Engine code, the more information you can give means that that bug is going to get solved sooner, you know, because we get bug reports, and there's really weird bug crash that's on Direct X 11, it is like some driver hang crash. It Happens all the time, but it is different for each computer, it is really, really hard to track down exactly what happens because it is different for each computer, each GPU, each set up. But if we had, you know, okay, on this GPU, I do these exact steps, and it happens like this, it will make it a little bit easier for us to track that down stuff and figure out what is causing the issue.

But again, there are Engine bugs in there, I don't think there are as many as ⁠— Most of the time, I automatically see the flag that will come by, Blueprint doesn't compile, there must be an issue with the branch node in the Engine. It is like, well, I understand it is not working in your project, but I have millions of hours of data to back up that the branch node does, in fact, work. This is one thing to be ⁠— If it doesn't work, the more information you provide, the better. >>Victor: If you go through the thorough process of figuring out what is going on, you will save yourself time instead of going back and forth between Engine Support. You might solve it today instead of waiting for a response that, oh, no, it was not an Engine bug, and then you still have to go through all the steps again.

It saves time. To Continue, let's see, I did ⁠— a little note here. Yep, let's head over to Viewport show flags. The best way to do this is in the Editor. >>Sam: I don't have an app here. Let Me see. >>Victor: Should we open the ⁠— >>Sam: We will try this and see if it is going to work. >>Victor: We will open ⁠— it needs a launcher. Then a quick note that I forgot to enter earlier, is it running? Great. >>Sam: Everything is in the same menu, I'm like, I'm just going to close the menu down. >>Victor: I think that's my menu. It is, great. I was doing some testing here as well earlier. All right. We should be fine in here. Stat none, great command, you can pretty much pick Blueprint, yes, so ⁠— yep, that's the one.

All right. If you watched the stream a few weeks ago, you saw me and Tom Shannon working on this, it is a little interesting test project that I'm working on. This shows the Modes. If we go to Lit there, and Optimization Viewmodes, this is where you can see the shaded complexity ⁠— That's what I use the most out of everything, you can see here that everything is really good, it is all opaque materials, there is no translucency whatsoever in the scene. We can go, yeah, Quads is good as well. When there are quads that are overlapping, that will actually, I think, it is an exponential cost ⁠— >>Sam: Your GPU works on a 2.2 granularity, and as triangles get smaller and smaller, your GPU has to basically say it is working in a little square inch by a square inch, you have a bunch of triangles in there, it has to do a bunch of work to fill in those triangles. This is important when you are using the forward renderer, not so much the deferred renderer, but in the forward renderer, basically is going through and iterating on every single pixel, it is not taking all the stuff and putting it together, like layers inside of Photoshop.

The smaller your quads get, especially in far away distant objects, the more computationally more it takes to render that geometry, because it doesn't like to work with really tiny triangles. This is basically when you're looking at the quad view mode, like this, this is not so great. What this signifies is that, on this piece, for the last LOD, I need to make sure that I'm flattening the geometry out and trying to reduce the amount of red. All of these view modes, it is not about being all green, it is about isolating and reducing red whenever possible. >>Victor: Yeah, it is not like an accurate number of how much this costs, it is relative to ⁠— >>Sam: Yeah, because the pixel could cost 10 here, 20 here, and now I move back, it is 30, because all of a sudden I had a VFX that wasn't here before go in front of me, a transparent one, for a split second. This is just a good instead of, you know, hey, I want you to go find the new world, it is, like, hey, I want you to go find the new world and head in this direction. >>Victor: Right.

Then the other one I wanted to point out was the Show Collision flag, which is a great way to debug why can't I walk here, it seems like an invisible wall, and ⁠— >>Sam: I only know how to do this by hitting alt C. >>Victor: It is third from the top. Alt C, another keybind. That will display the Mesh collision by default. >>Sam: Especially when you're new to UE4, one of the things that I see is that people import a bunch of stuff and forget, by default, we don't automatically apply collision. They spawn in, and they cannot spawn, or walk through their door, or they cannot walk through their window, or they are on their mountain, but they are like this high above the mountain or whatever. It is because collision was automatically generated for that. Hitting alt C, or going to the Show tab and showing your collision is super, super useful, because it will then show you why you cannot. I had a UDN from pretty high, a high-end customer, and they were, like, I can't get this to work, we have been trying everything, they went to Blueprints, they are looking at stuff in C++, they couldn't figure it out.

I'm like, okay, give me your project, show me your repo, they were able to do it, and literally the first thing I did is I opened it up, I pressed alt C, grabbed All of the Meshes and disabled their collision, and then I walked them through it and explained to them what they did, why it wasn't working, they felt kind of dumb, but they felt better when I reassured them, this is a mistake that everybody makes when they are first using the Engine. It bites everybody in the butt eventually, but you will never forget it, and it will always be the first thing that you look for when you are trying to debug, oh, let's check out the collision. >>Victor: Yeah, it can be tricky. As Long as I'm not doing sort of visual level design, I tend to leave it on because I might catch something before I am even playing, and I can see that this is going to be a problem, and I can remedy it before we are even there. Let's keep going, we will head over to the next slide.

Mr. Keyboard Operator? This topic of Blueprint automation ⁠— Automation are ways that you can set up test code, so essentially it allows the computer to run through some of the logic you set up without you having to actually play the game, or someone else on the team testing it, and we have support for automation in Blueprints. We are not going to go through it on the stream, once again, there is really good content on it. But I wanted to make sure that we bring it up because this is part of, sort of, the prepared step of how it is debugged, because it can be really simple to accidentally flip a bool, something I do quite frequently and I'm mad at myself at it every time, doing VR development, I have the bool and my Player Controller pass that depicts whether I should spin a flat pawn, which is mouse, keyboard, and controller, or the actual VR pawn. One of the Automation tests that I set up is, when I package, especially for quests, if you can't play mouse and keyboard on quest, I have a Blueprint automation script that makes sure that bool is set to true. Because I will toggle it off while I'm working, and this will actually be the automation tests will run part of your packaging process if you are using the project launcher, and you can enable automation there.

READ  how to change or add primary email adress on facebook 2016- advance tutorial

>>Sam: You can use automation to do tons of stuff. We use it to test Editor functionality behind the scenes, but you can use it to Test, basically you can automate it so that your game can start, they can click in, click on your start button, start the game, play through the entire game and, you know, get a certain number of kills, or collect a certain number of potions, or run a certain number of miles, or do whatever. It is a very powerful system. >>Victor: It saves you so much time. Especially if you have written the core logic in Base Classes, you can have automation tests to make sure that they work and nobody will have to go back, in three months, when you discovered that there was a problem back there, your automation tests would hopefully have caught that so you can remedy it. >>Sam: We do heavy automation tests with the renderer, we have scene boxes and different colors, it spits out an image so you can trace basically ⁠— The Engine makes a compile, and it loads up this scene, captures an image, spits it out so you can compare to make sure that things aren't broken over time.

Because it is very easy for, especially as your project grows and you start to add more and more developers for something little to break somewhere and go unnoticed for a little while, and then all of a sudden, when it does go noticed, it is usually because it is causing big problems. This is good to make sure that you catch stuff early on and get it fixed as soon as possible. >>Victor: I'm grabbing the link here, which I have actually paused it, or the YouTube link is set to straight when Sjoerd is talking about this. The Blueprints In Depth talk, they are part of the guide at the end, you should watch them, everyone should watch them, I tweeted about it. It is one of the best presentations when it comes to Blueprints in Unreal Engine. Like I mentioned, it reduces load on QA testing because it is automatically run, no one has to manually actually play the game when you have set up automation, something that I am definitely starting to dig in a lot more and just doing this.

Because I know that even if it works, just a few simple things, it will save me time. It is totally worth it. We will go to the next slide. Log files. No matter how ⁠— you know, everything runs well when you are working in Editor, or say, like, you didn't clear the log, like I mentioned earlier, and now you want to go back and see what actually happened there. You are going to want to head over to ⁠— >>Sam: I went one folder too low. There we go. >>Victor: Yep, Logs. There it is. Is that from today? Yeah, it is from today. This is the file path if you want to read what happened in Editor. That file path is different, when you packaged a development build for your project, the log file will not exist inside your project files, it will be part of the file path for your game and where the game sits. >>Sam: It will be in a saved folder, but in your game folder.

It will actually be in the similar location, well, it is not ⁠— When you go into it, it is not going to have all of this stuff. It will have saved files, images, and logs, I think. It doesn't have a lot of information in there. >>Victor: I think that was actually my slide. I did add a little last-minute here, I wanted to bring it up, we have mentioned it quite a few times through the stream as well. When you are debugging, things are a little bit different, because reading some of the screen display messages works fine when you are on a flat monitor. >>Sam: Yeah, you have to read it with one eye. >>Victor: One eye, and it is sort of up there. I used to do a macro with 30 enters, and 22 spaces in the first part of the append, and I printed it straight into my eye. >>Sam: It is funny you cannot move it down, you have to ⁠— >>Victor: It was not originally ⁠— There were no serious complications with these.

A better system for that, that I tend to build is a little 3D Widget that that can dynamically add text to it, and I usually have a little scroll bar there as well, and I will set up a macro in the macro library that will not only print the stream, but also if I want to, if I toggle that bool, it will also add a line of text to the Widget. This is a 3D Widget that I attach to the motion controllers, you can have it as part of the VR camera as well, but I like to have it on my hands as well, so I can go and open up the view and have that work. Like, thumb stick down, or if you have the menu button on your hand, you can open it up so your custom output log and you can move that around and change it to your liking, you can be smarter maybe and have separate ones, one is for performance, one is for gameplay, one is for damage, you know, all those things. It is a nice tip of how I tend to deal with that. Then the other thing that I do a lot, because in VR, it is all very visual and sometimes you are working with very small units.

It can be hard to see if they are correct in your logic, if you are printing. I like to use Meshes, arrows, colliders of all kinds. Just so they know, if they are only for debugging, it matters here if you are doing it in the development build or not, but I like to toggle the Editor button as just a little small performance game that you are not actually going to load, you are not going to have collision on these things. What that means is that if you are playing in a build, they don't exist. They are only for Editor, only for Editor logic. I tend, just as a nice little tip there, to not get confused over these things. I always, always name these components Editor_ only. That is to give me a clear representation of why am I not seeing the box in the Build? It is Editor only, good if there are several people working on the same project, someone opens a Class and they see a Mesh there, and they use it for whatever reason and they do the package build, they play It, and it is not there.

>>Sam: They don't know that it is not using the Mesh because it doesn't actually show up. >>Victor: You are not going to go through every single component in an Actor to see which one has been toggled. Code for humans, be clear for other humans and yourself, and it will help you down the line. Then the last part is just a few links to guides. We have the lighting style guide, we have the trouble shooting guide that is absolutely fantastic when you are having problems with shadows and lighting and a few more videos I find extremely useful if you want to go deeper into some of the topics we talked about here today. I will go ahead and put the slide up on the forum post as soon we are done with the stream, I promise, and you will be able to check them out.

There are also, I believe, all of these are actually available on the Unreal Engine YouTube page. That is pretty much everything that I had. >>Sam: [yawning] Excuse me. >>Victor: No, you are good. It is All the comfortable seats. >>Sam: No, I have been sleeping so hard this week. It is hard to get up. >>Victor: We are preparing for a Summer break. >>Sam: Yeah, this is my last day, going to Florida tomorrow, driving down there with a car full of dogs and a wife. >>Victor: Nice. Sounds like fun, I'm sure it will be nice and warm. >>Sam: Just like here, nice and humid. Might as well swim down there. >>Victor: Since we are on the topic, I actually completely bowled over questions, I do want to go through the ones we have received here. I have been too engaged in this today, I have not read any yet. Let's see if I can grab a couple, let's see. "Is there a built-in way to add variables to The Print String node, or is using the format text node The main way?" Is there a built-in way to add variables to the Print String node? I think they mean, is there a built-in way to print what the status of that available is, or the data that it contains.

We will show them the append node, you can pipe in floats, ends, bools. >>Sam: Did I close the ⁠— No, it is up here. I will open up the ⁠— >>Victor: level Blueprint, classic. We will drop a little print. Then our precious append, which we use all the time. Even though, so string, data type string, there are several other types of data that it will know what it is and it will actually print the value of it. Yeah, you can't do that. I do it all the time as well. It will automatically, boom, convert that bool into string. >>Sam: I don't want to do this. I want to be like so. What should happen now when I press play, What is going on? Maybe I need to actually press Play. I don't see my thing going out here. >>Victor: All right, are we printing it, or is the mouse control in the way? It is going to be fun seeing Sam trying to play. Did it execute? Is it in the persistent? Because if it is not in persistent, it might not be loaded. Yeah, it is in persistent, right? Make sure that we are in the right level that we are trying to execute the logic in. >>Sam: I will scroll up here and go to levels again.

>>Victor: It should just be Level Design Test. It should be the one we're in. I'm trying to show one of the easiest little pieces of the logic that we can come across. Oh, okay, so it wasn't a different level. Or is it because we reloaded it and didn't save? >>Sam: Nope. It is because it is starting in four player? >>Victor: Maybe, we can disable that, but that shouldn't cause an issue. It should definitely be in our output log. It is set up completely dynamically in game logic, so you will not be able to toggle it there. Hello, level design test log Blueprint messages ⁠— It is being printed in ⁠— it was right up above. It is working there, we can go ahead and add the append, which you already saw. But to answer the question there, you can use floats, bools, ints, text converts to string, and then as the user there mentioned, you can use format text first when you are working with text data type. But for Print String, you have to convert it into the data type of string, my bool.

There was a question here about VR, we did touch a little bit about that. Let me know if you have more questions about that in the forum post, I love VR, I do a lot of VR development. If you have any questions on that, feel free to type them on the announcement post for the stream, I will answer them if I can. We don't have time to show all the links from the session, unfortunately, but we can briefly mention that we are looking for text there. You usually have to go down a couple steps until the hierarchy. There we go, values false. >>Sam: That's the logic right here, literally, the value is, space, my bool, we see the value as false. Remember, we put a space right there so the false is not butted up against the is, it is just making it a little easier to read. Also how I found this, don't forget that you can come in here and search for stuff in your log, this makes it really easy, If you are like, oh, did I just see a red warning? You are like, I don't know.

>>Victor: There were a couple, the same with error, which I don't think ⁠— >>Sam: I meant to say an error, because the warning is not a problem, but an error. You see a bunch of red text, that means there is an error. But when this thing is printing, it is going like a million miles an hour. It can be hard to find it. Don't forget to filter your log by stuff. >>Victor: We did have a question on the announcement post about multiplayer and tips on debugging multiplayer. We are talking about it a little bit. It is definitely harder, or there's a little bit more preparation there, at least from my experience, I have to prepare my logic a lot more for that. >>Sam: I have never debugged anything multiplayer in Blueprint before. I can't really comment too much on it, because I don't have any experience with it.

>>Victor: As I said, you are mostly testing in development builds, and because of that, you don't have the output log, right, you open up the log file and read it while you are playing. I tend to add as much strings as possible anywhere, anything I want to be aware of, where it happened, what happened, I want to prepare as much as possible so that when I come across something that breaks, and it does, then it is easier for me to go back and read the log and figure out what actually happened there. "Do we have to add a break point to see the watch values we've added, because I can never see them every time?" This is why I mentioned that I'm trying to figure out the watch values section of the Blueprint debugger. I just started digging into that yesterday, because I have seen it used and, yes, I do think you need to put a rate on there to see it, but I swear I have seen someone use that in real-time.

It is not like the blackboard for AI , where you can always see all the values in the Blueprint changing real-time there, but I believe it is supposed to work very similar. >>Sam: Yeah, I would try to get it to work yesterday, but I didn't have time. >>Victor: What you can do is, when you do the right click on the input or output, and you watch it, if it is a flow, like an app from 0 to 1, back and forth, you can see it printed in real-time if you are looking at the Event Graph. >>Sam: Yeah, you can. I think this just makes it easier to see a bunch of variables together, doing their thing, instead of, like, I have to go to this one, and move over here and back down over there. >>Victor: Yep. All right. I think that's it for today's stream, we are almost at an hour and a half now and I definitely want to ⁠— I have a Little announcement to make for our community out there.

We, as we mentioned, Epic is going to summer break. We get two weeks to, in my case, I get to work on some projects and Sam is going to Florida. I don't know what Greg is doing, I hope he is going to have a good time. I am sure that most of us are going to try to have a good time, anyway. For these two weeks, we are announcing a small competition, I guess, is the best way To put it. An event is Tim’s words. To make sure that I get all the details right, we are going to kick off a month long event where we are putting you in the director's chair. We have named this event Cinematic Summer. Is it coming? I thought it would be beautifully timed, I was making a build-up to, like, When is the Cinematic Summer! Okay, so all right. We are doing Cinematic Summer, which is a month long event, where, like I said, we are putting you in the director's chair, and we would like you, if you would like to join, is to create a short cinematic using Sequencer that is no longer than three minutes and tells a story about summer.

Some of the tips that Tim was kind enough to write up for us, maybe you had an adventure hiking through the wildlife, or spent the summer at a cabin in the mountains and you would like to externalize that and maybe ⁠— They could be interactive if you want to, I'm mentioning that because that's where I want to go when I build the scene. But this is cinematic, a nice cinematic piece, and it can be something about summer, or you can pull that from your creative mind. We would love to see it. We want to have an incentive for you to do this. We are raffling out three Unreal Engine branded DXRacer chairs to anyone who participates and submits one. It is similar to our sweepstakes we do in the Game Jams, anyone who participates and sends us a submission will be part of the sweepstakes. There is no limit to your team size, this is a very free and open creative event we would like to participate in and advance your skills when it comes to using Sequencer, I should definitely do that. I would like to get my mind around Sequencer a little bit better. Yeah, and so I think we will be kicking off a few tweets and there's a submission form at some point.

I actually don't have a date for when this starts, but I believe that it will start… Right now is when it starts, actually. Today is when it starts. I should have had it in my notes, like, today is the Cinematic Summer! It is a month long event, from today, excited to see what you all come up with, it is great to see everything that comes through when it comes to Game Jam, now we are doing something different. We are out for two weeks, there will unfortunately not be any livestreams during these two weeks, but feel free to hit me up on Discord if you want to chat or have any questions or problems. I'm sure that some people will be monitoring elsewhere as well. We are all going to take a nice summer break and then we're going to come back. I have streams for the three weeks after the break. Quixel is coming, and We have Dillon from Quixel is coming to the studio, sitting in that seat right there, talking about Rebirth. We're also going to have SideFX and the Houdini team coming on to talk a little bit about their work. We're actually go to have Wes on, who is going to come on and talk about artificial intelligence and some of the work that he has been doing recently.

>>Sam: He did all the AI for action RPG. >>Victor: I believe that was the start of some of the stuff he is working on. >>Sam: Yes, they were overhauling it, the AI docs. That has needed some desperate overhaul. >>Victor: That's great. He is going to be our guy for that. He will come on here and talk about that. As always, make sure you fill out the survey that Amanda was kind enough to leave in the chat. Let us know about today's stream, any topics you would like to see going forward, I try to read them and pick. I did want to mention, on C++ debugging, I definitely want to get an engineer here so that we can go through that a little bit more in depth, and then I'm hoping that we can add some AI about Visual Studio, how to work with it, and possibly even ⁠— You know, there are other tools when it comes to more performance and such. There are other tools that you can use to track down much lower level problems that, if you're a rendering engineer or such, or if you have a friend who is a rendering engineer, you can send a log to him.

Some of this stuff, I would love to go over in the future, hopefully we will get there this year. Make sure you are visiting Meetups if there are any in your city, next week we have the Unreal Engine Meetup here in Raleigh. If you are around, please come hang out with us, bring your project and show us all the cool stuff you are working on. I will show a quest demo I have been working on. As always, our online community exists out there for you so you can talk to other developers, help each other solve problems, figure out what is going well, not so well, or generally talk about Unreal and development. Because there's so much that you learn, that's why I used to enjoy listening to the livestreams, having them in my car when I was driving to work, getting the discussion going and your brain to start thinking about everything Unreal, because there's a lot ⁠— So much to it, more than I think any single person can actually retain and remember. I don't know, you have more experience than I do in terms of working. I saw, like, all your sample projects that you built throughout the years, that is quite an impressive list there.

>>Sam: Yeah, there's a lot. >>Victor: If you are streaming on Twitch, add the Unreal Engine category so we can tune in and say hi. Follow us on social media, and a big special thanks to all of you and the sponsors that make all of this happen, especially to DXRacer, since Cinematic Summer is happening and maybe you are one of the lucky ones to get one of those. With that, I will see you all in three weeks. That's how long it is going to be. I hope you all have a good summer, and Definitely thanks for joining, see you. Bye! ♫ Unreal logo music ♫.