Often times server-side code requires a number of configuration parameters that can be easily tweaked without recompiling and re-deploying the Extension. In this article we will show a useful and little known feature of SFS2X’s Extensions. Continue reading
In this recipe we will take a look at how we can tweak the logging configuration in SmartFoxServer 2X in order to do advanced logging from Extension code. Continue reading
In this new recipe we’re going to take a look at how we can integrate regular HTTP calls with the SmartFoxServer runtime and specifically how to communicate with Extension code via HTTP GET/POST requests.
Common applications of the HTTP/Extension interoperability are debugging interfaces and administration UIs. With this approach developers can easily build a simple web interface that reports that game state, monitors data structures, users etc… allowing to quickly debug problems while testing, triggering events and so on.
In this article we’re going to build a simple Login Extension using EclipseLink in place of the default DBManager API provided by SFS2X.
EclipseLink is a powerful ORM (object-relational mapping) framework, that is compliant with the Java Persistence API (JPA) standard.
NOTE: the tutorial presupposes you have an understanding of the basic concepts of object-relational mapping and you’re familiar with at least one database technology. If you don’t have experience with these tools we recommend to check this introduction.
The trace(…) method is a useful little tool to log any information in the log files for debugging your Extension code.
It is available in the main Extension class and in every Request or Event handler. However, often times, developers need to log messages from other places in their code such as data classes, or any other object that doesn’t extend the Request/Event base classes.
How can we call trace(…) from somewhere else? Continue reading
Attaching an Extension at Room level is a convenient way to provide each game Room with its own logic. Different Rooms can use different code and manage their own game rules very conveniently. Continue reading