Server.js VS imports/game.js

Howdy folks, running my game at www.StarCommanderOnline.com

I’ve been trying to reduce lag. When I started this project, I put all player movement in to /server/main.js

/server/main.js is responsible for moving all players.

My question is, if I put that logic in /imports/main.js, would the client now also do client movement, and sync to the server - reducing the apparent lag?

Yes, that’s possible. Have a look at how Meteor methods and “optimistic UI” works.

Ahh good. A quick google returns information.

Right now players click to move. If they click at the start of a new server tick, there is almost a 1 second delay before they move. I didn’t think it was a big deal, but my player base is complaining. I guess I’ll need to fix it.