Hello All,
Wishing you all a Merry Christmas!!
Well I need to know how can I switch player turn when time is up?
I am making a pool game and I want to switch turns when time ends.
I have a few questions:
I want to know should I implement the timer on the server side or client side? I am following the flash/flex example of Tris.
The major problem, I am facing is when the turn switches the first player event listeners are not getting removed and second player gets the event listeners triggered. But then the movement is not getting updated on the first player and in my moveHandler class on the server outputs this warning
gameExt.trace(ExtensionLogLevel.WARN, ">>>Wrong turn error. It was expcted: " + gameExt.getWhoseTurn() + ", received from: " + user); // the same warning msg on the MoveHandler class on the server from Tris Example Code AS3.
EnableBoard() is the same function from the tris Example I have used.
If you need more details please let me know.
Thanks,
Iceheros
Switching user turn on time up
-
- Posts: 15
- Joined: 06 Mar 2009, 07:52
- Location: India
- Contact:
Re: Switching user turn on time up
I'm not aware of errors in the turn switching mechanism in the Tris example. Can you please post a step by step list of actions to reproduce the issue in the Tris?
About the turn timer we strongly recommend that you implement it on the server side to avoid users cheating with a modified client.
About the turn timer we strongly recommend that you implement it on the server side to avoid users cheating with a modified client.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
-
- Posts: 15
- Joined: 06 Mar 2009, 07:52
- Location: India
- Contact:
Re: Switching user turn on time up
Thanks Bax,
Problem solved, I was not removing one enter frame event listener that I had implemented when disabling the board and switching the turns.
Regards,
Iceheros.
Problem solved, I was not removing one enter frame event listener that I had implemented when disabling the board and switching the turns.
Regards,
Iceheros.
Return to “SFS2X ActionScript 3 API”
Who is online
Users browsing this forum: No registered users and 24 guests