Next on my list was adding shadowed rooms, so the rooms you can move into pop more. I googled masking and found out that feature is only available in unity 2017, while I was still running 5.5. I decided to go ahead and upgrade. Right after upgrading, I right clicked the hierarchy to add a sprite mask to see how it worked, and discovered there is also a tilemap object!
I started reading about how to use it, but then decided to set that aside for a bit. I'll do the next task on the list, which is showing the contents of the room, and get back to tiles and shadows a bit later. I want to focus on getting the prototype working rather than unnecessary visuals.
There were two things I wanted to really get done. The first, is a rolling log. It's not such an important feature for gameplay, but it can be quite helpful for development. I could post everything to unity's console, but this way the information is more readily accessible, and also I can separate bugs from just stuff that happens.
The second thing is I need to show the room contents. Right now the map simply shows the threat of the enemies in the room. When the player is in a room with enemies, the player needs more information, and a way to interact with them.
My initial thought was to have a text box simple describe everything in the room, with buttons for actions. But then I realized that you generally want to take actions on stuff in the room, so each thing in the room can be a button.
The rolling log gave me a lot of trouble. So much trouble, in fact, that yesterday I got nauseous trying to get the thing to work. After setting it aside for a day, I realized I needed to have the text align to the bottom, and the content panel of the scrollview grow upwards.
The room content was nice and easy. I don't even have to manually calculate where to place each button, as Unity's Vertical layout group does the job for me.
Next up, I'm going to have to assign actions to the stuff in the room. Clicking the player will take the rest action. Clicking an enemy will attack them.
If you've missed my previous posts, here they are:
Gamedev blog 1: Brewing an idea
Gamedev blog 2: Birthing pains
Gamedev blog 3: It’s checklist time
Gamedev blog 4: The world
Gamedev blog 5: Mockup
Gamedev blog 6: Threat indicators
Gamedev blog 7: Pointlessness