SmartFoxServer Multiplayer Game Engine

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 release v2.19.0
    Main release notes (see all):
    [NEW] Tomcat i updated to version 9.0.70.
    [NEW] GeoLite database updated.
    [NEW] Extension Flood Filter added, which allows to configure Extension calls rate limits on a per-request basis.
    [NEW] In AdminTool’s login view, port and encryption checkbox are set automatically based on the URL protocol.
    [FIX] GameAPI sending an invitation from the server side raise an exception (using null as the inviter object).
    [FIX] AdminTool’s menu button on mobile devices partially not working due to notifications container covering it.
    [FIX] In AdminTool’s Dashboard module, server uptime slowly diverges if browser window is minimized or loses focus.
  • Latest server patch v2.20.2
    [NEW] Added public method getLastLocation() to MMOItem class.
    [FIX] Added support for multi-byte strings in SFSObject keys.
  • Client API v1.8.4
    [FIX] Revamped the internal UserManager for better support of Room multi-joins. This addresses several corner cases especially when using private UserVariables.
    [FIX] Issue with SmartFox.HttpUploadURI getter, which always returned the HTTP url, even when using encryption.
  • Examples Pack v3.0.0
    The latest version of our examples pack for Unity is now fully compatible with Unity 6.0+.
    All examples are also available as separate projects in the Asset Store: gotoAndPlay() - Asset Store
  • Overcast v1.0.0
    The latest Overcast update introduced SmartFoxServer Clustering and a number of new features and improvements. Our clustering solution provides automatic horizontal scaling, automatic load balancing, advanced cluster-wide matchmaking, advanced monitoring and management via SFS2X AdminTool, extended SFS2X client side API with new events and requests.
  • Blog - SmartFoxServer Roadmap
    With the new year we have started working on a set of major new features and improvements that will come to SmartFoxServer in due time. Find out what’s cooking.
  • Announcement - SmartFoxServer 3
    We’re happy to announce that SmartFoxServer 3 is coming soon. This is a new, major release of SmartFoxServer that provides a substantial upgrade with lots of new features, improvements and streamlining. Read more in this post.

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. SmartFoxServer: massive multiplayer game server for Flash, Unity, HTML5, iOS and Android games, MMO, virtual worlds and communities

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. SmartFoxServer: massive multiplayer game server for Flash, Unity, HTML5, iOS and Android games, MMO, virtual worlds and communities

Overcast - The SmartFoxServer Cloud
Overcast is a dedicated cloud-based hosting service for SmartFoxServer 2X that provides a complete stack to build and run rich multiplayer games at any scale.
With Overcast developers can deploy any number of SFS2X instances in the cloud, world-wide, with a simple web-based interface. Each instance runs in its dedicated server with unlimited CCU and provides 100% of the SmartFoxServer 2X features.
Overcast also introduces SFS2X Clustering, to add horizontal scalability to games and apps with new tools to manage a SmartFoxServer cluster in the cloud. It provides customizable Load Balancing and Orchestration, extended client and server API and lots more.

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. SmartFoxServer: massive multiplayer game server for Flash, Unity, HTML5, iOS and Android games, MMO, virtual worlds and communities

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. SmartFoxServer 2X documentation: introduction

Our white papers discuss the fundamental high level aspects of multiplayer programming, like performance, scalability, security, architecture and more. SmartFoxServer 2X documentation: white-papers

This video perfectly demonstrates how the Area of Interest works in SmartFoxServer 2X MMO API:

For more information on the project, check this post in our forum: Project Vague - A Sandbox MMO Adventure - smartfoxserver.com

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.

Still in Java right?

1 Like

Yes, but Extensions (through which you write your server-side game logic) can also be written in JavaScript.

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.

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.

2 Likes

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

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

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?

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.

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/

We just published a new version of the C# API (1.7.10) fixing a Room state inconsistency in case of Group subscribe/unsubscribe under a specific condition.
You can get the updated API at this url: SmartFoxServer: massive multiplayer game server for Flash, Unity, HTML5, iOS and Android games, MMO, virtual worlds and communities

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: SmartFoxServer: massive multiplayer game server for Flash, Unity, HTML5, iOS and Android games, MMO, virtual worlds and communities

Hey i have few questions .

  • How do you support load balancing web sockets ? does your server can be used as load balancer for TCP/UDP/WS?
  • do you have in your site some good mobile games architecture examples / tutorials ? to set up real mobile game
    MMO game ?
  • Does your server supports connection reconnect to save some kind of persistency?
    Thanks !

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

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.

  • Do you support synchronic (MT) connections? or only async ?
  • 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 .?
  • 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!

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 :slight_smile: 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 :slight_smile:

Hope it helps

With the end of 2018, in order to wish our Merry Christmas and Happy New Year to all our customers and friends, we’re happy to announce an amazing 25% discount promotion on all SmartFoxServer 2X perpetual licenses and add-ons! The promotion begins on Dec. 17th 2018 and will last until the end of the year.

To celebrate the New Year we are extending the Christmas promotion until January 15th., offering a 25% discount on all SmartFoxServer 2X perpetual licenses and related add-ons.

Best wishes for a Happy New Year!