SFS2X Docs / ExamplesJS / introduction
Each tutorial analyzes a single example, describing its objectives, giving an insight into the SmartFoxServer features it wants to highlight and providing the direct link to download the source code, which includes all the assets required to run it (both client and — if needed — server side assets). Where necessary, code excerpts are provided in the tutorial itself, in order to better explain the approach that was followed to implement a specific feature. At the bottom of the tutorial, additional resources are linked if available.
The tutorials are ordered following the increasing complexity of the examples they refer to: we go from the simplest application we could think of, which just shows how to connect to SmartFoxServer, to some fully-featured games, both turn-based and realtime.
Unless otherwise noted inside the tutorials:
- all examples are distributed in a single package; the same download link is provided in all the tutorials;
- the main folder of each example in the package is referenced in its tutorial using this icon: ;
Due to local content loading, the Tris and Simple MMO World examples don't work properly if their html file is loaded in Internet Explorer 11 or Google Chrome by double clicking it. Both issues do not occur if the examples are deployed in the SFS2X internal web server.
The examples require SmartFoxServer 2X v2.13 (or later) and the WebSocket (WS) communication to be enabled. By default this is disabled, so before running the examples make sure you activate the WS protocol in the AdminTool's Server Configurator module, under the Web server tab.
All other settings can be left unchanged, as the examples use the default port settings.
Time to click on the first example in the sidebar... enjoy the reading!