[✔] How safe is it to use SetActorPosition or SetActorVelocity continously online?
[✔] How safe is it to use SetActorPosition or SetActorVelocity continously online?
I made a wad where I used SetActorPosition continuously (continuously = every 5 or less tics) on some actors and it worked all fine. However, I heard that the function can make the server lag if it is used continously like that. I once hosted a server on BestEver to see if this will happen (since it already didn't happen when I hosted using my own machine) but everything went fine.
I want to sort this out, since I'm planning on utilizing this in one of my projects. Just how safe is it to use a function such as SetActorPosition or SetActorVelocity every few tics on certain actors? I can realize the idea I have with either of these two functions, so it would help to know which one is more optimized for use in the manner I described. Also, what if I used this method on 20 - 40 actors simultaneously?
I want to sort this out, since I'm planning on utilizing this in one of my projects. Just how safe is it to use a function such as SetActorPosition or SetActorVelocity every few tics on certain actors? I can realize the idea I have with either of these two functions, so it would help to know which one is more optimized for use in the manner I described. Also, what if I used this method on 20 - 40 actors simultaneously?
Last edited by Konda on Thu Oct 16, 2014 8:03 pm, edited 1 time in total.
RE: How safe is it to use SetActorPosition or SetActorVelocity continously online?
You can just simulate it by having it active on a lot of dummy actors instead of relying on untested theory crafting :P.
Dunno if there is a command to make bots idle and stop their cpu stravage but if you manage to do that -maybe very small map- you'd have almost certain results spawning a lot of them. -Might want to ask Jenova for permission to use bots in tests first on BE.
Dunno if there is a command to make bots idle and stop their cpu stravage but if you manage to do that -maybe very small map- you'd have almost certain results spawning a lot of them. -Might want to ask Jenova for permission to use bots in tests first on BE.
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]
RE: How safe is it to use SetActorPosition or SetActorVelocity continously online?
I don't think zandronum-server handles bots in the same way it handles clients.
Code: Select all
<Synert> fuck
<Synert> plugged in my memory stick and got a bsod-
Watermelon
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
RE: How safe is it to use SetActorPosition or SetActorVelocity continously online?
It should be fine to use. If there is any performance issues doing that, it should be reported on the tracker since the function is very lightweight.
I could see it lagging people out if it's used every tic on 1000+ monsters, as it'd need to spam the netcode for all the monster position updates.
I could see it lagging people out if it's used every tic on 1000+ monsters, as it'd need to spam the netcode for all the monster position updates.
Last edited by Watermelon on Thu Oct 16, 2014 4:10 pm, edited 1 time in total.
RE: How safe is it to use SetActorPosition or SetActorVelocity continously online?
It's lightweight? Awesome.
cheers m8
cheers m8
Last edited by Konda on Thu Oct 16, 2014 4:30 pm, edited 1 time in total.
Code: Select all
<Synert> fuck
<Synert> plugged in my memory stick and got a bsod- Torr Samaho
- Lead Developer
- Posts: 1543
- Joined: Fri May 25, 2012 6:03 pm
- Location: Germany
RE: How safe is it to use SetActorPosition or SetActorVelocity continously online?
Well, each call to either of the two functions will need network bandwidth (at least if the function actually changes a property of the actor, otherwise the engine may be able to discard the calls to safe traffic). So there is a limit on how many such calls you can make before you'll start lagging. Since the function is rather lightweight, the limit may be high enough for your cases. Using this for a few actors certainly should be fine, but, as Water already hinted, using this for thousands of actors is not going to work online.
As a general rule of thumb for all function calls that need network bandwidth, if you can easily reduced the number of calls, you should.
As a general rule of thumb for all function calls that need network bandwidth, if you can easily reduced the number of calls, you should.
RE: How safe is it to use SetActorPosition or SetActorVelocity continously online?
Alright, thanks for the info. I'm pretty sure I don't need to use the function on that many actors.
Code: Select all
<Synert> fuck
<Synert> plugged in my memory stick and got a bsod- ibm5155
- Addicted to Zandronum
- Posts: 1641
- Joined: Tue Jun 05, 2012 9:32 pm
- Location: Somewhere, over the rainbow
RE: [✔] How safe is it to use SetActorPosition or SetActorVelocity continously online?
I used SetActorVelocity on flappy lost every 1 tic, it works, but, it's not as smooth as offline, if you have lag it'll be a pain i the ass to control it.
I still need to test another method for flappy lost soul to use less set actor velocity (only send this command when a player press a key, and let the rest with the gravity
I still need to test another method for flappy lost soul to use less set actor velocity (only send this command when a player press a key, and let the rest with the gravity
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!
<this post is proof of "Decline">