Gamedev blog 8: Information and interactivity

in #gamedev6 years ago

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.

Let there be light

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

Sort:  

Workmanlike post. But at the end of the day, most of creation, of anything, isn't as sexy as movies and television would have us believe. Creation is mostly made of all the boring stuff that they cut out.

I must commend you on your self control after upgrading, and remembering what matters, rather than being drawn to the lure of shiny that does not. I probably would've succumbed, if I'm being frank.

I wonder about setting the enemies as buttons, would you then get the options for interacting with them after you click on them? I assume so, unless there is only one possible action per object, in which case I'd also add what the action would be if you choose to click on said object.

As for the log, I can't stop remembering my days of playing Warcraft 2. I'd get stuck on a map, leave the game for 2 days, then I'd return to it and the map would just end up solved almost immediately... and no, nobody else in the house played the game to help me, heh.

I do appreciate the log, I said this before, but like a good index, its worth, though overlooked, is invaluable.

I'm currently looking at the most basic usability. Instead of clicking a button that says "attack" and then clicking the enemy you want to attack, you simply click the enemy.

In the future I can see it more like: troll : attack | dodge | cast magic missile

Though that depends on the amount of available actions. At a certain point that is no longer practical.

What do you mean by index?

What do you mean by index?

Sorry, meant to say RPG book index. You only notice a good index when it's not there and you're trying to look up a certain rule.

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.032
BTC 57768.72
ETH 2943.36
USDT 1.00
SBD 3.66