Sign in to follow this  

Server too slow

This topic is 4204 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was trying to develop a multiplayer game and was working on the server and client.Both are working properly but are very slow. This is what actually happens. Consider, two clients connected to one server. When the client changes something in his machine(moves a player), the co-ordinates are instantly sent to the server. From server to remote machine, a delay occurs when the server window is not in focus. Well the focus problem occurs because I am debugging them on the same pc. Any explainations for this?? Will it sort out when server runs on different pc??

Share this post


Link to post
Share on other sites
You might be having some thread that is running at 100% of the CPU, which causes background apps to be scheduled less often.

So, first thing to do: look in the task manager for a thread that uses lots of CPU, and figure out why it's spinning when it should be waiting.

If your main thread runs at 100% CPU because it does the maximum frame rate rendering thing, you'll have to insert a Sleep() call to yield the CPU after you Present() your frame, to make the background threads run reasonably well.

Share this post


Link to post
Share on other sites

This topic is 4204 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this