• Examples (iOS)
• Examples (Java/Android)
• Examples (C++)
Server API Documentation


» Development Basics

In this section we will guide you through the basic concepts of multiplayer development using SmartFoxServer 2X. From a generic perspective all multiplayer games and applications work very similarly regardless of their different genres (multiplayer action game, MMORPG, MMORTS, virtual worlds, etc).
In essence they all consist of clients connected via a persistent connection (using the TCP protocol) to a central server which is responsible for maintaining the game states and synchronize players with each others.

Under SmartFoxServer we use the concept of Zone to indicate a portion of the server dedicated to a specific application, allowing the developer to run multiple different games and apps without them interfering with each others.

You could think of Zones as different "virtual hosts" under an HTTP server, where you can run multiple web apps at the same time, in proper isolation.


» Three basic steps

An SFS2X client will typically follow a few simple steps to start the communication with the server:

  1. Attempt a connection with the server
  2. Login in one of the available Zones
  3. Send and receive requests to the server's "System Controller" or to the available Extensions and handle the server events

In this section of the SmartFoxServer documentation we will analyze each phase in detail providing code examples, suggestions and illustrating advanced options for each step.

» The Server controllers

Each time a client sends a request to the server he's talking to a Server Controller which is a service responsible for handling requests and sending user updates. Under SFS2X we have the following two main controllers.

The SFS2X client API takes care of directing the client requests to the appropriate controller behind the scenes, so there is no particular action required on the developer's end.