Slots between client/server

Users who are viewing this thread

Yagababa

Regular
Could someone please give me quick rundown/direct me to an explanation of what gets communicated between a warband server and the clients?

I can see that certain things like damage can be done all server side and synched globally, but what about agent slots, animations, and particle effects?
 
Slots are just variables but better, they are not synced by engine.
Particle systems are synced by default afaik, check particle_system_burst and particle_system_burst_no_sync
You can make agents play animations directly from server but from my experience its often laggy and desync occurs. Not sure if it depends on any particular animations.
 
Upvote 0
Slots are just variables but better, they are not synced by engine.
Particle systems are synced by default afaik, check particle_system_burst and particle_system_burst_no_sync
You can make agents play animations directly from server but from my experience its often laggy and desync occurs. Not sure if it depends on any particular animations.
Thanks--I see there's some kind of system in place w/ 'events' in script_game_receive_network_message, is this used for both server and client updates?
 
Upvote 0
yes.

multiplayer_send_message_to_server, multiplayer_send_int_to_server, multiplayer_send_message_to_player etc are all handled inside script_game_receive_network_message.
Is there a streamlined way to send information to every player? It looks like send_message_to_player takes a player ID as a parameter, which I'd assume sends the message to only that player.

All I can think of is try_for_range 0 to max_players and checking that player_is_active, but that feels clunky and inefficient.
 
Upvote 0
Is there a streamlined way to send information to every player? It looks like send_message_to_player takes a player ID as a parameter, which I'd assume sends the message to only that player.

All I can think of is try_for_range 0 to max_players and checking that player_is_active, but that feels clunky and inefficient.
Sorry for a late reply, but I have not seen the recent posts until now. This thread is tagged 'WB', so I assume it is not for WFaS like previously. get_max_players paired with try_for_range was an old way to loop through players and people had a problem establishing if they had to start with 0 or 1 (on dedicated servers the server is always 0). Use try_for_players with parameter 1 to skip the server and loop through all players (the command was added too late with 1.165 as it had always been needed).
 
Upvote 0
Slots are just variables but better, they are not synced by engine.
Particle systems are synced by default afaik, check particle_system_burst and particle_system_burst_no_sync
You can make agents play animations directly from server but from my experience its often laggy and desync occurs. Not sure if it depends on any particular animations.
Is there a better way to have an agent play an animation across all clients/the server?

Sorry for a late reply, but I have not seen the recent posts until now. This thread is tagged 'WB', so I assume it is not for WFaS like previously. get_max_players paired with try_for_range was an old way to loop through players and people had a problem establishing if they had to start with 0 or 1 (on dedicated servers the server is always 0). Use try_for_players with parameter 1 to skip the server and loop through all players (the command was added too late with 1.165 as it had always been needed).
Thanks--it's for WFaS but I'm using the WSE build so I think I should have access to it...
 
Upvote 0
Back
Top Bottom