Original Post
Hi,
I was wondering how i can make interactions that other users can pick up? How do i pass information to another user? For example:
1. Player A clicks on Player B's name in a window and chooses to attack this player.
2. Player B gets a message in his screen and chooses yes.
3. Server rolls dice on who may start ans passes this to both players.
4. First players chooses what he wants to do and clicks finish.
5. Other player gets a go to make his move.
I am using PHP, AJAX, javascript and MySql. But i can't find anything on how to approach this. Maybe i'm using the wrong search terms so enlighten me on what functions i should use?<br/><br/>With my knowledge i can get this to work with AJAX requests. I would make a fight toggle for the player and ajax keeps queriing the server if that toggle has been set, if so that message would appear that he got challanged. Then for the turns the same, keep doing AJAX requests to see if the finished turn toggle is set.<br/><br/>Would this be the way to go? Or are there other sollutions that are more efficient, practical and better?<br/><br/><!--EDIT--><span class="editedby"><!--/EDIT-->[Edited by - menyo on June 11, 2010 1:23:47 PM]<!--EDIT--></span><!--/EDIT-->
I was wondering how i can make interactions that other users can pick up? How do i pass information to another user? For example:
1. Player A clicks on Player B's name in a window and chooses to attack this player.
2. Player B gets a message in his screen and chooses yes.
3. Server rolls dice on who may start ans passes this to both players.
4. First players chooses what he wants to do and clicks finish.
5. Other player gets a go to make his move.
I am using PHP, AJAX, javascript and MySql. But i can't find anything on how to approach this. Maybe i'm using the wrong search terms so enlighten me on what functions i should use?<br/><br/>With my knowledge i can get this to work with AJAX requests. I would make a fight toggle for the player and ajax keeps queriing the server if that toggle has been set, if so that message would appear that he got challanged. Then for the turns the same, keep doing AJAX requests to see if the finished turn toggle is set.<br/><br/>Would this be the way to go? Or are there other sollutions that are more efficient, practical and better?<br/><br/><!--EDIT--><span class="editedby"><!--/EDIT-->[Edited by - menyo on June 11, 2010 1:23:47 PM]<!--EDIT--></span><!--/EDIT-->