Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: movement not working :( [Re: Jered] #93455
10/08/06 22:10
10/08/06 22:10
Joined: Aug 2003
Posts: 7,440
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,440
Red Dwarf
Let me explain:

if we would move the global entity (on the server), locally, the entity would snap-back several times as the server tends to overwrite the positon of that entity with its position oin the server, so if the client does not send the new position before the server sends his position you get the old position and the entity snaps back. So we just move a local entity and set the global entities position to our local one so we can move without lag, as the local entity will not be overwritten with any position from the server, its local after all!


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: movement not working :( [Re: Michael_Schwarz] #93456
10/09/06 09:22
10/09/06 09:22
Joined: Sep 2006
Posts: 108
J
Jered Offline OP
Member
Jered  Offline OP
Member
J

Joined: Sep 2006
Posts: 108
oh ok, I see exacty what is going on now thank you so much for the explination! I am going to start a new thread about another question I have...concerning terrains in multiplayer.

That makes a whole lot of sence.. your explination. However I do still have a question about your code.

here is the code:

Code:

while(1)
{
vec_set(player2.x,player.x); // set the player2 position to the actual player position
send_skill(player2.x,send_vec); // send_vec to send the 2 following skills aswell
// player2.x, .y and .z
wait(3); // wait 3 frames to save bandwidth
}



so we are updating it every three frames. this seems to me like we are still updating way to often.

Seems to me that this would still be way more bandwidth then we really would need to be using up. If you had 50 clients constantly updating every three frames...seems it would lag down pretty severe....why would we update the clients if the character is not even moving?

Is this the best we can do? or is this just a "simple" way to help reduce the amount of data being sent?

I would think that we could have some sort of a "system" running on the client that could check the character out fairly often...and when it needs to be updated it would send it to the server..and thus the server could update all clients...and thereby make a whole lot less traffic on the network.

I am not a pro with c-script..far from it, but I am coming along fairly well. When I get more advanced in the multiplayer side of c-script, I am going to work on some sort of a system to do that checking.


3DGS (6.4) Commercial
Re: movement not working :( [Re: Jered] #93457
10/09/06 13:55
10/09/06 13:55
Joined: Aug 2003
Posts: 7,440
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,440
Red Dwarf
yes, that script is just simple and sureley needs to be improved, however i was just trying to give you a simple idea. You could make a bool variable IF the player is moving and only then sending the new position data.

You see, i was just giving you the baasic idea, what was what you asked for, but i see you are getting the things pretty fast
Code:

while(1)
{
if(player.moving)
{
vec_set(player2.x,player.x); // set the player2 position to the actual player position
send_skill(player2.x,send_vec); // send_vec to send the 2 following skills aswell
// player2.x, .y and .z
wait(3); // wait 3 frames to save bandwidth
}
else
{
wait(1);
}
}



Last edited by Michael_Schwarz; 10/09/06 13:56.

"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Page 2 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1