News:

FOR INFORMATION ON DONATIONS, AND HOW TO OBTAIN ACCESS TO THE GAME, PLEASE VIEW THE FOLLOWING TOPIC: http://stick-online.com/boards/index.php?topic=2.0

Main Menu

Little log off bug

Started by God-I-Suck, August 19, 2009, 04:52:54 PM

Previous topic - Next topic

God-I-Suck

I'm not sure if this is a bug or if it's supposed to happen. But when someone logs off and you hit them with a hammer in pvp, they won't get knocked back. I don't recall this being posted before so I thought I'd go ahead and call it out. Care to explain this Meiun or somebody?

ARTgames

#1
This is my speculation but i believe the hits you make in pvp are done on your side and sent to the server than sent to the other player. In the case of a hammer i believe you send the other player your knock back data and then the other player flys backwards and also send (from the other guys screen) that to the server so that the the server can tell everybody else.

I believe this is done because of a way of masking lag. Because if you hit him and then the knocked motion was done your screen first then sent out there could be problems.  such as he could be flying back in the air and still hitting you until your packet gets to him. Also if this was true (if knocked motion was done your screen first) than if the payer got hit on one place on your screen and he was still running before he got your packet from the server then the game would halft to teleported him (the person you just hit) back to ware it happen so both sides would be synced up to ware the person who got knocked back would land. it still would not synced up well. that's a bad reason so i crossed it out.

Also another reason it could be done this way is because once you send the other player how much kock back you do it need to subtract the knocked back that is deducted from vit. If meiun did not do it this way he would half to send a packet back to you telling how much KB to take away. That would increase the time all this happens and for a online game you what to send as less data as possible.

If this is all true than why he does not get knocked back when he logs of is because the packet that said you knocked him back never got to him (he logged of) and thus he could never send out a packet to tell the sever to tell ever one to on there screen to make him look like he was knocked back. (too many "to's" sorry >_<)

also by screen i mean client. i just don't know how to spell client. :P

Now i could have gotten this all wrong and meiun will pwn me soon.

Lingus

Quote from: ARTgames on August 19, 2009, 05:23:56 PM
meiun will pwn me soon.
Hahah! He just may. Your explanation sounds as good as any though.

JoEL

#3
Quote from: God-I-Suck on August 19, 2009, 04:52:54 PM
But when someone logs off and you hit them with a hammer in pvp, they won't get knocked back.

How do you hit someone if they're logged off?

I'd also like to say to artgames, that the hits you make in PvP arent done on you're side at all...It's definately server sided.

krele

Quote from: JoEL on August 20, 2009, 03:07:58 AM
Quote from: God-I-Suck on August 19, 2009, 04:52:54 PM
But when someone logs off and you hit them with a hammer in pvp, they won't get knocked back.

How do you hit someone if they're logged off?

I'd also like to say to artgames, that the hits you make in PvP arent done on you're side at all...It's definately server sided.
It takes some time for server to resend the data back to all players. In this case, shouldn't take more than mere 200 miliseconds. But perhaps if a player  lags out, the server still doesn't send that he lagged out, because there no way server could knew by the time. That's why ping is here.

In case player's computer shuts down, the data won't be sent to server, so a player will not be offline for perhaps 20 seconds (depends on timeout). That's when you can attack a player, without him flying.

To make it a bit mroe in depth, I'll try to note what I deduce to be the best way to make other players hit each other like that. I highly believe SO does it this way, so:

First, you attack another player. In case you hit him on your own screen, It'll report to the server which player is attacker, the damage, knockback and perhaps more stuff.
The server then, sends it to all players, and if the ID of the attacked player is your own player ID, you'd get damaged. If it's a hammer, you would get knocked, but other players wouldn't know yet. Once you change your hspeed or vspeed, the client automatically updates the info, and sends the new movement to the server. Server then sends his new movement to everyone else.