kennylovecode Posted July 23 Posted July 23 I wrote a source code, currently in a semi-successful state. I copied a lot of things from other source codes. Now when my client logs into the source, everything seems fine, but when the character jumps frequently. It will drop frames or suddenly freeze. It's just that the screen feedback I get doesn't feel as smooth. I optimized a lot of code related to threads, but it seems that it hasn't improved anything. Quote
Spirited Posted July 23 Posted July 23 Hm. To me, that sounds like a graphics driver issue. Maybe you can try using a different server as a test and see if the problem still exists. I think that's been reported in the past, and the solution was replacing the custom animated cursors in the game with your system cursors, or hooking WndProc to override the GCL_HCURSOR value to set the cursor in WNDCLASS to the current cursor. Haydz described that process and provided a pre-made hook here: https://www.elitepvpers.com/forum/co2-programming/3142253-release-cursorhook-old-client-cursor-blink-lag.html. It doesn't say much, but it does say he hooked SetCursor to achieve that. Quote
kennylovecode Posted July 23 Author Posted July 23 I still haven't quite understood what you mean. Does the mouse cursor of the Conquer Online client affect screen smoothness? That's really hard to believe! I always thought it was a problem with my server code Quote
kennylovecode Posted July 23 Author Posted July 23 But my version is the newer client, and the English version number is estimated to be around 5700. Will it have these issues? Because I saw in the posts that it only has these problems with lower version clients. Quote
kennylovecode Posted July 23 Author Posted July 23 In fact, this problem is sporadic, only appearing when the character is constantly jumping, or when the character is doing something very frequently. So my analysis is that it was caused by the server's slow processing, and I never thought it was a problem with the client. Very confused Quote
kennylovecode Posted July 28 Author Posted July 28 I spent a lot of time debugging and found that it might not be a client-side issue. I suspect it could be caused by server-side threads. Therefore, I optimized all thread code to minimize deadlocks, lock contention, and exceptions that cause thread crashes, etc. But it still didn't work. When performing frequent operations on the client side, the screen would still freeze suddenly and then return to normal. I wonder if it's because there are too many threads? I will continue to explore Quote
kennylovecode Posted July 28 Author Posted July 28 yes. I have already tried and it is not the issue. And I have multiple sets of the same version of the source on hand, so logging in with the same client will not cause the same problem. So I guess it's a server-side issue, but it's difficult to reproduce and debug this problem Quote
Spirited Posted July 28 Posted July 28 14 hours ago, kennylovecode said: yes. I have already tried and it is not the issue. And I have multiple sets of the same version of the source on hand, so logging in with the same client will not cause the same problem. So I guess it's a server-side issue, but it's difficult to reproduce and debug this problem Can it be reproduced with another server project? I'm like 95% sure it's not a server problem. Quote
kennylovecode Posted July 29 Author Posted July 29 11 hours ago, Spirited said: Can it be reproduced with another server project? I'm like 95% sure it's not a server problem. I'll be try more project source .... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.