Client side spawning
- dbthanatos
- Posts: 72
- Joined: Wed Jan 27, 2016 4:02 pm
Client side spawning
Hello there. Im very new to zandronum in the sense that I've never done multiplayer mods before. Yet, Im farily familiar with (g)zdoom modding.
I have some questions regarding client side spawning.
I've made a Q4 mod and im trying to figure out how to optimize it for MP. I was reading about the ClientSideOnly flag. Im not all that familiar with this stuff, so I dont get what's the idea behind this flag.
I read somewhere that it's for decorations, say, like sprite particles in a explosion, but does that mean the other players cant see them? Or they spawn in their side (and might look a bit different given the randomness used via A_SpawnItemEx)
Also, I have a sprite based lightning gun, which is just 1 tic rails with sprites instead of particles. So Im worried that's a lot of actors spawning. Or is that really not a big deal?
Im probably going to be pestering here with a ton of questions like this :P
I have some questions regarding client side spawning.
I've made a Q4 mod and im trying to figure out how to optimize it for MP. I was reading about the ClientSideOnly flag. Im not all that familiar with this stuff, so I dont get what's the idea behind this flag.
I read somewhere that it's for decorations, say, like sprite particles in a explosion, but does that mean the other players cant see them? Or they spawn in their side (and might look a bit different given the randomness used via A_SpawnItemEx)
Also, I have a sprite based lightning gun, which is just 1 tic rails with sprites instead of particles. So Im worried that's a lot of actors spawning. Or is that really not a big deal?
Im probably going to be pestering here with a ton of questions like this :P
RE: Client side spawning
You should always make PURELY DECORATIVE actors (ie things that don't affect the players or monsters in any way) clientside.
And to answer your other question, all players can see clientside actors. They're spawned on every client, they're just not sync'd with the server. So from different player's viewpoints, they might fly in different directions or a_jump to different states, which is probably fine if they're just particles.
Btw you made Æons of Death, right? Welcome to Zandronum.
And to answer your other question, all players can see clientside actors. They're spawned on every client, they're just not sync'd with the server. So from different player's viewpoints, they might fly in different directions or a_jump to different states, which is probably fine if they're just particles.
Btw you made Æons of Death, right? Welcome to Zandronum.
Last edited by Ænima on Wed Jan 27, 2016 5:12 pm, edited 1 time in total.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

- dbthanatos
- Posts: 72
- Joined: Wed Jan 27, 2016 4:02 pm
RE: Client side spawning
Thank you very much. I understand that a little better now.
So, I suppose it would be fine to make the lightning gun (rail) sprites CLIENTSIDEONLY, since players will see them just fine in their side, there's nothing random about them, and in that way the game wouldnt have to sync 10+ actors per tic per second just for that weapon alone.
And yep, Im the guy who made that mod :P Thanks for the welcome. Im looking forward to release my first Zandronum compatible mod ever.
So, I suppose it would be fine to make the lightning gun (rail) sprites CLIENTSIDEONLY, since players will see them just fine in their side, there's nothing random about them, and in that way the game wouldnt have to sync 10+ actors per tic per second just for that weapon alone.
And yep, Im the guy who made that mod :P Thanks for the welcome. Im looking forward to release my first Zandronum compatible mod ever.
RE: Client side spawning
That's right, that's the perfect use case for +CLIENTSIDEONLY.
- Torr Samaho
- Lead Developer
- Posts: 1543
- Joined: Fri May 25, 2012 6:03 pm
- Location: Germany
RE: Client side spawning
FYI, Zandronum also has a built-in way of measuring bandwidth usage by actor types and ACS scripts, which simplifies finding the source of excessive network traffic. You can activate it with "sv_measureoutboundtraffic 1" and display the information gathered about the traffic since the measurement was started with "dumptrafficmeasure". "cleartrafficmeasure" resets the measurements, if you want to start fresh. EDIT: See Measuring_outbound_traffic.
Last edited by Torr Samaho on Sat Jan 30, 2016 11:06 am, edited 1 time in total.
-
- Retired Staff / Community Team Member
- Posts: 2568
- Joined: Sat Jun 02, 2012 2:44 am
RE: Client side spawning
Never realized that existed, awesome.Torr Samaho wrote: FYI, Zandronum also has a built-in way of measuring bandwidth usage by actor types and ACS scripts, which simplifies finding the source of excessive network traffic. You can activate it with "sv_measureoutboundtraffic 1" and display the information gathered about the traffic since the measurement was started with "dumptrafficmeasure". "cleartrafficmeasure" resets the measurements, if you want to start fresh. EDIT: See Measuring_outbound_traffic.
- dbthanatos
- Posts: 72
- Joined: Wed Jan 27, 2016 4:02 pm
RE: Client side spawning
Thank you very much Torr.
I just have another question.
If I have, say, an imp, and I make the DoomImpBall to have a trail with random particles, when I add the flag to the particles, that's telling to the game that whatever the particles are going to do by themselves (as in, the code they carry, which may or may not do extra stuff like resizing them randomly), that's gonna be calculated in the client side, and the server does not have to care at all about it. However, the DoomImpBall will still be having to sync every A_SpawnItemEx bit of data and having to sync that every tic? In that case, would it be bad/better if I were to add the flag to the actual DoomImpBall? I read that the flag is only for cosmetic stuff, however I wonder how it really works.
I ask this because a lot of monster's projectiles have trails, and I wonder in a coop game how much is that going to affect in the long run
I just have another question.
If I have, say, an imp, and I make the DoomImpBall to have a trail with random particles, when I add the flag to the particles, that's telling to the game that whatever the particles are going to do by themselves (as in, the code they carry, which may or may not do extra stuff like resizing them randomly), that's gonna be calculated in the client side, and the server does not have to care at all about it. However, the DoomImpBall will still be having to sync every A_SpawnItemEx bit of data and having to sync that every tic? In that case, would it be bad/better if I were to add the flag to the actual DoomImpBall? I read that the flag is only for cosmetic stuff, however I wonder how it really works.
I ask this because a lot of monster's projectiles have trails, and I wonder in a coop game how much is that going to affect in the long run
Last edited by dbthanatos on Mon Feb 08, 2016 3:36 am, edited 1 time in total.
-
- Retired Staff / Community Team Member
- Posts: 2568
- Joined: Sat Jun 02, 2012 2:44 am
RE: Client side spawning
Don't do +CLIENTSIDEONLY to anything that affects the game in any form aside from a visual standpoint.
- SwordGrunt
- Forum Regular
- Posts: 377
- Joined: Thu Jun 07, 2012 8:43 pm
RE: Client side spawning
The trails will work fine clientsided, but each client will have their own calls to random that will likely make them see the particles in a different way - within whatever randomization you set. Which is usually what you want anyway.
Generally unless you're doing absurdly complex trails and playing on large maps with hundreds of monsters, there will be no noticeable difference if they are client-sided or not. But it's just considered good pratice to clientside effects that do not interact with gameplay at all.
Generally unless you're doing absurdly complex trails and playing on large maps with hundreds of monsters, there will be no noticeable difference if they are client-sided or not. But it's just considered good pratice to clientside effects that do not interact with gameplay at all.
Last edited by SwordGrunt on Tue Feb 09, 2016 9:22 pm, edited 1 time in total.
- ZZYZX
- Posts a lot
- Posts: 742
- Joined: Thu Jun 07, 2012 5:56 pm
- Location: Ukraine
- Clan: A3
- Clan Tag: [A3]
RE: Client side spawning
Spawning approximately 1000 NOINTERACTION actors is a big deal already. 20-30-100 is okay as long as they don't get spawned every tic. Make the lightning gun less solid if you want that.dbthanatos wrote:Also, I have a sprite based lightning gun, which is just 1 tic rails with sprites instead of particles. So Im worried that's a lot of actors spawning. Or is that really not a big deal?
Overall, SPAWNING and DELETING (not even moving) actors is laggy. Especially deleting due to how garbage collection works, according to some tests (for details, poke Monsterovich). Moving actors is less laggy, especially for NOINTERACTION as this won't require blockmap linking.
Last edited by ZZYZX on Wed Feb 10, 2016 12:01 am, edited 1 time in total.
quality DoomExplorer hackeringFilystyn wrote:Do you know what windows.h is? It's D, DWORD.
overcomplicated ZDoom grenade
random Doom things
GZDoomBuilder-Bugfix