
06-16-2006, 11:08 PM
|
|
Former Classic Staff
|
 |
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
|
|
Giving the Illusion of Reduced Lag
|
The best way to give an illusion of reduced lag is to have a serverside instance of something and a clientside instance of something. When dealing with player->NPC lag, it's quite easy. All you need to do is make a local version of something and a global version of something.
Ex: A bush NPC.
You slash it, put leaps down for the client (local), trigger the server to put leaps there globally, handling it by using putnpc2 with a clientside script that isn't visible to the local version of the script.
Since data is coming from the server, watching other players interacting with serverside scripts there should be no lag. However, the client sending and receiving information from the server lags.
How do we handle player interactions then?
Let's say you're on a server with serverside hit-detection, yet all the gani manipulation and movement for players are done clientside. There are going to be problems with giving illusions of reduced lag.
The position of the player serverside, is often different from the position of the player clientside. You can be hit regardless where you are if the server thinks your in a certain location.
The only tactic you can really use against this is to base the damage placement on the serverside location of the player sending it. The rest depends on the receiving player's own serverside position.
For spectators a battle won't seem laggy at all. When two players are fighting, it takes time for a server to receive a trigger, and it takes time to send that to the other client. I believe that this is negligable, and would be the same as clientside hit detection. The only real problem I'm having is that a player's position on the server is different from their position on the client.
What illusion could handle if they're hit on the client and not the server?
Make it look like the player didn't hit them on the client? How would I go about doing this though.
What illusion could handle if they're hit on the server and not the client?
Same situation, except the inverse. Make it so the player did hit them on the client... but once again, how to go about doing this? |
|
|
|