After spending 3 evenings trying to fix my camera management, I was a little disappointed to discover that my camera positioning rules still conflict, causing inelegant jumps in places.
Guess i’ll just have to simplify a little for now. I need to get my fighting system working. Nothing really complex yet. Here’s where I stand:
- I introduced per frame character bounds for collision detection. OK, say we have a character jumping forward or extending a kick. The character’s location vector doesn’t change. What changes is how the character occupies space. With per frame character bounds, we’re not getting really specific, but we avoid unacceptable approximations.
- I arrange the PC to orient themselves towards a potential target (and disable hitting when there’s no NPC around). I’m doing this because we’re projecting space on a 2D screen and using an on-screen joypad. I feel it would be difficult for most players to aim at a target efficiently, and it’s not quite the point of my game.
Meanwhile, this stuff doesn’t really resolve how fighting should work in my game… let’s take a few examples to clarify.
RPG style fighting
There are many slightly different ways RPGs resolve fighting. I’ll be ignoring turn based games as this is a bit far off for me. Here’s an idealization of how this works:
- PC can engage combat or escape.
- When fighting, PC cannot avoid hits (NPC can miss, but that’s related to stats)
- NPC cannot avoid hits
- Timing is not important.
- PC can use potions during combat
- Minimally, PC needs to engage combat. In some games you can die because NPCs engage you, but you don’t engage them. In realtime fighting RPGs, the player must push a button for every hit.
- Typically, PC wins because their stats are better.
- PC needs to rest after fighting in order to recover health points. This is somewhat of a late addition, but it’s getting quite popular. Depending on the game, HPs are slowly increasing all the time, or potions only can restore HP, or the PC needs to be still, or the PC needs to sleep at an inn.
In RPG style fighting, the intensity of the fight is linked with three parameters:
- Experience. Two well matched opponents makes for a more ‘interesting’ match.
- Exhaustion. Even minor NPCs can outmatch a bold PC that went too quick, too far. In other words if an area has many NPCs, the PC doesn’t have time to recover and fighting becomes more risky.
- Chance. Most RPGs include an element of chance (esp. critical hits) making fighting more interesting, because even a lower level PC or NPC can get lucky and win an otherwise losing match.
Action style fighting (no shooting)
My understanding of that is even fuzzier; roughly speaking, there seems to be three dimensions to consider:
- Reflexes. The fastest opponent tends to win the fight. Games that rely more on this also rely on the player getting faster over time, as they get more used to the controls. This dimension is likely biased towards the player in many games, because the PC is faster to execute moves than NPCs
- Range. Often the player’s range is wider than NPCs. This allows a careful player to neutralize opponents before they are in range.
- Moves. In fighting games, the outcome of a contest seems to be determined on a case basis, depending on moves executed simultaneously/near simultaneously by both opponents. Example: A does a high kick, B does a low kick => B wins. A does a high kick, B does a punch => B loses.
What’s ‘light action’ like?
This is what I want to try in a first approximation:
- If the PC doesn’t have a weapon good enough, the weapon is, strictly, ineffective.
- If the PC is hitting the NPC, only the NPC loses points (and, likely, dies in one stroke)
- If the NPC is hitting the PC, but the PC isn’t hitting them, the PC loses a point.
- The PC has 3 points.
- The PC can recover their points after a cooling period.
To be continued?