lag-compensation | Multiplayer lag compensation system that improves hit | Game Engine library

 by   Vercidium C# Version: Current License: Apache-2.0

kandi X-RAY | lag-compensation Summary

kandi X-RAY | lag-compensation Summary

lag-compensation is a C# library typically used in Gaming, Game Engine, Unity, WebGL applications. lag-compensation has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This repository contains C# code for the lag compensation system used in the game Sector's Edge. The explanation and visualisation of this system can be found in this blog post. Collision detection between projectiles and skeletal bone structures will be released in a future repository.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              lag-compensation has a low active ecosystem.
              It has 11 star(s) with 3 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              lag-compensation has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of lag-compensation is current.

            kandi-Quality Quality

              lag-compensation has 0 bugs and 0 code smells.

            kandi-Security Security

              lag-compensation has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              lag-compensation code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              lag-compensation is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              lag-compensation releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lag-compensation
            Get all kandi verified functions for this library.

            lag-compensation Key Features

            No Key Features are available at this moment for lag-compensation.

            lag-compensation Examples and Code Snippets

            No Code Snippets are available at this moment for lag-compensation.

            Community Discussions

            Trending Discussions on lag-compensation

            QUESTION

            Find out latency in a reliable way
            Asked 2017-Aug-09 at 14:57

            Background: I am developing a small game and use the player's latency to do lag compensation. The game is open sourced, so at the moment it is a very easy task to reverse engineer the system and delay ones response time to artificially increment ones reported delay, resulting in possibly unfair advantages.

            My current strategy for latency retrieval is:

            • Every fixed interval I send a message labeled as "ping" to a player. (This has nothing to do with ICMP)
            • This ping message consists of a special "ping" opcode and a payload with a sequence number
            • Once the client receives said message, he sends back one with a "pong" opcode and a payload with the same sequence number
            • When the server receives the message labeled as "pong", it calculates how much time passed in between sending and receiving. This is the round trip time
            • Our latency is the rtt / 2

            In pseudo code

            Server:

            ...

            ANSWER

            Answered 2017-Aug-09 at 14:57

            Answer below is a summary of topics discussed in comments to have them all in one place.

            Lag compensation should rely on precise time stamp of event rather than average packet delay

            Transition time may drastically vary even for two successive packets. Suggested approach with measuring average latency and assuming, that each received packet was sent "latency" ms ago for lag compensation is way too inaccurate. The following scheme should be applied instead:

            Server starts emulating world on its side and sends command START to all clients. Clients initiate emulating world and count ticks from its creation. Whenever any event occurs on client side, client sends it with timestamp to server. Like "user pressed fire at tick #183". Server's emulation of game is far ahead due to packet transition time, but server can "go back in time" to handle user's order and resolve consequences.

            Time stamps and events still can be faked

            AFAIU problem of verifying client input is generally unsolvable. Any algorithm implemented in client can be recreated to fake events/timestamps/packets. Closed code can be reversed, so it is not an answer. Even world wide spread games like Counter-Strike or OverWatch have cheaters, despite they are developed by large companies, which, I bet, have separate department focused solely on game security. Some companies develop antivirus like modules, which check game file integrity or hash of parts of RAM snapshot, but it still can be bypassed.

            The question is amount of efforts required to fake algorithm. The more efforts needed the less fakers will be. Trivial timestamp verifycation is the following:

            1. If you receive event#2 in TCP stream after event#1, but its time stamp is before event#1, then it's faked.

            2. If time stamp is far behind server's time, then warn and kick player for enormously bad delay. If it's a real player, the game anyway is unplayable for him, otherwise you kicked hacker. CS servers do this if I'm not mistaken.

            Source https://stackoverflow.com/questions/45560841

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install lag-compensation

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Vercidium/lag-compensation.git

          • CLI

            gh repo clone Vercidium/lag-compensation

          • sshUrl

            git@github.com:Vercidium/lag-compensation.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link