How to use the SmartFoxBits 2X

Together with SFS2X we provide the latest version of our SmartFoxBits components, which can save you a ton of time in setting up the application GUI if you are using the Adobe Flash platform to build your client.

The base SmartFoxBits pack contains five components:

  • Connector: manages the connection/disconnection process (supporting the new reconnection system too)
  • Login: handles the login process
  • RoomList: manages the Rooms list, including the Groups feature (allowing to create multiple views of the list based on groups)
  • UserList: manages the user list allowing private chat
  • ChatBox: provides a basic chatting component

You can check all the details and read the documentation on the SmartFoxBits page.

 

How to create an Extension based custom login

Implementing a custom login on the server-side is a simple process. SFS2X fires the following two login events.

  • USER_LOGIN: fired when a client requests to join a Zone. Here we can validate the client credentials and decide if the User can continue the login process. At this stage the client is represented by a Sessionobject, not by an SFSUser object yet.
  • USER_JOIN_ZONE: notified when a client has successfully joined a Zone (and is turned into an SFSUser).

Continue reading

How to setup a connection to an external Database

SFS2X allows connecting to databases in a way that is very similar to its predecessor. All you need to do is downloading the JDBC connector from your Database vendor (e.g. MySQL or MSSQL) and drop the .jar in the {SFS2XRoot}/lib/ folder.

Of course if you use ODBC instead of JDBC you can even skip the driver deployment step. In fact the ODBC driver is already provided by the Java Runtime.

The following is a list of pages where you can find the JDBC drivers for the most common RDBMS:

The next step is running the SFS2X AdminTool, launch the Zone Configurator module, select your Zone and finally click on the Database manager tab to edit the configuration.

db setup dialog

At the end of the process click Submit and restart the server.

How to add new Java libraries or Extension dependencies

Adding new libraries in SmartFoxServer 2X is a breeze. No messing around with the classpath is required: all we need to do is deploy the .jar file(s) in the proper directory and restart the server.

There are two folders that we recommend to use:

{SFS2XRoot}/extensions/{the-extension-name}.
This is where we will typically deploy our main Extension .jar file. The jar file should contain only our Java code without the external dependencies, if any. The reason why the dependencies should be deployed separately is that if they are shared, they will be loaded once for all Extensions that use them.

{SFS2XRoot}/extensions/__lib__/
This folder is recommended for libraries that will be shared by multiple Extensions in your system. For example the “Google Collections” jar, or the Hibernate jar, etc. Do not add your Extension jar to this folder, because the AdminTool won’t ba able to detect it when you setup the Zone/Room configuration.

 

Celebrating 10 years!

Ten years ago, in late November 2004, we launched our first commercial version of SmartFoxServer, the Basic edition, which was soon followed by the PRO version in early 2005.
To celebrate the 10 years of activity, and in conjunction with the holiday season, we’re happy to announce an amazing 20% discount campaign on all licenses and license upgrades available in our online store.
The promotion will last until the end of 2014 and it will cover all our server products, including:

  • SmartFoxServer Basic
  • SmartFoxServer PRO (including BlueBox add-on)
  • SmartFoxServer 2X (including Analytics add-on)

Visit our online shop to see all the discounted prices, and make sure to take advantage of this unique offer!

SmartFoxServer 2X 2.9.0

20140708_release_29A new SFS2X update is available with new powerful features and fixes discussed in the support forums recently:

  • Improved scalability and thread management via Auto-scaling Thread Pools. No more need to fine tune threads by hand
  • BlueBox v3.0: revamped and improved edition running on the latest Jetty 9
  • Integrated file uploads
  • Added support for websockets over SSL (WSS)
  • AdminTool: Extension Manager module, allows to manage, upload and deploy Extensions directly from the Admin GUI
  • AdminTool: administrators can now be given access to a selection of modules and server halt/restart permissions

… lots more …

You can read the full release notes and download the installer from here.
Also check the latest HTML5 client API supporting the WSS protocol and the porting of the SpaceWar game to Unity (available in the Unity examples package).

More MMO API goodies!

20131222_spacewar_icoWe have added new articles and tutorials for our latest MMO API, released in SFS2X 2.8.0:

  • SpaceWar game tutorial provides a detailed walkthrough to building a realtime action game integrating physics, authoritative server, lag hiding techniques and Area Of Interest to provide a seamless gaming experience for hundreds of players.
  • MMO Demo Unity tutorial introduces the MMO API for Unity developers showing the basic concepts and features included in SmartFoxServer 2.8.0.
  • Advanced uses of the MMORoom and MMO API provides various advanced tips and tricks for developing with the MMO API on the server side.