Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Nominations have been announced for this years Unity Awards. Celebrate the wonderful projects made by your peers this year and get voting! Vote here!
    Dismiss Notice
  6. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

SmartFoxServer Multiplayer Games Engine

Discussion in 'Connected Games' started by g_a_p, Oct 12, 2018.

  1. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    Since 2004, SmartFoxServer is a comprehensive SDK for rapidly developing multiplayer games in Unity. It comes with a rich set of features, an impressive documentation set, tens of examples with their source code, powerful administration tools and a very active support forum.
    Thanks to its simplicity of use, versatility and performance, SmartFoxServer currently powers hundreds of projects all over the world, from small chats and turn-based games to massive virtual worlds and realtime games.

    In this thread we will keep the Unity community updated on the latest news and releases of SmartFoxServer. You can also follow us on Facebook or Twitter.

    Latest news and updates
    • Server patch v2.13.4
      [NEW] Added support for allowed websocket origins.
      [FIX] Improved BlueBox performance via dedicated thread pool.
    • Client API v1.7.11
      [FIX] Inconsistency in flag indicating UDP availability.
    • Examples Pack v1.3.0
      All examples updated to the latest API version
    • Blog - Security for HTML5 games
      In the latest article we show how to use and configure websocket origins in SFS2X to better secure HTML5 games. We also take a deeper look at the issue of cheating clients and propose several ideas to improve the security of your online games.

    SmartFoxServer 2X
    SmartFoxServer 2X is an authoritative server based on a custom high-performance and scalable architecture that can handle tens of thousands of clients even on commodity hardware.
    It is fully expandable with your custom game logic written in Java or JavaScript and it provides integrated support for database connections, a fast and highly optimized network protocol with compression and SSL support, HTTP tunneling for clients behind proxies and firewalls, embedded HTTP server for web content and tons more. https://www.smartfoxserver.com/products/sfs2x#p=features

    The Community Edition gives full access to the platform for free and without time limits. It allows 100 concurrent users and provides 100% of the features. https://www.smartfoxserver.com/download/sfs2x

    Client API for Unity
    The client C# API is distributed in the form of three DLL libraries to be used in conjunction with each other inside Unity to cover all its building targets. https://www.smartfoxserver.com/download/sfs2x#p=client

    Documentation
    The comprehensive online documentation covers all aspects of multiplayer development with SmartFoxServer. http://docs2x.smartfoxserver.com/

    A series of tutorials for the Unity platform provide an insight into features of increasing complexity, starting from the basic connection to a full-fledged realtime game with MMO capabilities. http://docs2x.smartfoxserver.com/ExamplesUnity/introduction

    The examples described by the tutorials are also available in the Asset Store as a single showcase package. https://assetstore.unity.com/packages/tools/network/smartfoxserver2x-multiplayer-sdk-17261

    Our white papers discuss the fundamental high level aspects of multiplayer programming, like performance, scalability, security, architecture and more. http://docs2x.smartfoxserver.com/Overview/white-papers
     
    Last edited: Nov 22, 2018
  2. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
  3. Twist01

    Twist01

    Joined:
    Jan 21, 2017
    Posts:
    48
    I don't think I'm understanding this.
    So smaetfox can be a sever without paying for anything extra correct?
    But then in the doc it shows smartfox just handling all the play information and a cloud sever that we pay for is connecting the players.
     
  4. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    1,942
    Still in Java right?
     
    e199 likes this.
  5. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    Yes, but Extensions (through which you write your server-side game logic) can also be written in JavaScript.
     
  6. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    SmartFoxServer 2X has a free Community Edition which is full-featured but accepts max 100 concurrent users. If you need more concurrent users, you can buy a commercial license (perpetual or elastic).
    It is not clear what you mean. Can you please rephrase? Thank you.
     
  7. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    1,942
    As I understand it the original SmartFox was also in Java, and I do understand why you guys kept it in Java, but with that said: I think it's a massive hinderance to games being developed in Unity, simply because C# code can be shared between the Unity game client and a server running on something like .NET Core which performs incredibly well, and this cuts down development time/effort and reduces potential bugs as you have less duplication of code needed to be done for two different languages.
     
    e199 likes this.
  8. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    While I agree that using the same language on both sides can be convenient, it looks like you're making a number of unwarranted assumptions.
    In our experience it's far from a "massive hindrance" to use a different language on client and server side (just as it isn't, for example, in web development). We have talked to hundreds of customers who use different environments for client and server side and:

    a) this has never been a major issue in development
    b) the amount of client code that can be reused verbatim on both side is a minor portion

    In a Unity game many of the client side game objects/classes would depend on Unity stuff such as extending MonoBehavior, reading transforms, accessing the Scene etc... all operations that can't be translated on the server side.

    Also server side classes representing client entities usually need a smaller subset of properties to represent them on that side, so a rewrite is typically necessary. This is also true for methods, as you will need different behaviors for the same entity, based on which side you're on (i.e. you don't want your client/rendering methods on server side and you don't want your server logic in the client classes).

    Finally you have the non-trivial difference where Unity runs essentially mono-threaded, while the server side necessarily requires parallel execution, with all the implications that this entails. So once again code needs to adapted.

    my 2c
     
  9. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    SmartFoxServer 2X Patch 2.13.4 is now available for download.

    Release notes
    [NEW] Added support for allowed websocket origins. Provides extra configuration parameters under ServerSettings > Web Server, to specify which origins are allowed to connect via websocket. Useful to protect against connections coming from URLs other than those hosting the actual game/app.
    [FIX] Improved BlueBox performance via dedicated thread pool to avoid a corner case interference with socket engine performance.
    [FIX] Websocket max message size is now synchronized to the maxIncomingPacketSize parameter found in config/core.xml.

    Download the SFS2X 2.13.4 patch from here
     
  10. Twist01

    Twist01

    Joined:
    Jan 21, 2017
    Posts:
    48
    what i meant is, smart fox hosting the servers or will we have to host own with one of the hosting service you support/advertise?
     
  11. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    We don't provide the hosting service. You can install SFS at any hosting service of your choice. We advertise a few on our website, but you are not forced to go with those.
     
  12. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    New blog article: Security for HTML5 games

    In this new article on our blog we show how to use and configure websocket origins in SmartFoxServer 2X to better secure HTML5 games. We also take a deeper look at the issue of cheating clients and propose several ideas to improve the security of your online games.
    https://smartfoxserver.com/blog/security-for-html5-games/
     
  13. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
  14. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    Thanks to the feedback of a user on our support forum, we spotted a minor issue in the client API, where a flag indicating if UDP is available was inconsistent with the actual behavior. So we just published v1.7.11 to fix it.
    You can get the updated API at this url: https://www.smartfoxserver.com/download/sfs2x#p=client
     
  15. umen

    umen

    Joined:
    Oct 2, 2012
    Posts:
    17
    Hey i have few questions .
    1. How do you support load balancing web sockets ? does your server can be used as load balancer for TCP/UDP/WS?
    2. do you have in your site some good mobile games architecture examples / tutorials ? to set up real mobile game
      MMO game ?
    3. Does your server supports connection reconnect to save some kind of persistency?
      Thanks !
     
  16. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    It depends on what king of load balancing you are thinking about.
    If you mean a way to separate users connected to the same server into separate Rooms (lobbies, for example), this can be easily achieved using server side Extension.
    If, instead, you are referring to a way to redirect users to different servers, we don't have a built-in solution. Depending on the game type there can be many different ways of distributing users that is pretty difficult for us to provide a generic enough solution for multiple use cases.

    We have a good number of tutorials and examples in our documentation website: http://docs2x.smartfoxserver.com/ExamplesUnity/introduction
    They are not specifically targeted at mobile devices (even if some of them work fine if deployed to a device) because their purpose is to describe specific features of SmartFoxServer. Creating a full game for mobile would have additional requirements (for example adapting to different screen sizes, or implementing on-screen controls) that would make the code more complex, an useless for the purpose of teaching how to use SmartFoxServer.

    Yes, we have a pretty advanced reconnection system. You can read all the specs at this url: http://docs2x.smartfoxserver.com/GettingStarted/reconnection-hrc-plus
     
  17. umen

    umen

    Joined:
    Oct 2, 2012
    Posts:
    17
    Thanks allot for your answer , i took the time to read thru your documents , and they great . few more question which have been unclear to me.
    1. Do you support synchronic (MT) connections? or only async ?
    2. Do you support UDP ? if yes do you wrap it with TCP like interface so the API is the same ? can you point me to documentation .?
    3. what is your recommendation for mobile MMO game ? in terms of protocol ?
      UDP or TCP or WS? does all of them supported by your HTTP tunneling tech fall back?
      This subject is most interesting to me , as im beginner in the mobile land and i like to know what is the best way to do it , do you have resources / info about the subject ?
      Thanks!
     
  18. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    61
    Sorry, I don't know what do you mean by that exactly. Connections are neither synchronous nor asynchronous they simply abstract a low level network session.

    Maybe you're referring to the general programming model? If so, the SmartFoxServer API are event based, therefore asynchronous, meaning that when you send a request/message your current thread does not block to get an answer, instead you will receive an update later when the server replies.

    Yes we support UDP.
    Our API are high level, so you don't deal directly with low-level network details, instead you send requests and you can specify whether to use TCP or UDP via a simple flag. So to answer your question more directly, yes you don't need different code to work with either protocol.

    It is a very broad question. There are many different events going on in an MMO. For instance chat messages need to be delivered reliably so TCP should be used, while position changes may or may not need to be reliable based on the type of game.
    For example in our FPS example we use UDP as we employ a very high update rate and we can compensate for packet loss in exchange for faster updates.

    If you use WS you don't need HTTP tunnelling as WS is already part of the HTTP protocol.
    Other than that, yes.

    From a server side perspective mobile or non-mobile doesn't make much of a difference. They are all computers connected over the same networks :) So the distinction is kind of moot.

    Most of the time this distinction is more meaningful when talking about the client/rendering side because you need to keep in mind the limited cpu/gpu resources.
    This is to say that 95% of the material you find in our documentation applies to any device, be it mobile, semi-mobile (laptops?) immobile :)

    Hope it helps