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
0 registered members (), 16,302 guests, and 5 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
Multiplayer... #316913
03/27/10 19:15
03/27/10 19:15
Joined: Mar 2009
Posts: 11
-
T
tehVolcano Offline OP
Newbie
tehVolcano  Offline OP
Newbie
T

Joined: Mar 2009
Posts: 11
-
Hi,
I've been trying to figure out how to transfer a model's position from the client compter to the server. Right now, I run the entire script for the player entity on the client.
Usually, if I insert an entity by ent_create, the position of the entity is automatically updated - As long as I define an action in ent_create.
Basically, it's like I'm running two singleplayer games - except that every time a new client joins, a new model appears near the spawn point (and can be seen by all cliets and the server) and freezes there.
On the server, all players are frozen. On the clients, onlyone entity moves. (The one that the client controls).
Does anyone know how to fix this? Any help is appreciated.

Re: Multiplayer... [Re: tehVolcano] #316943
03/28/10 00:12
03/28/10 00:12
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
On the client, send the player's position to the server with send_skill(). The server should then spread that player's position to all the other players.

Trouble is, when the server receives that player's position, it will send it right back to the client who originally sent it. This will overwrite any movements the client has made. To fix this, save the client's position into an array handled on the client side. When the client receives his old position from the server, just revert the client's position to the one saved just before the client's position was sent.

It's tricky, but if you follow the logic of it then it should make sense.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: Multiplayer... [Re: Redeemer] #316961
03/28/10 08:00
03/28/10 08:00
Joined: Mar 2009
Posts: 11
-
T
tehVolcano Offline OP
Newbie
tehVolcano  Offline OP
Newbie
T

Joined: Mar 2009
Posts: 11
-
Ah, thanks, that works laugh


Gamestudio A7 Pro

Moderated by  adoado, checkbutton, mk_1, Perro 

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