mmo


how to implement a relative timer in a game


Our game is a MMO game, and our logic server has a game loop of course. To make these logical module easy to write, we provide a timer module, which support register a real timer and trigger it when it possible. In the game loop, we pass the system time (in millsecond) to timer module, and the timer manager will check if there're some timers can be triggered. For example, to update a player/monster position, when the player start to move, we update the player position every 200ms.
But when the game loop run too much logic, it will use too much time in a single frame, and the next frame, some timer will slower than the real time. That will cause some bugs actually. For example, if in one frame, it spent 1 second, and in the next frame, the real time is 1000ms, and the move timer has scheduled in 800ms, so the timer has been triggered at 1000ms, slower than the expected time.
So is there any better solutions to solve this problem ? For example, we can implement a timer, only dependent on our game, not dependent on the real computer time ?

Related Links

Myth of Soma MMO game Bot - Memory Address for Items on floor contains garbage and constantly changing info
How to make a MMO (server side)?
how to implement a relative timer in a game
What kind of database in regards to cap theorem should be used for an mmo?

Categories

HOME
asterisk
pact
url
weblogic
azure-eventhub
phantomjs
jquery-plugins
data-modeling
where
confluence-rest-api
checkpoint
procmon
zabbix
pyodbc
segmentation-fault
phpexcel
google-my-business-api
ndepend
osrm
eclipse-orion
minimum
popup
luis
greensock
civicrm
caldav
glibc
summernote
turn.js
ejb-3.1
lotusscript
expressionengine
stack-trace
large-files
dynamic-memory-allocation
pypy
urhosharp
epub
webclient
powerbi-embedded
aweber
extern
anypoint-studio
framebuffer
jvisualvm
google-cloud-powershell
ape-phylo
taiga
inner-join
api-key
synchronized
reqif
togglebutton
lucee
appcmd
boost-regex
nsalert
dynatable
scrollmagic
stripes
glade
distcc
syslog4j
objectify
avaudiorecorder
aws-kms
custom-build-step
apache2-module
clear
cascading
skscene
jcomponent
database-project
page-flipping
winforms-interop
playn
pdcurses
eula
bungeecord
strcpy
touch-typing
crtdbg.h
launcher
fxmlloader
grunt-contrib-connect
illegalargumentexception
nsnotificationcenter
pytz
javacompiler
banana-pi
traceur
android-jack-and-jill
nvcc
google-oauth-java-client
aspnet-compiler
extensibility
dynamic-expresso
removeall
feincms
inflate
android-memory
aspmenu-control
beep
datasheet
advanceddatagrid
cryptolicensing
html5-animation
netbeans7.0
database-agnostic
mdd
script-tag
cross-cutting-concerns
urlscan

Resources

Encrypt Message