Dev Log: A Big Accomplishment (for me)


Afternoon ya'll. For this week's dev log, I want to talk about some of my accomplishments for this week.

I'll first talk about what we were missing for this week, then I will talk about the solution I worked on.  We already have a system that allows for different levels to be implemented, but one thing we needed was a way to actually SAVE that progress, so that if the player decides to exit the game during any night, they can return to, instead of just restarting the game over again (literally just a save state).  On top of that, the playable character had the same material for the past two months, and something planned was having a character customization in the game. Finally, we were missing one final implementation for the energy system that implementation, and quick.

Lets start with what I am most proud of writing: the character customization. This system was one of those that I personally thought would be simple, but it proved somewhat challenging.  My first thought was placing the player character in the world without possessing it, but doing so would bring up the player HUD, and thus potentially causing a nullptr crash. A workaround I found that worked well was creating a separate pawn, and customize the material instance of that pawn. I hit a wall when I could not figure out how to take that material instance and give it to the player. Thankfully, it wasn't too long before I see a video thumbnail that mentioned game instance. Seeing that lit a lightbulb in my head, and after 10 minutes, I was able to successfully move the mesh between levels.

Now we needed to give the continue button functionality. That involves having to create a save state every time the player starts a new game, and identifying if there is a save sate for the player to continue playing from. Thankfully, Unreal Engine already has a class made for developers to write down any variables that need to be stored to be used later. As of now, it only stores the material the player chooses at the start of a new game and the level index in just one slot. This means that if the player stars a new game, the save will be overwritten, similar to how Pokémon does their save files. This may change in the future, but for now it will remain with this system.

Finally, and this is a minor yet important update, the  sentry now uses the energy collected by the player. At the moment, it is pretty bare, but further improvements will be done in the coming weeks to create a fun system the player can enjoy using.

Get Lustrat Somnia

Leave a comment

Log in with itch.io to leave a comment.