Saving & Loading
This was the one of the most difficult things I've had to make for the game because of having to Serialize the data and save it to a file. Luckily Unity has a built in Binary Formatter which will serialize most things for me, but the problem is that it can't serialize things such as Vectors or AudioClips. This meant I got errors when it tried saving Items (because they contain attack sounds). To fix it I had to move all the Audio to the Resources folder and load the sound using a string with the sound effect's directory (e.g. "Audio/SFX/In Game/Fireball").
One thing which I'd like to improve with this is not having to go into the code whenever there's a new thing which needs to save. At the moment I have it so it saves each variable which can be changed, and loads it, but if I add something new (for example, Player Health) I'll have to go into the data class and add new variables for the health, then go into the Saving & Loading and make it so it applies the health when saving/loading.
At the start of the week I found out about this fake 3D technique, where you have a bunch of layers of sprites which are rendered slightly above each other, and can give the illusion of being a 3D model. I thought this was really interesting and the result looked amazing, it's quite simple but there's just something which looks unique about it which caught my interest.
The fact that it's still technically 2D would make it easy to convert a top-down 2D to this '3D' effect too. We probably wouldn't have time to convert Secret of Malarith to this style before the deadline, but I asked Tom and Mitch if they liked it and we decided we might make the game like this style after the deadline.
Damage & Death
This week I made it so the player can die, which makes the game feel a lot more finished even though it's just something simple. Tom did the animation for it where the player falls to his knees then to his side, he also added some blood so it feels a bit more graphic. At the moment the game just loads the previous save when you respawn, I also added an autosave every 5 minutes so you don't lose too much progress if you die. In the future I might change this so you autosave at certain points such as when going into a new zone or dungeon, which should fix the possibility of getting stuck in certain places where you have low health and are surrounded by enemies.
Another thing I added was more feedback when you take damage. When you took damage before, the only way you knew is if you checked the health bar which didn't work well. Now it makes a damage sound which Mitch recorded a few weeks ago and it also flashes white a few times. I added this to the enemies too for more feedback. I really like the result.
This week I worked more on the NPC generator. Before we only had the female sprites for it but now I've made it so it randomly picks a gender as well as all the colours on the character. For this Tom had to create the Male version of the sprites, which are then picked depending on what gender is set.
I also made a huge list of random quotes that NPC's can say. These will be just for the NPC's that make the world feel more full, not for the meaningful ones or the NPC's which give quests. I took reference from a lot of medieval games and tried to think of as many as I could on the spot, it was actually harder than I thought to keep it varied and try and keep it sort of Medieval/Fantasy style.
I've done some more on the game world this week as well. Firstly, I did some small details, such as tree's spread around the fields between the starting area and the first village. I also added some more buildings to the village and started on a kind of mountain area. The reason it takes so long is because each tile has to be placed by hand, I don't know of any way to quickly produce the cliff edges so it's really slow.
Another part of the map I did this week is the 2nd dungeon. It was a lot easier making this underground style dungeon that it was creating the dungeon in the trees, as there was a lot less that needed cleaning up and going over. I think it looks really good too, it has quite a dark, closed feel to it which I like a lot.
I haven't yet added the rooms, because there are no enemies yet to put in the rooms so it's a bit pointless for now. This dungeon is also based off the 2nd dungeon design which I did while I was at work.
Main Menu & Multiple Savegames
Lastly, I started on the main menu and added a system for multiple savegames. The main menu has a long way to go aesthetically, but the main functionality of it is pretty much finished. If you click New Game, it'll create a new save and ask for your player name (which is also the name of the savegame), or if you click Load Game, it'll give you a list of your already existing savegames for you to pick from. The main problem with this was trying to load the game in the main scene, from the main menu. To get around this I made the MainMenuManager object not automatically destroy when loaded into a new scene, then when it is loaded into scene it triggers the LoadGame() function from the SaveGameManager and then destroys itself. There might be a better way of doing this but I couldn't think of any, and this works just fine it just feels a bit 'hacky'.
This week I wanted to get all of the items into the game so I don't have to worry about it in the future. Firstly, I planned all the items I'd need on paper, then input all of the items into the database with all of their values (damage, price, etc). Then I made the placeholders for the rest of the items so Tom could work on the boss and other harder sprites, he's going to go back over what I've done if he gets time when we've finished the rest of the enemies/bosses. After that I had to put all of the sprites into icons for when you equip then and make all of the weapon prefabs that are instantiated when you attack.
Tom finished the menu art this week, which meant I could get it in the game and have it slowly parallax. We had the parallaxing setup before, I just needed to split up the layers and set the parallax values on the scripts. You can see how it works in the video below.
Me and Mitch recorded a few sounds this week, we wanted a sound for the campfires in the game, so we got some wood and made a fire in a pot. We had a few problems because it started to rain, and the ash from the cardboard we put in there kept making it go out, but we managed to get around it all with an umberella and a metal pole to move the wood to the top of the pile.
The original idea of the game was to make something similar to a Zelda game. All 3 of us were interested in Breath of the Wild at the time and the way that it gives you so much freedom really interested us. We wanted to do something similar, but it had to be 2D, and we noticed a lot of people doing sidescrolling games so we decided to make it top-down to be a bit different. And so we could make it more like the older Zelda games, we also decided to limit the colours to 32 colours, this was to make the game feel more retro, but looking back, we've all decided this wasn't the best idea. The game probably would've looked a lot better if we had just used as many colours as we'd liked, but now we know and it's something to keep in mind for next time. We also didn't want it to be exactly the same as Zelda, so we decided on a medieval theme similar to Skyrim, we did this so it wasn't a Zelda clone, we just wanted specific elements from the games.