🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

basic Multiplayer Online Interaction

Started by
4 comments, last by Ilan88 5 years, 11 months ago

Hello everyone!

I want to implement something very basic:

  • N users on N different computers to see a canvas with N dots. 
  • Each user controls a single dot with his arrow keys
  • Each user can see all other users' (and his own) dots moving around.
  • Once a user connects, a corresponding dot appears.
  • Once a user disconnects, the corresponding dot disappears.

 Can you please suggest tutorials, guides and frameworks for me to start learning to implement this?

P.S. I'm a CS graduate, my career path is Real Time / Embedded software, no real work with web / servers before. So if you can suggest relevant courses / bodies of knowledge that are required for this sort of thing, I would be most grateful :)

Thanks!

Advertisement

What have you tried already? What didn't work about it?

Hi frob!

Actually, in the meantime I found this tutorial which was very helpful:

https://www.pubnub.com/tutorials/javascript/multiplayer-game/

it gave me all the tools to do what I want.

I would still appreciate recommendations for an academic course / tutorial for basic networking that allows multiplayer games.

Recommendations for libraries / framework dealing with websockets would be also nice.

48 minutes ago, Ilan88 said:

I would still appreciate recommendations for an academic course / tutorial for basic networking that allows multiplayer games.

Recommendations for libraries / framework dealing with websockets would be also nice.

On your description it sounds like you are using a HTML5 canvas to render your dots. Then you are probably using javascript in your client. I have used Socket.IO for games and chatt applications and it works great. But i think it is most useful when you use a javascript in the backend/server (Node.js), of you use another language in the server i would use plain websockets instead. But i can recommend using Node.js + Socket.IO +  Express for this kind of task as it makes it really easy to implement the things you want. Socket.IO has great examples and documentation.

https://socket.io/docs

Good Luck!

Thanks MatsN! :D

This topic is closed to new replies.

Advertisement