mazoku Posted January 6, 2020 Share Posted January 6, 2020 (edited) 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 January 6, 2020 by mazoku more info Quote Link to comment Share on other sites More sharing options...
8Observer8 Posted January 6, 2020 Share Posted January 6, 2020 (edited) 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 January 6, 2020 by 8Observer8 mazoku 1 Quote Link to comment Share on other sites More sharing options...
mazoku Posted January 6, 2020 Author Share Posted January 6, 2020 (edited) Thank you, thats nice info. Edited January 6, 2020 by mazoku 8Observer8 1 Quote Link to comment Share on other sites More sharing options...
freakxapps Posted January 7, 2020 Share Posted January 7, 2020 @Harish Kumar Show this to arbaz. Harish Kumar 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.