Jump to content
  • Advertisement
Sign in to follow this  
rogerdv

entity refreshing interval

This topic is 4331 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

Im writing a mmorpg server and at first stage I decided to use an entity refresh interval of 2 seconds. That means, every 2 seconds each entity (player or NPC) is checked, life/mana regenerated, if NPC, AI script is executed, etc. But after some test I found that perhaps, under heavy load situation, server wont be capable to check all entities in less than 2 seconds. My question is, can I increase refreshing time to 4 or 5 seconds or should I try to optimize it to fit the 2 seconds interval?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by rogerdv
My question is, can I increase refreshing time to 4 or 5 seconds or should I try to optimize it to fit the 2 seconds interval?


Whether or not you can make it 4-5 seconds is entirely in your court. Would your AI, when updated only every 4-5 seconds still work? I don't know, you tell me; that's extremely game specific.

As for whether or not you should optimize it, generally always yes. If your AI code was 2x faster you could either: do double the amount of AI, do the AI in half the time, or use the extra cycles for something else.

-me

Share this post


Link to post
Share on other sites
You should have (at least) two priority levels for entities: things with which a player is currently interacting, which should be updated frequently and guaranteed, and general world stuff which can be updated infrequently. Some things will need updating often, some rarely; a universal update time is inefficient.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!