hi
I have a game that contains characters But When I move the character The rest of the players do not see this But I see that I'm moving
And the same for all players
Is there anything I can try on server side to solve this problem
Move the character Problem
Re: Move the character Problem
Hi,
it depends on how you have implemented the movement.
A simple way to do this is to use UserVariables. These are custom variables that can be created for every players which are auto-updated for all players in the Room, meaning that if Player1 changes his UserVars all other players in the same Room will receive an update about it.
For instance: you can add an X and Y UserVariable to each player and these values will be broadcast any time they are changed via the SetUserVariableRequest() from client-side. This means that each game client will receive the other player's position changes and therefore they can be updated on screen.
You didn't mention which platform you're using. If it's Unity I'd recommend checking this tutorial:
http://docs2x.smartfoxserver.com/Exampl ... t-movement
If you're new to Room/User Variable check this documentation too:
http://docs2x.smartfoxserver.com/Develo ... -variables
Hope it helps
it depends on how you have implemented the movement.
A simple way to do this is to use UserVariables. These are custom variables that can be created for every players which are auto-updated for all players in the Room, meaning that if Player1 changes his UserVars all other players in the same Room will receive an update about it.
For instance: you can add an X and Y UserVariable to each player and these values will be broadcast any time they are changed via the SetUserVariableRequest() from client-side. This means that each game client will receive the other player's position changes and therefore they can be updated on screen.
You didn't mention which platform you're using. If it's Unity I'd recommend checking this tutorial:
http://docs2x.smartfoxserver.com/Exampl ... t-movement
If you're new to Room/User Variable check this documentation too:
http://docs2x.smartfoxserver.com/Develo ... -variables
Hope it helps
Re: Move the character Problem
Thanks, I'll try it
For the platform I use Smartfoxserver pro with flash
For the platform I use Smartfoxserver pro with flash
Re: Move the character Problem
Ok,
so for Flash I would recommend this tutorial:
http://docs2x.smartfoxserver.com/Exampl ... vatar-chat
And you can find the sources, together with many other examples, here:
https://www.smartfoxserver.com/download#p=examples
Hope it helps
so for Flash I would recommend this tutorial:
http://docs2x.smartfoxserver.com/Exampl ... vatar-chat
And you can find the sources, together with many other examples, here:
https://www.smartfoxserver.com/download#p=examples
Hope it helps
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: No registered users and 56 guests