MMO Application problem

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
forsfs09
Posts: 5
Joined: 09 May 2011, 05:51

MMO Application problem

Post by forsfs09 »

Hi,

I am creating a MMO application in which i need to keep a track of users who login in the application. Then after 2 users enter in room i need to begin the
app. The User object can only be saved on server side only... is their any way
to keep track of users and perform user interaction on client side.

Can this be done only on server side?

I am using SmartFoxServer 2X.

Regards
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

On the client side events are fired when users enter or leave rooms. When the USER_ENTER_ROOM event is fired you could check the total number of users, and if it is 2, do what you need to do.
Paolo Bax
The SmartFoxServer Team
forsfs09
Posts: 5
Joined: 09 May 2011, 05:51

Post by forsfs09 »

Hi,

Thnkx for reply ... I can now start the app when i get the user count in USER_ENTER_ROOM

But to call particular user object actions and to maintain the user interaction
so that the two users can be in sync do i need server side extentions.

Regards
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Usually yes.
Paolo Bax
The SmartFoxServer Team
imakeinternet
Posts: 8
Joined: 16 Feb 2011, 18:06
Location: Michigan, USA
Contact:

Post by imakeinternet »

forsfs09 wrote:Hi,

Thnkx for reply ... I can now start the app when i get the user count in USER_ENTER_ROOM

But to call particular user object actions and to maintain the user interaction
so that the two users can be in sync do i need server side extentions.

Regards
Absolutely. Think of the CLIENT side as like a simple application that responds only to events given from the server side extension. The SERVER side should always be responsible for keeping your clients information in SYNC and in return it should pass events to the correct clients to update them when this information changes.

You could technically keep everything on the client side, but it's not recommended. Handling server logic on client side usually leads to users hacking up the client to change variables and loads of other things. Leaving this on the server side eliminates this possibility.

Cheers,
Mike
Post Reply