C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
|
| 22 Mar 2017 09:41 PM |
Because the same mechanics are being produced as to shoot a projectile out of a gun, in which the bullet is rendered on the server and SetNetworkOwner has never been called. This makes the bullet lag when it gets near another player.
I assume, this applies to the lag the NPC's get. They do lag when other players are in the game. I forget how much lag is produced when it's only 1 player in the game.
Because when an NPC moves close to two players, you'll see a bit of lag there.
So, a possible solution, would be to call SetNetworkOwner on all of the parts in the NPC. Am I right?
But here's the big question. How do I know which player to set it to? The player it's currently tracking? And I would update the network owner depending on it?
Or would this even fix the problem. Please let me know some advice here. Thank you for reading! I probably rambled on a little bit too much haha, sort of like I'm doing right now gg. |
|
|
| Report Abuse |
|
|
C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
| |
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 22 Mar 2017 10:02 PM |
No Offense
But I don't think you actually know what your doing
Its true that roblox can't run NPC's that well but bullets and NPC's don't normally lag assuming your coding them property and not doing any hardcore simulations with them.
Can you go into more detail on how your bullets or NPC's work? |
|
|
| Report Abuse |
|
|
C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
|
| 22 Mar 2017 10:04 PM |
I think I'm onto something though. Would using SetNetworkOwner on the NPC's smoothen them out a bit? I can see it working nicely if used properly.
Thanks for reply. |
|
|
| Report Abuse |
|
|
Thedagz
|
  |
| Joined: 10 Mar 2012 |
| Total Posts: 798 |
|
|
| 22 Mar 2017 10:05 PM |
I don't believe so
Is your bullets moved by CFrame? while using RunService?
That will def. smooth your bullets |
|
|
| Report Abuse |
|
|
opplo
|
  |
| Joined: 09 Dec 2008 |
| Total Posts: 5320 |
|
| |
|
C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
|
| 22 Mar 2017 10:33 PM |
A single npc has no effect. If I have 20, there will be a bit of lag. That's why I'm making 20 the max amount
Isn't there some way to smoothen them out a little? |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 22 Mar 2017 10:56 PM |
No Offense
But I don't think you actually know what your doing [2]
R$83,236 and climbing. |
|
|
| Report Abuse |
|
|
C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
|
| 23 Mar 2017 11:08 AM |
I don't think you know what you guys are talking about tbh.
If there are alot of NPC's clustered on a map at one time, there will be lag. Lag caused by roblox automatically.
I figured maybe using network ownership would smoothen their bodyparts as they move.
You guys aren't giving good details..
but thanks for the replies. |
|
|
| Report Abuse |
|
|
C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
|
| 23 Mar 2017 11:16 AM |
| Yep. My theory was proven to be legit. When the NPC's go towards another player, I notice some lag when they do that on my client. Network Ownership could solve this maybe? |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 23 Mar 2017 01:00 PM |
I know exactly what I'm doing. Network ownership has nothing to do with it. physics is still calculated on both ends, network ownership just has to do with who can actually modify it via script. ur bad.
R$82,419 and climbing. |
|
|
| Report Abuse |
|
|
C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
| |
|
|
| 23 Mar 2017 02:49 PM |
But I don't think you actually know what your doing [2]
He does, but the issue isn't that... re-code for efficiency... as that's what I did. You also want to either do it really nicely in a module or do it in a script inside the AI unit as this allows it to update to replication faster making it smoother so a zombie doesn't lag behind or anything like that... |
|
|
| Report Abuse |
|
|
C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
|
| 23 Mar 2017 03:36 PM |
| I suppose that makes sense Lua. Thank you for the reply. I will, most likely start remaking the AI's when ever I can. And I also assume pathfinding service causes a spike in performance as well. |
|
|
| Report Abuse |
|
|
|
| 23 Mar 2017 04:17 PM |
| It does, but you have to use it conservatively. |
|
|
| Report Abuse |
|
|
C_Sharper
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
|
| 23 Mar 2017 05:42 PM |
I might just use a simple approach, using MoveTo, so I don't have to spend extra memory on calculating paths, which aren't even that good tbh..
Thanks for the info. |
|
|
| Report Abuse |
|
|