User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,675
    Country:

    Concept: Improving spectator quality

    The following post is a quote of a concept I introduced in another community a long time ago:



    I've been looking at the code and spectating in first person mode lately.
    As you have seen, when spectating, rotation is not replicated from server in a precise way, explanation below.

    Rotator is made up of 3 integer components named Pitch, Yaw, Roll.
    Though they can have any value any 32 bit signed integer have, there are only 65536 unique operational values for each

    component, (65536 = 0 in terms of orientation and so on).
    When transmitting rotators through Unreal's replication system, the components are compressed ( [>> 8], then [& 0xFF] ) into

    8 bit unsigned integers, which go from 0 to 255 (256 combinations).

    The main purpose of this was to obviously save bandwidth by converting a 12 byte struct into a 3 byte one, at the expense of

    precision.

    Ok, then how do our shots hit where we're aiming at if rotation is compressed during transmission?
    Simple, view components are not transmitted client to server as a URotator struct, but instead as one 4 byte integer

    containing both Pitch and Yaw ranging 0-65535 (2 byte integers compressed into a 4 byte INT).

    What can we figure out about this?
    Unlike other clients and spectators, the server actually knows where players are aiming at, with full precision.

    Is it possible to increase view precision?
    No, it is all hardcoded and obvously modifying all player pawns like UTPure did just for this is unnecessary work and

    problems.

    How can it be done then?
    A Client-Server simulator belonging to the spectator, the spectator will be spectating the simulator instead of the player,

    while the simulator will get accurate ViewRotation updates from the server.



    Explaining the concept a little further:

    When a spectator types a mutate command to spectate a certain player, a simulator is spawned and attached to the view

    target.

    Simulator will have the exact same ViewRotation (rotator struct), health and other non-replicated things as the spectated

    player, explained later.

    Simulator is hidden ingame (bHidden = true), so simulator won't be replicated to clients.

    Simulator's owner is the spectator, meaning only the spectator will receive clientside updates.

    When the spectator switches to another viewtarget, simulator is destroyed both clientside and serverside, ending the

    bandwidth channel.

    Simulator will know things not transmitted by the server as ammo count, armor.

    With some intrusive processing, the server can use an input grabber from the player's prespective, this one will be enabled

    if somebody is speccing him, good to catch input signals.

    Since the spectator will be spectating the simulator instead of the actual player, the simulator will try to emulate (only)

    clientside weapon firing, armor amount, full weapont list and ammocount without interfering with anything serverside.
    With some extra work, it would be possible to display on the screen extra information the player might have transmitted to

    the server and clients aren't getting.

  2. #2
    Killing Spree Vatiko//'s Avatar
    Join Date
    Nov 2011
    Location
    Toronto ON, Canada
    Posts
    224
    Country:
    you sir, is the next Einstien .

  3. #3
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,675
    Country:
    This... wasn't as difficult as expected...

    My test spectator gets proper rotation updates, and sets the weapon hand as the player's own handedness, which lets us know their weapon setup now.
    Still working on adding the inventory simulation.

  4. #4
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,675
    Country:
    Testing phase and adding features.

    So far:
    - 95% accurate inventory simulation.
    - 100% accurate rotation simulation. (capped to server framerate)
    - Weapon display identical to the player's.
    - Jump key releases the spectator from the player at the player's location.
    - Alf fire key (while not chasing player) will chase closest player in the spectator's aim.
    - Grab command will teleport the spectator at the wall the spectator's aiming, for fast navigation.
    - Fixed legacy log spamming issue for weapons with ammocount (pulse gun and minigun).

    Test screenshots with 1 unrealserver and 2 clients.

  5. #5
    Administrator SAM's Avatar
    Join Date
    Jan 2011
    Posts
    8,218
    Country:
    Wow this looks great. Will you be giving this to SW to compile into the next build? It'd be great if that could be arranged and if SW got off his butt and made that release already. -.-

  6. #6
    Whicked Sick SilverWing's Avatar
    Join Date
    Jan 2011
    Posts
    1,140
    Country:
    Quote Originally Posted by $carface View Post
    Wow this looks great. Will you be giving this to SW to compile into the next build? It'd be great if that could be arranged and if SW got off his butt and made that release already. -.-

    Dude i had school all summer and had no time. But im done on Monday and free after that.


  7. #7
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,675
    Country:
    I was planning to give this out as a separate package, by simply adding it as a ServerPackage and logging in with the enhanced spectator class is enough to use it.
    Perhaps I could code a Mutator to replace the spectator class during player login but that will be it.

    I would rather keep this away from the main Siege package until it receives extensive testing, it's still too green and besides, as a separate ServerPackage it can be used in any gametype/server and fixed right away if any bug appears.

  8. #8
    Whicked Sick Higor's Avatar
    Join Date
    Apr 2012
    Location
    Full sail ahead!
    Posts
    3,675
    Country:
    Feel free to test it:
    http://www.ut99.org/viewtopic.php?f=7&t=4165&p=41572
    Read that thread for instructions on how to use.

    I tested it on an ACE protected setup and didn't get any kicks, so it shouldn't require whitelist.
    Last edited by Higor; 08-18-2012 at 08:58 PM.

  9. #9
    Whicked Sick 'Zac's Avatar
    Join Date
    Apr 2012
    Posts
    1,084
    Country:
    im fascinated on how smart you are higor. im amazed. in a very very good way


  10. #10
    Administrator |uK|chiseller's Avatar
    Join Date
    Apr 2011
    Posts
    1,968
    Country:
    Isn't that what specfix is for?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Spectator bug on siege server
    By Weetabix in forum Technical Problems
    Replies: 0
    Last Post: 07-21-2015, 10:53 AM
  2. Sound becomes really tinny and low quality
    By BONZ in forum Technical Problems
    Replies: 11
    Last Post: 02-19-2013, 04:24 AM
  3. Spectator commands on RC16
    By Higor in forum zp| * * * -=[SIEGE]=- |uK| One Night Stand -=[SIEGE]=- Server * * *
    Replies: 13
    Last Post: 01-29-2013, 08:32 PM
  4. SPECTATOR HACK
    By sketchturner in forum Reports/Complaints & Appeals
    Replies: 24
    Last Post: 04-04-2011, 10:07 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •