DevLog: Squad Selection Crashes - Violet Weathersby


My fight with Unreal Engine’s designer tools for the User Widget continued this week with the creation of a main menu, addition of functionality to the HUD, and creation of our game’s squad selection screen. There was a fair amount of problem-solving and debugging for all of it, but the squad selection screen is where I started running into real problems.


What was supposed to happen is the WBP_SquadSelectionScreen has an array of the three hero classes and three WBP_SquadOptionBoxes. When the screen is created it passes one class to each option box, which then displays the information for that class. We could have also hard coded the information in for each class, but this way will make it easier to add more options in the future. (Ideally the screen wouldn’t have a hard coded number of option boxes too, but I wasn’t able to get that working this week.) The box is also assigned an index number that is used to tell the screen which hero to add to the party when one of the + buttons are hit. 

What actually happened was the program crashed.

So, what was causing the bug? The fact that I was rushing. In an attempt to get a finished product to the rest of the team faster I didn’t bother adding checks in the code to prevent things like null pointers and invalid indexes. 

(Code that caused a crash is an invalid int was passed in)

(Check that would have avoided that crash)

The process of implementing the squad selection screen makes a good cautionary tale, with the moral being that rushing your work will take just as long as being diligent and result in a worse finished product. If I had taken the time to add more checks in the code to avoid crashes and make sure that everything had its correct value instead of hitting play and hoping for the best, it would have saved me time in the end. I don’t have a lot of experience with working in a team and the stress of meeting a deadline is a little different when there are other people counting on me. I strive to avoid ever making the same mistake twice though.

Get Return to Divinity

Leave a comment

Log in with itch.io to leave a comment.