RanvierMUD / ranviermud

A node.js based MUD game engine
https://ranviermud.com
MIT License
796 stars 247 forks source link

Comment incorrectly suggests that a tick is "every half second" #387

Closed markscho closed 3 years ago

markscho commented 5 years ago

Currently, when both tick interval is set for both entities and players, the default value is "100", which, if I understand the method correctly expects a value in milliseconds. So if you don't define anything (in ranvier.json), then it will just use the default value of 100. Since nothing is defined in the stock ranvier.json in terms of tickInterval, it uses the default, which is really every one-tenth of a second--not every half second. The stock ranvier.json does not provide any recommended tick frequency values.

I recommend updating the comment to remove the claim about what the interval would be, and then to provide suggested tick intervals of "500" (every half second) in ranvier.json for both entityTickFrequency and playerTickFrequency. I think this gets you what you were trying to achieve.

shawncplus commented 5 years ago

I'm confused about what you're saying. Are you saying the default should be a half second instead of a tenth of a second? Because 1/10th of a second is intentional. Half second intervals would be quite slow.

markscho commented 5 years ago

I tried to link the line of code, but anyway... Line 141 of ranvier says: // Ticks for effect processing and combat happen every half second

shawncplus commented 5 years ago

ahh yeah that's comment's ancient lol That's been there since before the rewrite so the comment just needs to be updated. The correct value is 100ms which is even a bit slow. Personally if I have a dedicated server I go even faster, 50ms sometimes 16ms ticks

markscho commented 5 years ago

I love dying quicker!