1
\$\begingroup\$

I was thinking about making a real-time (not tour-like) PvP game where both players among other attributes would have 'speed' attribute that would define their movement and attack speed.

But because the speed can be very fast (for example 50 attacks within one second), too high speed would make it difficult for players to fully utilize it (as they would have very hard time reacting on time on the events in the fight and instead of definite advantage the would struggle with controlling their characters).

Therefore the best solution would be changing time flow speed between players - so for faster players the in-game time would flow slower comparing to players with slower speed.

Ideally I would like to make it like the player with higher speed sees themselves in normal speed and their opponent seems slowed down while players with slower speed would see themselves in normal speed while their opponent seems abnormally fast.

And here I encounter the problem.

While implementing such mechanics in single player games (player vs AI) wouldn't be difficult, I can't find the way to do that for PvP. The time flow for both players in their real life is obviously the same which kinda leads to paradoxes if we assume different time flow in in-game world.

One way could be making the player with slower speed perceiving the slow motion effect while the opponent moves normally - but it won't be realistic (especially if there are more than 2 players - because then only fastest player moves normally and all other players on ENTIRE battlefield experience being more or less slowed down just because there is one fast guy - feels like killing the purpose).

So my question is.. is there any way to do this or it is really entirely impossible to achieve the effect?

Thank you in advance for help! <3

\$\endgroup\$
5
  • 3
    \$\begingroup\$ You may want to look at how The Matrix Online implemented "bullet time" as a localized bubble of slowed time that all inside the bubble would agree about. Or check out this paper on implementing time distortions through "local perception filters". As you note, unlimited time distortion leads to paradoxes, the need to know the future, or slowing down all but the fastest player, but you may be able to limit it. \$\endgroup\$
    – DMGregory
    Sep 4, 2023 at 11:19
  • \$\begingroup\$ Kinda sad that such simple stuff that feels trivial in single player turns impossible in multi.. It would be so cool if it was possible \$\endgroup\$
    – Amae Saeki
    Sep 4, 2023 at 11:29
  • 1
    \$\begingroup\$ Would putting the players into spaceships traveling with relativistic velocities around black holes be an option? :) \$\endgroup\$
    – Philipp
    Sep 5, 2023 at 6:50
  • \$\begingroup\$ Yes! It would! Sounds amazing! \$\endgroup\$
    – Amae Saeki
    Sep 5, 2023 at 10:53
  • \$\begingroup\$ @Philipp I never thought I'd see a situation where the hardest feature to implement is "exit game" 😅 \$\endgroup\$
    – DMGregory
    Sep 6, 2023 at 18:57

2 Answers 2

1
\$\begingroup\$

Combining different techniques

There are multiple techniques to achive this and all of them will feel really bad for the player if overdone. To reduce the "bad feeling" I suggest to combine multiple ones to have just a bit "bad feeling" in multiple ways instead of one big "bad feeling".

Slowing down and speeding up

This you already mentioned yourself. The "faster" player moves faster and the "slower" player moves slower. This works reasonably well for a few percentage difference but becomes unpractical when the difference is big. Examples For one player to be 20% faster than the other one player having 108% speed and their opponent having 90% speed would be playable, achieve the purpose and feel ok. For one player being 10x as fast as the other one player having 300% speed and their opponent having 30% speed would be unplayable, would not achieve the purpose of increased reaction time for the faster player and feel generally bad.

Also note that the slowing effect should be limited to when enganging in combat with a faster player. While not engaged even a 10% slow can be frustrating.

Artifical lag

The increase of reaction time in comparsion with their opponent can also be achived via artifical lag. The slower Player could get some lag added to reduce their reaction time in comparsion with their faster opponent. Again, in small amounts (From the top of my head I'd say in the <2000 ms range) this doesnt feel to bad and achives the purpose. If overdone the game becomes unplayable for the slower player.

Local perception filters

As in the paper linked by DMGregory local perception filters can also help in granting the bullet time effect, especially in long ranged combat. In close combat they don't work.

how I would combine it all

While the players are not engaged, I would just increase the speed of fast players without slowing down the other players. When running down a street "the flash" doesn't need the increased reaction time and can just experience their full speed.

When engaging at a distance I would slow the fast player a bit and use the local perception filters and also give the slower player some artifical lag. (e.g. the faster player goes from 200% to 150% and simulating the remainging 50% via lag and perception filters).

When engaging in close combat the perception filters don't work so good anymore so that is replaced by actually slowing down the slower player.

Now it would be up to you to try this out and to tweak the numbers.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you for the smart advice! \$\endgroup\$
    – Amae Saeki
    Sep 9, 2023 at 13:54
0
\$\begingroup\$

I think this part "only fastest player moves normally and all other players on ENTIRE battlefield experience being more or less slowed down" is where you are having difficulty. If you consider that the entire game is run on the server clock and, for each observer, their time scale is their own (a speed factor relative to server speed = 1), then there is no paradox because one's personal time cannot affect the other observers. To implement: for the observer that has faster time, you can simulate that by multiplying deltatime by the > 1 factor to increase movement in proportion, and similar with the number of attacks. Ditto for the slower player with factor <1. This is actually very similar to the realtime difference in deltatime due to faster/slower framerates that people with faster machines experience, except you are making the number of attacks scale with the artificial time speed.

\$\endgroup\$
4
  • \$\begingroup\$ Wouldn't that just be "fast player is fast and slow player is slow" without the benefit of increased reaction speed for the fast player? \$\endgroup\$
    – datacube
    Sep 7, 2023 at 5:45
  • \$\begingroup\$ Not if the number of attacks (or proportional damage per attack) is scaled with speed. "fast player is fast and slow player is slow" does not mean anything to me. It is like saying a black cat is black. From a programming perspective, one would want each player speed to be relative to something that all know: the network clock, or a server clock. \$\endgroup\$ Sep 7, 2023 at 6:07
  • 1
    \$\begingroup\$ what i meant with "fast player is fast" i show with an example: normal (slow) player: moves 5m/s, attacks 2 times/s and can do a full spin in 1 second fast player: moves 10m/s, attacks 4 times/s and can do a full spin in 0.5 seconds. with that approach however you end up with the fast player being so fast that the human controlling it can manage the speed due to fixed human reaction time. Running into walls, spinning past the enemy..... And how I understand the question, this reaction problem is the problem OP is trying to fix. \$\endgroup\$
    – datacube
    Sep 7, 2023 at 6:17
  • \$\begingroup\$ By "that the human controlling it can manage" I think you mean "cannot manage", and yes, I agree. That is why one may want to simply scale the damage per :"attack" by 2 instead, I.e. simulating 2x the attacks, like what you would do in one melee round in D&D. \$\endgroup\$ Sep 7, 2023 at 6:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .