Hello,
I have a multiplayer game with node.js that lags a bit. (
Download)
Any recommendations?
To run the game:
1). Open a console window. (cmd or Terminal).
2). Navigate to the "game" folder.
3). Run the command "node server/app.js"
4). Open "client/index.html" in a two browser windows.
Notice that when you move one guy in one window (WASD), it lags on the other window some times.
-Andrew
9 years ago
by Joncom
Are you updating state via sockets every certain number of ticks or based on some sort of interval? If so, it's possible that you could be seeing an amount of lag less than or equal to the duration of that interval...
And to resolve that you'd either need to transfer the data as soon as a change occurs, or shorten the duration of the interval.
Right now I have it update every other tick.
Will try to update as soon as changed. Don't really know how to do that though.
-Andrew
Quote from Joncom
Are you updating state via sockets every certain number of ticks or based on some sort of interval? If so, it's possible that you could be seeing an amount of lag less than or equal to the duration of that interval...
And to resolve that you'd either need to transfer the data as soon as a change occurs, or shorten the duration of the interval.
Any suggestions from looking at the code? (Under src)
-Andrew
9 years ago
by Joncom
I don't see any lag on my end. Would you mind providing more information please?
Quote from Joncom
I don't see any lag on my end. Would you mind providing more information please?
It is probably just my computer. I am having problems with the "send on change" thing, so I am changing back to what I had.
-Andrew
Page 1 of 1
« first
« previous
next ›
last »