SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
87 stars 18 forks source link

Increase the resolution of /Spy #1318

Closed NathanDontGotDis closed 4 years ago

NathanDontGotDis commented 4 years ago

So there are many plugins that utilize the /spy capabilities, while spy is cool, it's extremely limited, and almost useless. With the way the command was designed, you end up with a image in 480p resolution, but is compressed to all hell. 480p wouldn't be bad, but it's has barely any legible content with the amount of compression it has. I also know that it was designed so it has a minute impact on the client, and save bandwidth. I think if we had 720p at least, with no compression, while it would use more bandwidth, make it to where it throttles the transfer of the screenshot to where it has the same bandwidth usage per second or less, but outputs a higher quality image. I am no programmer, or developer, so I don't know the possibilities of something like this, but anything to better /spy would help.

surv0013 commented 4 years ago

To reduce the impact on the client, Nelson can put the process in a async thread. There is no longer any benefit from this command (/spy) anyway. Now all cheats already have anti-spy. The principle is simple, when the client receives a request for a screenshot, the cheat simply turns off the visual indicators on the screen.

Trojaner commented 4 years ago

This can not be done async because the netcode of Unturned does not support that.

SDGNelson commented 4 years ago

The main benefit of the spy system initially was to catch ESP which was obvious at low resolution. Since cheaters typically turned off their ESP for one frame or sent a bogus screenshot it could be called repeatedly to flicker their screen in an annoying manner. It requires reading back the frame from GPU to CPU, so is not ideal for higher resolutions. My understanding is that screen recording systems ideally use hardware acceleration for higher performance.

@surv0013 It cannot be made async both because it depends on Unity APIs, and the relatively less performance intensive sending is on the main thread. If you're writing async plugins I'd strongly recommend you reconsider and reinvestigate because they are one of the big recurring causes of problems.