Closed caracal7 closed 5 years ago
Hi Dmitry,
I'm glad you like it!
It's still active, there is a rewrite underway (the branch you specified), but unfortunately I don't have a ton of time to devote to it right now. Let me know tho if you have any specific things you'd like me to address and I'll take a look.
Can you give me more information about this performance drop?
David
Hi, David.
Thanks for fast response. I make repo to show the problem: https://github.com/caracal7/gstest
If you open 2 browser windows and will refresh one of them, second window will work slower and slower and finally freeze but refreshed window is working fine and all new clients works fine first few minutes. By this point I think that problem is on the client side. Best way to wakeup freezed browser is stop server)
Sorry for my English...
Awesome! I'll take a look tonight and see if I can't figure out what's going on. Have a great day!
Well, I definitely can reproduce the issue. I'm trying to debug right now.
I suspect this might be a client issue unrelated to GameStream but in the demo I wrote, but I'll let you know when I have more info.
Maybe it's not related with GameStream. Maybe it's a problem with cannon.js or three.js. I tried to add performance meters to render loop and to physics loop. And I think this is more problem with physics. But I am not sure) Maybe bottleneck somewhere between GameStream and client Physics? I think about it because performance problem is disappeared if you stop the server then the browser is close to death.
I haven't discovered the root cause yet, but I have figured out that in fact there does appear to be some issue internally with GameStream and how it converts input states. It doesn't seem to be handling dead entities all that gracefully and continues to store (and process) references to the state of those entities long after they're dead, which really bogs things down when there are a lot of short-lived entities in the game.
I'll hopefully have more information tonight. Thanks for raising this issue!
I don't have a final fix ready, but I have discovered the source of the problem and have a test fix in place that keeps performance reliable. I'll get a final fix in within the next couple of days.
This is too funny. Looking over the project's history, my last commit to master, over two years ago was a fix to this very problem. I just never pushed out a new NPM package!
Doing so now :)
Alright @caracal7 , try updating GS to 0.0.22 and see if that fixes your issue.
(note, you may also need to tweak the logic that removes objects from the game when the upstream pipe has set their state to undefined)
Ok. Tomorrow I will try. Also I want to try merge GameStream with other physics engine.
Thanks 🙏
Hi @caracal7 just wanted to see if the problem has been fixed for you? If so I will close this issue.
no problems any more 👍 Thanks)
Gamestream is great and well implemented idea!
I've tried to replicate client-server example in real network environment and everything seem to work as expected but I have strange performance drop after few minutes of simulation. Another branch in this project look like not working yet.