Gamdev blog 7: Pointlessness

in #gamedev7 years ago (edited)

In game, you want all actions a player can take to be meaningful. More than that, you really want them to be interesting.

A dance for the ages

When I was playing around with the current version, that looks like this:

I noticed how pointless it is to move out of a room when you're in a room with an enemy. You step out, and they immediately follow you. This happens because of a 1 to 1 ratio between player and enemy turns. It isn't of immediate concern, since it is not a fundamental design of the game. Still, it was interesting enough of a design problem to warrant some thinking. even better, thinking about it early on, when there is barely any game yet, allows me to see the problem more abstractly, and come up with various solutions.

Something borrowed

One of the inspiration for my design is Arkham Horror: LCG. In Arkham, a player's turn consists of 3 actions, and as such, there is meaning to leaving a room. When you leave a room, the enemy doesn't immediately follow (if it follows at all, some enemies stay put and some move) and you can get further away.
So that's one option, change the ratio of actions between the player and the enemies. This is actually already implemented in the core roguelike code, and is simply a matter of changing the speed of the actors. Because it's a video game and not a board game, I have much more freedom on the ratio. I can have the player have 2 actions for every 1 enemy action, or I can go as crazy and have the player have 13 actions for every 9 actions the enemy has. Not sure why I would do that, but I can.

Outside the box

Suppose we didn't want to have separate number of actions for different actors, what else could we do?
One idea I came up with, is for an enemy to decide what it's going to do next, immediately after completing it's previous action. So I am in room A, enemy is in room B. Enemy moves to room A, and since I am in that room, it immediately decides it's next action is going to be an attack. I move to room B on my turn. Enemy takes their turn, and attacks, but since I'm not there, the attack fizzles, and it just stands there bewildered.

This is a far more interesting approach, provided there is more than one enemy, otherwise I can just run off forever leaving them one room behind me, even if I get cornered.
This does pose some other problems, like if we're 2 rooms apart, and they move from room C to room B, and immediately decide to move to room A next, cause I'm in it. I move to room B, and then they run away from me to room A? that doesn't make sense. It could be limited to just attacks, but then the system starts getting a little complicated, and we really want to keep the core simple.

Attack of opportunity

It's fairly common for games like this to allow an enemy an attack of opportunity on the player if the player tries to run away. Suppose an enemy walks into my room, and I want to run away. I step out of the room, and now the enemy tries to attack me. This attack would take up their next turn.
Now I have a meaningful choice. I can stand in the room and attack them, then they will attack me. We have each spent 1 action, and we both attacked the other. It is now my turn, and we are both in the same room.
Or I could spend my action to move out of the room, triggering an attack of opportunity that takes up their turn. The result is only the enemy attacked me, but we are no longer in the same room. It is my turn, and I can choose to put some distance between us. This cost me with suffering an attack and not giving any back.

Later in the design process I could decide to have attacks of opportunity deal less damage, only take half an enemy's turn, or many other options, but for now, and it's core simplicity, we have a nice system that works and makes stuff meaningful and interesting.

How about you?

Do you have any solutions to this design problem? Can you come up with a simple system that allows a player meaningful and interesting choices? hit me up in the comments, I'd love to hear them.

Thanks for reading!

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

Sort:  

I guess it gets more interesting when there are actions more interesting than just move and attack. For example, discovering a monster behind a door can make me freeze in shock. Alternatively, the monster can be scared away if surprised.

Sure. Once we add cards and special abilities, it will allow more interesting interactions. But at it's core, the system should work well.

I think I'd have made some of the options from the last segment clear at the start. For instance, for the player, both attacking and moving are actions. I was under the impression that you move, and attack happens automatically on what is in the same space. So then if you could just move out of the space with the enemy, you're not losing anything?

(I also thought that when you enter a room, one side ends up dead, before you can move away, or something. Not sure why.)

I think the cleanest way to avoid the nonsense with "They move to room 1 from 2, I move from room 2 to 1, and we both miss one another!" is that often in such games first one side acts, then the other. If at the end of any side's action they are in the same spot, combat happens automatically. But if you don't want combat to happen automatically, there are two options here, depending on how much bigger you want the decision-tree to go. The first is automatic "attack of opportunity," and here the player might be the one landing them if the monster acts later. But that brings us back to the nonsense from before, so it can happen in one direction, if the monster moves first.

So what is the other option, and which is likely the monster's choice either way? The moment someone moves into another's space, the game "pauses." And now all sides get to pick a new action for their next one. I think this would work.

As for the player, there should be a decision for them to not keep running from monsters, but also a reason to do so that makes the choice of when to fight meaningful. Perhaps you can gather monsters together? Perhaps you can deal more total damage in such a scenario, or you get more rewards from say, a group 4 intensity fight than 4 intensity 1 fight? As you said, the decisions here should matter.

The game is completely turn based and no simultaneous. The "we miss each other" event can only happen if I decide that enemies decide their next move immediately after completing their previous one, thus deciding what to do based on an outdated board state.

The way the system works is every actor replenishes 1 energy every time the game loops over all the actors. When an actor has sufficient energy to make an action they want to do, they act, and lose the energy.

Currently, the cost of a move or an action (attack) is both 1, so every loop through all actors, every actor gets 1 energy and acts. I can change it, so the cost of different actions varies, both for enemies and for the player. In case of the player, they can choose whether to rest for more energy (up to a cap) or perform an action. In case of enemies, it's a bit trickier since the AI needs to accommodate the variance. Currently the AI is: If player is in the same room, attack, otherwise, get closer to the player.

nice article. Shared ✅

Stronger ememies could have more turns or possibly initiative unless turns are simultaneous. Also, an enemy can run, fast, if it has a prize or some complex mission.

Do you have any solutions to this design problem? Can you come up with a simple system that allows a player meaningful and interesting choices?

Don't have time to think up another solution, but the one you did is brilliant.I'll take this as advice to think up meanigful game mechanics when I retrun to gamedev.

Upvoted~

The title (Pointlessness) inspired me to think up a story.

Followed, so I may get to read it :)

nice post. i'm enjoying your devblog :)

Note to self: present this problem to @walky123

Coin Marketplace

STEEM 0.15
TRX 0.12
JST 0.026
BTC 56787.81
ETH 2507.96
USDT 1.00
SBD 2.24