Lorne - Devlog 08


During the last week and a half I set up the inventory system and hooked up the UI so that menus and stuff worked. Yvie had created lots of nice UI art so everything was in place and I just needed to finish it off.

The inventory was a bit tricky to integrate with the other systems, in particular the puzzle connection system. I set up the inventory so that it would delete the object that the player was currently holding and then create a reference to it in the inventory, then when the player took it out of their inventory it would spawn a new object. This caused problems with the puzzle connection system because it didn’t have a way for it to account for puzzle pieces being deleted. When a level is loaded the puzzle system finds all the puzzle pieces and adds them to a list. Then when the player interacts with a puzzle piece it tells the puzzle system to check all puzzle pieces in the list and reevaluate whether or not they are being connected to. The inventory disturbed this system by removing puzzle pieces from this list without updating the list. So that when the puzzle system checked over everything in the list and came to one of the deleted puzzle pieces it would create a null reference error. Once it hit this null reference it would stop so that the rest of the puzzle pieces in the list wouldn’t get their connection status evaluated.

I fixed the null reference error in the puzzle system by telling it to continue if one of the items returned null. This improved things but there were still issues. I’m not really sure what these issues were but it seems like I have fixed them although I’m sure I’ve done it in a much more heavy handed way than I needed to but I wasn’t even sure what was going on and couldn’t get to the bottom of the problem. Both the inventory and puzzle systems seem to be working in a robust enough way but I can’t say for certain that they are completely solid.

Get Servant to the Serpent

Leave a comment

Log in with itch.io to leave a comment.