Hi there.
I have a board game I am hoping to convert to a PHP based browser game. For this purpose I need the PHP script to be able to move objects (counters) on top of an image/background. When players make a move the counters will be moved to a new position. I have a script that gives the user details of XY coordinates, but it doesn't display objects.
It can be done with Java, but is it posible with PHP? I am not looking for finished code but for ideas and hopefully links to sites where I can read how to do it. I searched this forum but couldn't find threads dealing with this.
Thanks in advance.
Poul
Moving Objects on top of an image
Moderator: General Moderators
Re: Moving Objects on top of an image
PHP is server-side. It is not used to move objects on a board, or tell where they've been moved to. That's what you'd use JavaScript and AJAX for.
- PHP generates the page with the board and initial piece placement
- JavaScript is used to let the user move the pieces around
- AJAX sends a message to PHP telling which piece moved where
- PHP generates the page with the board and initial piece placement
- JavaScript is used to let the user move the pieces around
- AJAX sends a message to PHP telling which piece moved where
Re: Moving Objects on top of an image
Okay, thanks a lot. That makes sense...