Jump to content

Game server question


mazoku
 Share

Recommended Posts

I have two questions about implementing game servers for simple html5 games. 

First question Node(eventually colyseus) vs C++ server? What are your reasons for one or the other?

Second - any free hosting (vm or whatever) for testing purposes? 

Edited by mazoku
more info
Link to comment
Share on other sites

2 hours ago, mazoku said:

Second - any free hosting (vm or whatever) for testing purposes?

Heroku and OpenShift. I use Heroku. You can connect Heroku and GitHub. Heroku will automatically reload files from GitHub when you push. Read this step-by-step instruction how to deploy on heroku: Getting Started on Heroku with Node.js | Heroku Dev Center

2 hours ago, mazoku said:

First question Node(eventually colyseus) vs C++ server? What are your reasons for one or the other?

Node.js, C++, C#, Java, or even C and Assembler - it does not matter because of network latency. But I like to use TypeScript instead of JavaScript. But Node.js has free hostings and it is more easy to start with socket.io You can use one language on server and client and you can share the same classes with server and client. I use TypeScript on server and on client and share some general code between them.

I recommend to start with this article: http://buildnewgames.com/real-time-multiplayer/
You can run and test in two browser windows an example from the article that I upload on heroku: https://battle-world.herokuapp.com/?debug
Source Code on GitHub of the example from the article: https://github.com/FuzzYspo0N/realtime-multiplayer-in-html5

This book shows how to write Tic-Tac-Toe and Snake Games with multiplayer using WebSockets and socket.io: Multiplayer Game Development with HTML5

This book is good but it uses WinSock and C++ with SDL2 for graphics but it is useful for general understanding of basic concepts how to compensate of network latency: Multiplayer Game Programming: Architecting Networked Games (Game Design)

Or maybe this video is more simple to start:

1- Making Multiplayer HTML5 Game: Setup & Sending Files. NodeJs Tutorial Guide

 

Edited by 8Observer8
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...