jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 26 May 2015 05:14 PM |
Ok so I created a custom animation system for my guns, and it works exactly as planned. It interpolates KeyFrames and runs actions to form a smooth animation.
Except the rendering on the welds seems to lag badly if I try playing the game with stuff running in the background of my computer. (Ex: playing a youtube video in the background)
The parts won't render correctly according to the welds, and they may seem invisible or frozen in place randomly.
Any idea how I could fix this?
Place with animation: http://www.roblox.com/games/168480835/jewelycats-Place-Number-121
(I can upload a video of the lag if needed) |
|
|
| Report Abuse |
|
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
| |
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 26 May 2015 05:38 PM |
Example if I lag my computer: https://youtu.be/FGt9HumOD48 |
|
|
| Report Abuse |
|
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 26 May 2015 05:40 PM |
| Video has awful framerate, but it shows the issue :p |
|
|
| Report Abuse |
|
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
| |
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
| |
|
larr1212
|
  |
| Joined: 06 Jan 2015 |
| Total Posts: 259 |
|
|
| 26 May 2015 06:26 PM |
XD
And people argue that welds are the best thing for animations lol.
Weld animations cause physics lag plain and simple. |
|
|
| Report Abuse |
|
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 26 May 2015 06:28 PM |
Please, let's hear how else animations are possible on roblox. Anchoring all the parts and CFraming them all? Because that creates a similar effect, only 50 times worse and less efficient.
How do you think all ROBLOX animations are run? Motors and welds are the same. |
|
|
| Report Abuse |
|
|
larr1212
|
  |
| Joined: 06 Jan 2015 |
| Total Posts: 259 |
|
|
| 26 May 2015 06:39 PM |
| Your explanation is nice but doesn't explain why roblox animation don't lag :D |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 26 May 2015 06:46 PM |
The animation can lag for these reasons: -Welds are unanchored, physics are calculated, you have a slow CPU or network latency. -Too many events running at once, all in functions rather than coroutines, so it has to wait for other tasks to finish before updating. (An example of this is the slight lag found in my OpenFPS framework.) -Low Keframe animations. |
|
|
| Report Abuse |
|
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 26 May 2015 06:56 PM |
"Welds are unanchored, physics are calculated, you have a slow CPU or network latency."
The other two possibilities don't seem to apply, so how would I fix this?
|
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 26 May 2015 06:59 PM |
Get faster internet with less ping and/or get a CPU with more threads. It most likely has to do with coroutines though. |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 May 2015 07:02 PM |
the parts are local meaning all the physics are handled by the client; ping makes no difference on it
dont even know how coroutines would play into this |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 26 May 2015 07:04 PM |
Coroutines allow code to run 'side-by-side' If you're just using functions then depending on how the code is wrote, it might cause a pause in the code before 'updating.' |
|
|
| Report Abuse |
|
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 26 May 2015 07:06 PM |
This lag has nothing to do with scripting efficiency or the actual setting of the welds... That's all correct
It's the kind of lag like when you zoom into first person, and your hats remain visible for a few seconds. Delayed/stuck rendering lag, but I'm not sure what causes it. :/ |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 May 2015 07:06 PM |
physics are handled on the c engine not lua arent they that would only apply to his attempt of cframing each anchored part |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 26 May 2015 07:08 PM |
It's the kind of lag like when you zoom into first person, and your hats remain visible for a few seconds.
I'm pretty sure that's just latency, I could be wrong, but from what I've heard that's latency. |
|
|
| Report Abuse |
|
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 26 May 2015 07:09 PM |
| Sooo how do I make that not happen? :u |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 May 2015 07:09 PM |
in terms of welds, the c engine being overloaded on the client is what would stop them from rendering properly
when cframing each part individually even if there is lag, the frame wouldn't update until the code comes to some sort of halt, so every frame the parts should be in the correct spot unless your code has waits or some sort of event or whatever to reduce lag only problem is efficiency could be really bad and dramatically lower fps doing this |
|
|
| Report Abuse |
|
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 26 May 2015 07:14 PM |
| Rapidly CFraming parts causes the same render lag that rapidly welding causes, except much worse and flashy. And CFraming isn't even an option in the case of guns. |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 26 May 2015 07:17 PM |
| so basically there isn't an answer to your question, people either need to have good cpu power while playing the game or roblox would need to-- well this isnt going to happen lets stop there |
|
|
| Report Abuse |
|
|
drahsid5
|
  |
| Joined: 13 May 2011 |
| Total Posts: 3937 |
|
|
| 26 May 2015 07:20 PM |
| Actually latency has to do with the network, if it's just the hats getting in the way, then I'm pretty sure that's the network. o3o |
|
|
| Report Abuse |
|
|