Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

9 years ago by AndrewMast

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.

9 years ago by AndrewMast

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

9 years ago by AndrewMast

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?

9 years ago by AndrewMast

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 »