question

mariogarranz avatar image
mariogarranz asked

Real-time multiplayer over NodeJS with socket.io for HTML5 games

So, I have developed a series of multiplayer games, always using generic hosting services (generic database, generic app server, etc.) and I was wondering if bringing everything into PlayFab could have some significant advantages for me.

In this specific case I will be working on a real-time multiplayer game for HTML5, so I need websockets. Ideally I want to develop it using socket.io over NodeJS, so I was wondering how easy is it to integrate this solution into PlayFab? Is it supported by default or does it have to be hosted on a generic hosting platform (Heroku / Azure / whatever) and then linked somehow?

Thanks in advance for your help!

Custom Game Servers
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

>> I was wondering if bringing everything into PlayFab could have some significant advantages for me.

We would recommend you migrate these data and services to Playfab according to the specific situations. “bringing everything into PlayFab” may not bring the significant advantages for a developer. What should be clarified is although PlayFab provides full authentication, commerce, analytics, etc. features, the services provided by Playfab are mostly in the form of APIs or the options in the GameManager. The advantage of using PlayFab is that it reduces the development time of back-end related features or LiveOps. But when using Data related services, generally, developers only can interact with the PlayFab database via APIs, cannot do the customized database operations. This may prevent you from manipulating the data as before. You can consider migrating some generic databases and generic app services to Azure then migrating some suitable features to PlayFab or re-build the features using PlayFab API directly. You can check this documentation to get started with Azure for Gaming and navigate to the Azure PlayFab documentationfor more PlayFab basic information. If you encounter specific using problems with PlayFab, welcome to post new threads to discuss them with us.

>> so I was wondering how easy is it to integrate this solution into PlayFab? Is it supported by default or does it have to be hosted on a generic hosting platform (Heroku / Azure / whatever) and then linked somehow?

Playfab provides the server hosting service Multiplayer Servers, which more suitable for the non-persistent server application scenarios. Besides, the multiplayer servers hosted on Playfab should be integrated with Playfab Game Server SDK used to connect your game server to the PlayFab agent installed on the VM. But the PlayFab Game Server SDK (GSDK) currently is provided in C++, C#, and Java versions, does not contain NodeJs. Hence, you can consider hosting the server on the generic hosting platforms. Using the Playfab server hosting services is not a necessary condition for using the Playfab Server API. No matter where you host the server, you can use the Playfab features through the Playfab Server API, or do event handling through Webhook. You also can Make Webhook calls from CloudScript to can make calls into any other web API you need to for your title.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]