[[NEW]] SmartFoxServer 2X 2.8.0 released!
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
does OpenSpace work on MMO Room? Do you any sample on this?
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
jeff wrote:does OpenSpace work on MMO Room? Do you any sample on this?
We don't have plans to update OpenSpace so that it uses MMORooms. The reason is that OpenSpace has some limitations in the Editor when creating the maps. It is not possible to create incredibly large maps, or it would be impossible to edit them. In fact you are limited to maps with a size of 100x100 tiles maximum.
MMORooms are supposed to be use for much larger virtual environments. For the OpenSpace maps, regular Rooms behavior is more than enough.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
With the introduction of MMOItems, it is now easier to make NPCs AKA less coding on the developer's part. So very cool!
Here's to hoping we can have multiple AOIs and MMOItems in the same x,y,z location.
Here's to hoping we can have multiple AOIs and MMOItems in the same x,y,z location.
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
Multiple AOIs: it can already be done provided that you set the Room's AOI as the largest AOI you want to use. From server side you can dispatch all sort of events with a custom AOI that is <= Room's AOI. If you check the SFSMMOApi you will notice you can send all sorts of messages with a custom AOI.
MMOItems in the same x,y,z location I don't see any problem with this, besides the fact that visually it might create some confusion
MMOItems in the same x,y,z location I don't see any problem with this, besides the fact that visually it might create some confusion
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
I tried to convert your Python example to Java, but this is as far as I got.
Can we please get this example in Java?
Can we please get this example in Java?
Code: Select all
import com.smartfoxserver.v2.core.ISFSEvent;
import com.smartfoxserver.v2.core.SFSEventParam;
import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.entities.variables.Variable;
import com.smartfoxserver.v2.exceptions.SFSException;
import com.smartfoxserver.v2.extensions.BaseServerEventHandler;
public class UserVarsUpdateListener extends BaseServerEventHandler {
@Override
public void handleServerEvent(ISFSEvent event) throws SFSException{
User user = (User) event.getParameter(SFSEventParam.USER);
Variable variables = (Variable) event.getParameter(SFSEventParam.VARIABLES);
// doco says that variables should now be type List
// but trying to use a for-loop on it states that
// it is not Iterable
}
}
Last edited by Tulrath on 16 Dec 2013, 02:17, edited 1 time in total.
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
The two listeners should be separate classes just like in Python. In other words you need to define those as separate classes (in separate files) and then reference them in your Extension code.
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
Could you please provide this Python code in Java instead?
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
Here you go.
Make sure you create the package folder structure sfs2x.extension.mmo or modify the package declaration to suit your needs.
Make sure you create the package folder structure sfs2x.extension.mmo or modify the package declaration to suit your needs.
- Attachments
-
- MMORoomDemoExtension.java.zip
- (1.83 KiB) Downloaded 1094 times
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
Thanks for putting this together, Lapo, but I just can't get this to load
I have this in the Smartfox installation folder under the following path: /extensions/MMORoomDemo/MMORoomDemoExtension.jar
I have tried the following on the client:
Tried:
settings.Extension = new RoomExtension("MMORoomDemo","MMORoomDemoExtension");
Tried:
settings.Extension = new RoomExtension("MMORoomDemo","MMORoomDemoExtension.jar");
Here is the error I am getting (the "Class not found" message changes to match whatever I put into the "class" parameter above)
I have this in the Smartfox installation folder under the following path: /extensions/MMORoomDemo/MMORoomDemoExtension.jar
I have tried the following on the client:
Tried:
settings.Extension = new RoomExtension("MMORoomDemo","MMORoomDemoExtension");
Tried:
settings.Extension = new RoomExtension("MMORoomDemo","MMORoomDemoExtension.jar");
Here is the error I am getting (the "Class not found" message changes to match whatever I put into the "class" parameter above)
Code: Select all
16:29:27,417 INFO [com.smartfoxserver.v2.controllers.SystemController-1] api.SFSApi - User login: { Zone: BasicExamples }, ( Us
er Name: tester, Id: 0, Priv: 0, Sess: 127.0.0.1:50144 ) , Type: Unity
16:29:27,514 WARN [com.smartfoxserver.v2.controllers.SystemController-1] managers.SFSRoomManager - com.smartfoxserver.v2.except
ions.SFSExtensionException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: com.smartfoxserver.v2.exceptions.SFSExtensionException
Message: Class not found: MMORoomDemoExtension
Description: Failure while creating room extension.
Possible Causes: If the CreateRoom request was sent from client make sure that the extension name matches the name of an existing ex
tension
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.entities.managers.SFSExtensionManager.createJavaExtension(SFSExtensionManager.java:357)
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
The class name must be the fully qualified name, in other words <packageName> + <className>.
If your package is my.game.test and the class is TheGameClass you must use --> my.game.test.TheGameClass
If your package is my.game.test and the class is TheGameClass you must use --> my.game.test.TheGameClass
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
When I updated server to 2.8.0, I found out server does not send SFSEvent.USER_ENTER_ROOM, SFSEvent.USER_EXIT_ROOM to client has User.isItMe == true .
Everything works fine with SFS 2X 2.7.0 no matter AS3 client version.
Please let me know if something wrong here.
Everything works fine with SFS 2X 2.7.0 no matter AS3 client version.
Please let me know if something wrong here.
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
Hi,
SFSEvent.USER_ENTER_ROOM is never sent to the local User (isItMe == true), because upon entering a new Room he already receives a ROOM_JOIN event.
The event fires only when a new User joins a Room where the local User is already in.
Similarly SFSEvent.USER_EXIT_ROOM fires for every user leaving the Room, regardless the isItMe flag.
If the problem you are describing is something that can be reproduced we'd like to learn the details and see how it is done.
Thanks
SFSEvent.USER_ENTER_ROOM is never sent to the local User (isItMe == true), because upon entering a new Room he already receives a ROOM_JOIN event.
The event fires only when a new User joins a Room where the local User is already in.
Similarly SFSEvent.USER_EXIT_ROOM fires for every user leaving the Room, regardless the isItMe flag.
If the problem you are describing is something that can be reproduced we'd like to learn the details and see how it is done.
Thanks
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
If clientA send LeaveRoomRequest => all joined clients include clientA will be notified USER_EXIT_EVENT => OK
But in 2.8, when calling sfsApi.leaveRoom(userA, room) //server side
=> server will notify all joined clients EXCEPT userA.
I think something has changed in SFSResponseApi.notifyUserExitRoom in SFS 2.8.
thanks,
thanhbv
But in 2.8, when calling sfsApi.leaveRoom(userA, room) //server side
=> server will notify all joined clients EXCEPT userA.
I think something has changed in SFSResponseApi.notifyUserExitRoom in SFS 2.8.
thanks,
thanhbv
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
Hi,
I am sorry but there must be something else missing if the problem exists.
The scenario you are describing works without problems. I double checked to be sure but it was clear that calling from server side doesn't make any difference. The client request invokes the same Server API method.
Please check the steps you are doing to reproduce this issue. If you want you can send us a repro-case to our support@... email box.
Thanks
I am sorry but there must be something else missing if the problem exists.
The scenario you are describing works without problems. I double checked to be sure but it was clear that calling from server side doesn't make any difference. The client request invokes the same Server API method.
Please check the steps you are doing to reproduce this issue. If you want you can send us a repro-case to our support@... email box.
Thanks
- hoangdoanh
- Posts: 253
- Joined: 21 Jun 2013, 04:54
- Location: Vietnam
Re: [[NEW]] SmartFoxServer 2X 2.8.0 released!
Hi Lapo
We are having C++ client works with SmartFoxServer. Now we already upgraded to SmartFoxServer 2.8. Do we need to do something with C++ client ?
Thanks & regards,
Doanh
We are having C++ client works with SmartFoxServer. Now we already upgraded to SmartFoxServer 2.8. Do we need to do something with C++ client ?
Thanks & regards,
Doanh
Who is online
Users browsing this forum: No registered users and 71 guests