Monday, February 28, 2011

Some more improvements

I did some further improvements. Added is ability to spectate players from first person view and from third person view. Swapping between free spectating mode and player spectating is done with key for inventory screen (default F1, usually reports "disabled in multiplayer") and goal screen (default F2). So, in case you have unbound these keys, you should bind them back or else you won't be able to switch spectator modes.


Also you can go through the list of players. For now, each spectator can spectate any player (but not spectators of course) regardless of the player's team. But later I will add config options whether this is allowed or not. To spectate next player, you simply press primary fire button (the one you shoot with).

I also added some smoothness in movement when in free mode, messages to display when player starts spectating and when goes from spectating mode into playing mode. For now, only TDM game is supported.

The most challenging part was more accurate displaying of spectated players view. If you know anything about unreal engine, then you know that rotator data types are not precise anymore after sent over net. Rotator keeps data about players view, so we see only approximate aim of the remote player and thus aiming feels jitter-ing. I partly fixed this by (by every tick) sending special 2 integer values for rotation (which are always sent in full precision). The aim of spectated player is now precise, but still feels a bit jitty (this is related tick rate - it should be higher to reduce this effect). But anyway, I think it is still working pretty good.

And here is the screenshot of players being completely overwhelmed about new spectator mode (after 10+ years DXMP finally got long-wished and needed spectator mode) and so almost nobody played :(

No comments:

Post a Comment