Alphajim wrote:Just an idea, picked up from explanations on how hacks are impossible in WoT and war thunder ;)
Hacks in general are never impossible. It is possible to make
some hacks impossible, but not all (wallhacks, anybody?). It can be proven that you can make an unbreakable implementation of Connect 4, but it's technically possible to, say, hook the Velena engine up to it.
longbyte1 wrote:Minecraft does a bit of both: the server ultimately dictates where you are, but the client can change the player's position to make movement smooth (but if the server disagrees it can jump you back). In AoS however, it looks like the server can only read, not write, a player's position.
Then how do you teleport players? ;)
AoS 0.54-0.76 is kinda weird, the client tells the server where it is, but the server also says where the client should be through its World Update packets. If the client drifts too much from the world update packet, the client itself will snap back into place. If the client drifts REALLY far, the server will teleport the player back to where it should be. I think. Either way, the server can detect this sort of stuff easily.
In AoS 1.x it's a bit different. The client sends a timestamped input packet and the server factors it into its timestamped World Update packets where the client checks against them and corrects its position accordingly. At no point does the client tell the server what its position is.
Both of them are a shit of a thing to write a custom client for, as you need an implementation of the player physics.
Which means I can answer this one:
Dare wrote:Is there a script that allows the server to calculate positions or it's just an idea?
In order to adhere to the AoS 0.75 protocol, the server MUST calculate positions.
HOWEVER... we then have to go to this point:
Alphajim wrote:I'm a noob in programming, but I think some hacks can be deleted by letting the server able to calculate positions ; ONLY the server, not the client nor another program :)
The protocol is really not friendly to this approach at all. It can be done without too much pain in the 1.x protocol (assuming you already have an implementation, and I suspect you have to do it for 1.x anyway), but not the 0.x protocols - you have to calculate when the packet was sent, and pings tend to fluctuate.
This may sound like I'm saying the 1.x protocol is good. It's not. It does terrible things:
- it shoves just about everything into the World Update packet, making the protocol use about 32KB/s downstream;
- it applies a second layer of compression;
- it also tends to bunch packets together despite the fact that ENet handles that shit itself;
- there's an easily broken encraption for C->S which does nothing but bloat things and also break badly in some versions of Wine.
It *is* substantially more flexible than the 0.75 protocol though.
Having said that, there are ways to speedhack which can bypass this. Adjusting the length of the forward vector seems to be one way. This is something you have to protect yourself against on the server side. Fortunately it's obvious as fuck when people do this on 0.x - they usually go around with an absolutely fucking *massive* head.