wight-airmash / ab-server

2d multiplayer action game server for Node.js based on WebSocket communication.
https://airmash.online
MIT License
54 stars 21 forks source link

Discourage running by slowing down backwards speed #37

Closed spatiebot closed 4 years ago

spatiebot commented 4 years ago

I made a change to discourage running: slow down the player if flying backwards (as if he has inferno).

But, that requires all frontends to be updated too.

Your thoughts about the following?

The change is based on this issue. The patch is simple, and is very similar on the frontend.

---
 src/server/modes/base/maintenance/players/update.ts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/server/modes/base/maintenance/players/update.ts b/src/server/modes/base/maintenance/players/update.ts
index dd6023a..fd8f693 100644
--- a/src/server/modes/base/maintenance/players/update.ts
+++ b/src/server/modes/base/maintenance/players/update.ts
@@ -495,7 +495,12 @@ export default class GamePlayersUpdate extends System {
         let maxVelocity =
           SHIP_SPECS.maxSpeed * boostFactor * UPGRADES_SPECS.SPEED.factor[player.upgrades.speed];

-        if (player.inferno.current) {
+        /**
+         * slow player down
+         * 1) in case of inferno
+         * 2) and in case he is flying backwards, to discourage players from constantly running
+         */
+        if (player.inferno.current || player.keystate.DOWN) {
           maxVelocity *= SHIP_SPECS.infernoFactor;
         }

-- 
wight-airmash commented 4 years ago

Airmash-refugees version is good enough, at least I used it in addition to StarMash to understand how the game works. The frontend already has something like a version comparison mechanism. Also the client login packet contains the version and the server can respond with an error in case of version mismatch.

As for the offer to slow down the speed:

  1. This is definitely not the case with CTF.
  2. This affects absolutely all players, not just those who use the disadvantages of mechanics.

Such serious changes in mechanics should at least be supported by reliable statistics. First of all, it would be good to write an effective collector of player behavior and conduct statistical analysis.

And the problem isn't that someone's always moving backwards. The main disadvantage of mechanics is that the player can easily avoid a dangerous fight for him/her. That's what gives an uncompetitive advantage. He/she took damage, ran away and regained the health safely. If we limit the speed of the backward flight speed, so no one prevents them from flying forward, the effect will be the same.

Right now the problem can be solved manually: abuse of mechanics + intentionally spoiling other players' game or trolling (haha, hehe, etc.) = ban. Plus we can add the rights of trusted moderators. In my memory, we have only a couple of inadequacies. I don't think it's a big loss for the community.

congratulatio commented 4 years ago

we should appoint one frontend repository as the canonical frontend. We could take the one from airmash-refugees, but, @wight-airmash, you may have a better one somewhere lying around?

airmash.online is currently using the frontend code at congratulation/ao-frontend.

I could integrate the changes from airmash-refugees/airmash-frontend to make it easier to hack on if that helps?

spatiebot commented 4 years ago

OK, @wight-airmash, I think you're right - this is way over the top and will cause too much collateral damage. I'll close this issue, refer to the other thread for the discussion. @congratulatio I'll open an issue on the refugees repository about the frontend.

edit: https://github.com/airmash-refugees/airmash-frontend/issues/4