I have never set up a game server before, but I was wondering if it would be reasonable to use a raspberry pi to host a websocket server and achieve multiplayer for a simple HTML5 game. I know that is it possible, but if I used a Raspberry Pi 2 Model B (with 1 GB of ram) to host my game, would it be fast enough for actual gameplay?
A Raspberry Pi is just a computer. It has a specific amount of compute power like any other server. For you to know whether it would suit your needs as a game computer, you will have to do a whole bunch of work understanding the realtime needs of your server (computation, storage access, memory consumption and networking) and build an understanding of what you need your server to do. All of this is very hard to do theoretically so probably what would be best would be to pick a very cheap server and get your game up and running on it and then start benchmarking and building test cases at load.
After doing a bunch of this benchmarking and running test cases at load, you will identify weak spots in your software. You then fix those weak spots in your software and repeat the process. Then, and only then, will you have some sort of idea whether the hardware you have is limiting you in some way or not or whether your current setup could reach your desired scale.
So, the moral of the story is to pick some convenient and relatively cheap platform to get your server up and running and then start measuring and testing from there. If you have a Raspberry Pi, already know it or just want to learn it, then it's a perfectly fine place to start. If your game goes to high scale and you are scaling up your server, I wouldn't expect you'd be running a high scale service on Raspberry Pi servers, but there's no harm in starting there. It can do a lot, it's just not as much iron as bigger servers when you need bigger iron.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments