Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Something of use to everyone.

Custom Title Activated
Loyal Member
Joined
Mar 26, 2012
Messages
1,465
Reaction score
131
For the last 2 weeks, I have been noticing issue of my client freezing and not being able to resolve the issue.
What I found was that in Windows 10, the screen saver and lock was the culprit and a major issue for the client freezing after escaping the screen saver and returning to the game in the operating system. I don't claim to be any kind of programmer nor do I promise this will resolve anyone else's issues but, I wanted to share my findings.

My first attempt to keep the client alive was any kind of autoit system like ahk, macros and etc...
This proved fruitless and wasn't a good guarantee to keeping the client alive. Plus part of the time the autoit program had to keep the game window active on top of other screens. This is quite annoying if you want to work with other projects and ideas. My other attempt was to use my keyboard with macros but, all I could do was to send text to the client and that did prove to work but, again a pain in the arse because of keeping the client on top of all other applications.

So in the end, with lots of research, I found my answer. This little bit of coding, along with use of the auto AFK system in Virtuous files(courtesy of Ketchup for the heads up), I found a way around this issue. It resets the screensaver timer while the client is opened and allows the client to maintain its' live connection with the server. I hope that this will be of use to others the way it has worked for me.

int timeout;
if(SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, 0, &timeout, 0))
SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT, timeout, NULL, 0);

This code must be called periodically to keep the screesaver from activating. I would suggest every 30 seconds or so. But, if you have any other ways to call this in the client to make it more efficient, I would greatly welcome it. Thank you for hearing my ranting and raving.
 
Last edited:
Back
Top