Jump to content
  • Advertisement
Sign in to follow this  
James Sherriff

HTML5 Canvas / Node.js / Socket.io networking pointers

This topic is 686 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everybody, this is my first post so I'm sorry if it's not easy to understand.
Last week I went through a tutorial on how to make a basic HTML5 Canvas game using JavaScript.
I decided to expand upon that game by making it multiplayer with a Node.js/Socket.io server.
The gameplay is currently laggy except for when I run the clients and server locally (Narrowing the problem down to bad networking).
I was wondering if anybody could take a look at the game and code (Github repo provided) and tell me where I'm going wrong with my networking and what I could do to improve it.
 
I'm sorry for my terrible and messy code, I'm learning :)

 

Game - http://quiet-brook-59546.herokuapp.com/
Github - http://www.github.com/XyreJamesyoui/html5game

Edited by James Sherriff

Share this post


Link to post
Share on other sites
Advertisement

It's not too laggy really, just you need some client-side interpolation code - right now the position only changes when it receives a new packet, so between packets the player doesn't move. I'm sure further googling on the topic of client-side interpolation will guide you in the right direction.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!