About blog "Best of both worlds: SFS2X + server side Unity for realtime games"

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

ojuergen
Posts: 8
Joined: 23 Feb 2017, 18:11

About blog "Best of both worlds: SFS2X + server side Unity for realtime games"

Postby ojuergen » 03 Jun 2018, 11:02

Hi guys,

First of all, thanks to the SFS team for the two highly interesting blog entries!
(For those who have not read the blog entries, check them out:
https://smartfoxserver.com/blog/best-of ... -games-p1/ )

I have been working a lot on a very similar solution for quite some time now. One major difference is that I pipe all traffic through the SFS and there is no direct connection between the clients and the server-side unity game. There is no good reason for this, other than I didn't think of it and don't know how to do it.
The additional latency for this is not too large, as SFS and the Unity server are running on the same machine. However, it requires the unity client to serialize all data it sends to the server into SFSObjects that are deserialized and reserialized on the SFS, just to be deserialized again on the unity server.

Now my question is: How would a client connect directly to the unity server? What protocol would one use to realize this?

thanks and best regards
Ole
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: About blog "Best of both worlds: SFS2X + server side Unity for realtime games"

Postby Lapo » 04 Jun 2018, 08:13

Hello,
ojuergen wrote:Hi guys,
I have been working a lot on a very similar solution for quite some time now. One major difference is that I pipe all traffic through the SFS and there is no direct connection between the clients and the server-side unity game. There is no good reason for this, other than I didn't think of it and don't know how to do it.

Why not using the NetworkManager or NetworkServer (or NetworkServerSimple) for that purpose?
They are native to Unity and there's no overhead added for the serialiazion which is a big deal for action games, especially on mobile.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 65 guests