I start with javascript MMORPG, which will work fine. Currently, I have created a demo to prove that I can move characters and communicate with them with each other, as well as see how each other moves live.
http://set.rentfox.net/
Now Javascript timers are something that I have not used widely, but from what I know, correct me if I am wrong, is that running multiple setIntervals at the same time does not work b / c very well. one thread.
Suppose I wanted 10 different people to fire fireballs at a monster using a positional focal position using setInterval - for this animation, 10 setIntervals would be needed to redraw the DOM to offset the background coordinates of the sprite. Wouldn't that be a big mistake?
I was wondering if there is a way around this, possibly using Canvas, so the animation can happen simultaneously without creating an event queue, and I don't need to worry about timers.
Hope this makes sense, and please let me know if I need to clarify.
javascript javascript-events timer settimeout setinterval
resopollution
source share