Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-16-2006, 11:08 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
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?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.