SmartFoxServer2x Extension Programming

Extension:- Extensions are a fundamental element in SmartFoxServer 2X, they open a world of limit less possibilities for developers to create their custom game logic and integrate other technologies to support their project.

The Extensions architecture is that developers can plug a single Extension to their Room or Zone.

> Few Things About Extension.

  • Extensions are written using java and python.
  • Every Zone will have an extension program to interact/access the zone dynamically.
  • Every Room will have an extension program to interact/access the Room dynamically
  • We can attach Only one Extension to Room or Zone.
  • Java Extensions are deployed in a single .jar file to a folder which represents the name of the Extension.
  • Extensions are placed in server side with the folder named 'extensions' in SFS2x.
  • An Extension has to be seen as a Java program containing all the logic of your server application. Using simple object OOP practices you can separate the concerns of your code just as you would if you were writing a stand-alone application. The new Extensions API will also assist you in this accomplishment with a new set of tools.

Extension API:-using extension api we will write the extension programing. There are two main classes that provide the base for any extension that we will create

  • BaseSFSExtension :- An Abstract class which implements ISFSEventListener
  • SFSExtension :- If a java program to term as Extension program it must extend and implement SFSExtension class.
Copyright © 2018-2020 TutorialToUs. All rights reserved.