rhymu8354 / OmniaRegna

This holds public information about OmniaRegna (https://omniaregna.com/), an online RPG. Issues for the game may be reported here or in the game itself.
8 stars 1 forks source link

Don't require direction input in certain context #287

Open rhymu8354 opened 4 years ago

rhymu8354 commented 4 years ago

This is somewhat related to issue #154 .

[14:04] domsson: Would it be possible to implement a feature where, when you stand next to only one enemy or NPC, actions (talk, attack) don't need the additional direction input, but target that NPC/enemy automatically?

domsson commented 4 years ago

After some consideration:

If the direction input is sometimes required, but sometimes isn't, this would probably be quite confusing and potentially outweigh the benefits of convenience. I can see two solutions:

  1. Avoid direction input in general
  2. Always require the same amount of button presses

Regarding 1: Keep track of the player's current heading. If my last movement was to the left, I'm heading left. If I now have an enemy to my left and right and I hit Q, it should attack the one on the left. Once that enemy is defeated and I hit Q again, my player would automatically scan the other directions for potential targets and change heading accordingly (in other words, the player would automatically turn right, then attack). Later on, the player sprite could indicate the current direction.

Regarding 2: If I have an NPC to my left and right, I need to hit Q plus a direction key (2 key presses), for example Q to attack the NPC on my left. If there is only one NPC, I don't need to specify the direction (as it is obvious from context), but for input consistency, I have to press the attack button twice: QQ.