Prototype version 0.3; saving system


Hello folks and welcome to the third update of the Adventures of Zoldan project.

This update took a bit longer because of the Holiday season but I'm back on track now. In this update I've added a saving system, some UI elements like a health bar, enemies damaging the player and some exploding barrels because that was just to much fun not to add.  ;)

First I started with the enemies being able to cause damage to the player. Implementing this in code was one thing but it's also very useful to have the player health represented on screen. While I was at it, I also created a text representation for credits that can be earned to buy stuff later on. The challenge here is to create a unified look for all UI elements. At this stage, the player doesn't die yet, so you can run around with 0 health left for now. 

And here is a demo of what happens when the player touches the slime enemies:

The biggest implementation of this update was the saving system. I learned from a tutorial how to set this up and after some tweaking it works perfectly. I can now create save-able entities for all elements that need saving. The destructible terrain and enemies was the most difficult because until this part I destroyed the game elements to remove them from the level without any other element knowing it. I fixed this for now by setting a "IsDestroyed" flag that can be saved so when the level is reloaded, the previously destroyed elements can be disabled. In the future I setup something more clever like a managing system that keeps track of elements to disable/enable. But for now the current system will do. 

Demonstration of the health and terrain being saved upon exit and reentering the level:

Finally, after programming the saving system I wanted to create something fun so I've added exploding barrels to the levels. So that next to the grey boxes, the barrels can now also be destroyed. Elements like this make the game come more alive so I keep adding them. I'm no expert at unity's particle system but I think it looks decent enough. In a future update, I would like this explosion to do damage to people and enemies standing to close. 

For the next update, I will implement the player dying and start working on an inventory system. 

Thanks for reading!

Files

Zoldan_0_3.zip Play in browser
Jan 23, 2024

Leave a comment

Log in with itch.io to leave a comment.