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

 

» SmartFoxServer 2X features overview

SmartFoxServer 2X takes the core SmartFoxServer philosophy and expands it in new directions, introducing hundreds of improvements and focusing on a few precise goals: simplicity of use, versatility and performance.

» Server core features

Fully multi-platform Runs on Windows (32/64), Linux (32/64) and other Unix-based variants.
Visual config and management No more messing around with XML. All configuration is done via the new Administration Tool (aka AdminTool) which also provides advanced realtime informations, runtime Zone/Room/User management, Ban management and lots more. The new AdminTool also offers a modular architecture allowing integration of third party plug-ins.
High performance network engine BitSwarm is version 3.0 of our ultra-light, high performance TCP/UDP socket engine providing unique features for multiplayer games:
  • highly scalable non-blocking design which beats most of the all-purpose socket engines in both stability and performance
  • further improved architecture and performance with lightweight memory footprint
  • low latency and minimized unnecessary buffer/memory copy
  • core support for Non-Player Characters (NPC) at Session level (socket-less)
  • pluggable Dropped Packet Policy manager
  • configurable threading model
  • high performance HTTP tunnelling for clients unable to establish socket connections (using our proprietary BlueBox technology)
  • transparent re-connection system which allows sessions to transparently reconnect to the application without loosing their state after and abrupt disconnection
Highly efficient protocol New binary protocol providing major improvements in server and network performance, delivering an average of 5x in encoding times and 6x in packet size reduction.
Enhanced security Many new security features are built-in:
  • login data is always transmitted via secure login mechanism to avoid password detection at the socket level
  • the Permission Manager allows to create any number of User profiles that allow different clients to access only a portion of the server features according to your custom rules
  • new Anti Flood Filter protects the server from flooding attacks and offers a fine grained configuration for each possible server request.
  • the improved Words Filter now supports regular expressions and white-list/black-list modes, offering a more flexible tool to filter profanities. The filter can be applied to public/private messages, Room and User names and accessed via simple API from server side code. It also provides events for logging and further customizations
  • an advanced Banning System provides tools for manual and automatico banning, persistence and fine-grained settings for each banned User
  • IP Filtering allows to control the maximum number of sockets coming from the same IP address
Painless dependency management Any additional Java dependency (database drivers, development libraries, etc) can be deployed in a snap without messing with the classpath. Just drop the files in the right folder and you are ready to go.
Effortless deployment Whether you deploy in the cloud or on a regular server, the setup process is simplified by the unfied installer supporting all 32/64bit architectures and providing installation of the software as a service.
BlueBox 2.0 Enhanced and now fully integrated BlueBox technology provides unbeatable performance for HTTP tunnelling. Provides connectivity to all those clients behind restricted network conditions.
Outstanding stability We strive to provide the best balance between performance and rock-solid relaiabilty. The server engine has been stress tested for thousand of hours under high pressure including crushing traffic, unreal request load, bandwidth and resource constraints, unstable networks with high packet loss, flooding attacks and more.

» Platform features

Rich client-server framework Rich client and server Framework with dozens of functionalities out-of-the-box: Session management, Room management, chatting, advanced lobby and Game Matching features, persistent Buddy Lists, moderation, server Variables and lots more.
Fully extensible Plug your Java server-side code to create complex interactions, advanced game logic, custom credentials checks and tons more. Server-side Extensions are the most powerful tool at your disposal to build your application. From a simple turn-based game to a massive virtual world or a fast real-time action game. Additionally you can use scripts to quickly test your idea or create a prototype and then convert it to fast Java production code.
Vastly improved Zone architecture SFS2X features enhanced configuration, Room Groups, improved Room management, fine-grained event configuration, better security filters integration and lots more.
Enhanced Room features Now Rooms support renaming, locking, resizing, hiding and more.
New Game API A new set of API provide powerful tools for match-making, game invitations and challenges, public and private games, custom player and game searches based on any numbers of custom parameters and tons more.
BuddyList 3.0 A refined Buddy List system provides richer server-side events, pluggable persistence, temporary buddies, online/offline status, nicknames, Buddy messages and more.
High-Resilient-Connections (HRC) System The HRC system provides transparent reconnection to unstable client connections allowing players to re-enter a game without losing their state. Indispensable for any betting or contest-based game.
Redesigned Java Extension API Vastly improved, simplified and better organized server-side framework including:
  • new server events
  • simplified development flow and deployment cycles
  • hot-redeploy of Java Extensions (no server restart needed)
  • simplified Class Loader management
  • simplified classpath management (auto-detection of jar files, no need to mess with the core classpath)
Match Expression Engine Allows clients and server to execute complex queries on Users and Rooms in order to extract very specific items. Matching expressions are chain-able and easily built using a natural syntax that mimicks programming languages.
SFSObject/SFSArray Highly flexible data structures used throughout the framework, they represent the client/server message contents at a high level. Additionally they allow to finely tune how each bit of data is encoded at the wire level, providing support for 20 different data types.
Server Variables Room Variables, User Variables and Buddy Variables allow to keep custom state for each entity on the server providing auto-updates to the interested clients. New advanced capabilities have been added such as the use of nested objects, global Room Variables and server-only Variables.
Database integration Unique and simplified way of accessing data sources based on the ODBC and JDBC standards including configurable connection pooling.
JMX management Provides remote management via the standard Java Monitoring interface, allowing to gather statistics and other runtime status and integrate them with external control panels and monitoring software.
Localized error messages Multi-language support for error-messages. All error messages are code-based. We provide English based description of each error and developers can add their own translations.
Logging and reporting Improved exception reporting with friendly messages and verbose description of issues. The use of Log4J allows improved flexibilty and provides tools for log analysis even from a remote location.

» Client features

Truly multi-platform SmartFoxServer 2X supports all major web-based and mobile technologies with a set of consistent API, allowing to create real multi-device access to your games and virtual worlds. Support includes:
  • Flash platform (Flash/Flex/AIR)
  • Unity (standalone, web-player, iOS/Android/Windows 8/Windows Phone 8 publishing)
  • iOS 4-5-6-7
  • HTML5
  • Java2 SE and Android
  • Windows 8
  • Windows Phone 8
  • .Net/Mono
  • Mac OSX
  • C++
High level functionalities The API hide all the low-level networking details, packet serialization, etc, providing very high level tools to the developer. Creating a Room, launching a game, starting a private chat, managing the buddy list, etc, are all performed in a few lines of code, without getting in the way of your application logic.
Largely improved Room management Room management has been improved under many aspects with respet to previous SmartFoxServer version:
  • better Room List management; the room list is now obtained at login time, eliminating an extra call to the server for the room list (getRoomList)
  • clients do not need to be in a Room to interact with the server anymore
  • Rooms not managed by the local Room Manager can now be joined by just knowing one of their IDs (room id or name)
  • ability to hide Rooms thanks to the isHidden flag
  • Room Variables can be seen from outside the parent Room by setting the isGlobal flag
  • the client can subscribe/unsubscribe to specific Room Groups to avoid listening for too many Room events
Advanced connection events The CONNECTION_RETRY and CONNECTION_RESUME events signal a temporary disconnection and relative re-connection success to the server. This allows the developer to know when the HRC system is performing the transparent auto-reconnection and freeze their game logic or provide feedback to the user accordingly.
Disconnection reasons The API can now be aware of various reasons of a disconnection such as:
  • manual: disconnection originated by the client itself
  • kick: user was kicked by the server or an administrator
  • ban: user was banned by the server or an administrator
  • idle: user was disconnected because he has been inactive for too long
  • unknown: a network error occurred
Flash components Included SmartFoxBits 2.0 UI components for quick design of Flex and Flash multiplayer GUIs.
Simplified workflow Simplified workflow and improved architecture allow faster development and easier coding.