Stage 2 · Lesson 8 of 8
Debugging games
Game bugs are often visual or about timing, so debug by seeing what happens. Print values to the console. Pause the game on , lines in your code editor where the program stops so you can inspect values.
Draw debug lines, shapes and text in the game view, such as rays, , paths and velocities. Engines help here. has Debug.Log and Debug.DrawRay, has print and a visible collision shapes option, and Unreal has UE_LOG and DrawDebugLine.
Learn to attach the and step through a frame one line at a time. Always make a bug happen reliably before you try to fix it.
Common trapleaving hundreds of log lines printing every frame, which slows the game and buries the one message you need.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CourseFreeUnreal Engine Learning (Epic Developer Community)
Epic Games
Epic's free courses: Your First Hour and Your First Game teach the editor and Blueprints
- CourseFreeLearnCpp.com
LearnCpp.com · Beginner
Free, thorough modern C++, so Unreal C++ is only new macros, not a new language
Practise
Keep handy
Also worth your time
How Unreal C++ differs from standard C++ and how it fits with Blueprints
- Game Programming PatternsGo deeper
Free book on the state, observer, component and other patterns games rely on