0

I am building a game with unity3D that uses websocket to connect to one or more android controllers (made with html5 + js) for multiplayer. The actual version runs locally as a standalone app and works as intended, people can connect and play it locally as a multiplayer.

The problem is that now the scope was changed and they want the game to run totally on a webserver. I am trying to figure out if it is possible, what i will have to do and how much time\work will it cost.

The game is totally made to run as a standalone till now. The first thing will be to change it to a propper multiplayer(multiple instances). It has to be acessible from anywhere(run os a web server), he wants it to be in webgl and the same server must run multiple instances of the game.

Are those funcions possible to implement? Other things that i am forgeting(maybe work around some webgl limitations)?

Thank you all for the attention.

1 Answers1

0

For server side 3 choices,

  1. if you think there would be not much user (concurrent user not exceed 100 users.) You could use the build-in library from unity.

http://docs.unity3d.com/Manual/UNet.html

  1. However, if you want more users able to handle it and you have some budget on this things, try Photon:

https://www.photonengine.com/en-US/Photon

  1. If you do not have much budget but willing to learn on how to do it by yourself and setup everything on the server by yourself, try Socket.IO which is written in Node.JS. This is the hardest way but cheapest way to build and could be scale larger up to your knowledge. What I could say is higher the users, higher the complexity of the server will have to handle.

http://socket.io/

https://www.assetstore.unity3d.com/en/#!/content/21721

For client side, WebGL. I could not say much since different game has different requirement and WebGL is still only be able to play in the modern web browser only (Internet Explorer can use WebGL in version 11 only and then Microsoft Edge support it from start). If play on mobile, it can but it will lag a lot especially on old devices. since socket.io is originally invent for website so, I think you can adapt it when it's in opengl easier than other library. All I can say is please try export to WebGL and you would be able to see if your game able to play or not. Try on IE, any mobile device you concern.

Paiboon Panusbordee
  • 781
  • 2
  • 10
  • 26