Raised This Month: $32 Target: $400
 8% 

[CS:S] QuickPeek | Observe other players while in-game


Post New Thread Reply   
 
Thread Tools Display Modes
Author
VerMon
Junior Member
Join Date: Jan 2020
Plugin ID:
8426
Plugin Version:
1.1.0
Plugin Category:
General Purpose
Plugin Game:
Counter-Strike: Source
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Observe other players while in-game
    Old 03-20-2023 , 09:48   [CS:S] QuickPeek | Observe other players while in-game
    Reply With Quote #1

    QuickPeek

    Description
    This plugin allows you to spectate other players while being alive so your gameplay will not be interrupted.
    It can be useful for gamemodes where it's not against the rules to have info on other players' movement.
    It can make it more fun in turn-based gamemodes like trikz: oftentimes your gameplay depends on your partner's actions, so it's not that fun having to just wait for the partner to complete some sub-level in an obscured area where you cannot see their progress - and this is exactly what this plugin is to address, i.e. by enabling you to observe their actions first-person.

    You can take a look at the video to get idea of the plugin: https://www.youtube.com/watch?v=ZoUhiFdZ-2g

    In addition, the plugin tries to borrow HUD message elements intended for other players you are peeking on. These HUD elements, for example, can be generated by other plugins.

    The plugin has been focused on Counter-Strike: Source, including v34.

    At the moment, there may be a problem with the sounds while peeking.

    Installation
    At least SourceMod 1.11.0.6822 is requred.

    Simply place quickpeek.smx and quickpeek.games.txt in
    addons/sourcemod/plugins and addons/sourcemod/gamedata folders respectively.

    It is recommended to set high network rates (especially sv_minupdaterate and sv_maxupdaterate cvars) to improve usability of the plugin.

    Usage
    There are two in-game console commands differing in just their usage:

    qpeek - toggle peeking, i.e. you'd stop peeking once you press the corresponding button once more;
    +qpeek - start peeking, i.e. the peeking would stop as soon as you release the corresponding button.


    It is recommended to bind one of them.

    While peeking, you retain the ability to move, you can switch targets using mouse buttons (+attack/+attack2) and you can see the current target displayed at the bottom half of the screen.
    It remembers the last used target when peeking again.


    You can stick to a specific player using the +use button. This allows you to quickly return to the same player again. The name of such a player will be shown in a different color.

    Pressing the +jump button will return you to either the tied player to or the first target.

    While peeking, we may have interpolation enabled. To ensure smooth movement, the plugin tries to set a minimum interp ratio, controlled by qpeek interp. By default, this is 2 (at least 2 game updates will be taken into account).

    Also, there is additional qpeek angles sub-command to turn on/off turning your player. It is disabled by default.

    The technical implementation leads to spamming the annoying weapon history on the right. You can turn this off with the client hud_drawhistory_time 0.

    Technical Details
    This plugin uses Valve replay system that allows you to receive frames generated for another player. This is closely tied to the KillCam user message.
    This message causes the client to change its local player to someone else's, which would be impossible to achieve simply by substituting frames since we still wouldn't be able to take the other player's view.
    As a result, it is desirable to turn off prediction on the client side, which would give us the opportunity to interpolate the local player.
    Thus, we take the place of another player, get his frames and we have interpolation turned on.

    But in order to drastically change the flow of frames later and set a new flow, need to fully update game information on the client. And it needs to send a lot of data quickly. Setting high updaterate will help you to increase speed of this.

    For other Source games, a similar implementation is probably possible in Left 4 Dead 2 or Day of Defeat: Source, since KillCam message is present in these games. If there is an obvious way to change the local player, then it is possible in another game too.

    Perhaps a similar result could be achieved with the help of m_hObserverTarget and thus in any other game, it is like the standard observation do, but this would not give the power that is with the complete change of the local player because otherwise our local player will remain in the game and we will have to solve other problems as well.

    Links
    Demonstration: https://www.youtube.com/watch?v=ZoUhiFdZ-2g
    GitHub: https://github.com/vermon-css/quickpeek-sm
    Attached Files
    File Type: sp Get Plugin or Get Source (quickpeek.sp - 103 views - 28.4 KB)
    File Type: txt quickpeek.games.txt (3.0 KB, 40 views)

    Last edited by VerMon; 11-18-2023 at 05:53. Reason: v1.2.0
    VerMon is offline
    bigborther
    Member
    Join Date: Feb 2014
    Location: china
    Old 03-20-2023 , 11:39   Re: [CS:S] QuickPeek | Observe other players while in-game
    Reply With Quote #2

    I have a question, how can we find these function in quickpeek.games.txt, can you make a explaination, sry for my silly quesion
    bigborther is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 00:42.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode