SFS2X Room Architecture
Posted: 14 Feb 2013, 21:50
I am coming from using electroserver background.
How I would set that up is to extend a class to do a custom room then place the java file in the extension.xml
I am just starting to work with rooms in smartfox2x and its different.
There is a zone plugin, and you can also have room plugins?
What I am trying to do is have users join a room for a battle, then when the battle is going on all users in the room will get messages for that battle.
The room obviously needs custom battle logic.
The way i see it i have 2 options
1. create a custom room plugin to handle the custom logic.
2. keep all the custom logic in the zone plugin's code and route requests through the room like
- user sends request to zone plugin, zone plugin goes to a battle handler class, battle handler class grabs the room using sfs2x api and sends request to all users in room
Whats the best way to do this?? Didn't see much in the documentation about exactly how it should work for 2FS2x just general documentation.
How I would set that up is to extend a class to do a custom room then place the java file in the extension.xml
I am just starting to work with rooms in smartfox2x and its different.
There is a zone plugin, and you can also have room plugins?
What I am trying to do is have users join a room for a battle, then when the battle is going on all users in the room will get messages for that battle.
The room obviously needs custom battle logic.
The way i see it i have 2 options
1. create a custom room plugin to handle the custom logic.
2. keep all the custom logic in the zone plugin's code and route requests through the room like
- user sends request to zone plugin, zone plugin goes to a battle handler class, battle handler class grabs the room using sfs2x api and sends request to all users in room
Whats the best way to do this?? Didn't see much in the documentation about exactly how it should work for 2FS2x just general documentation.