pgn files for chess
View Single Post
04-12-2009, 01:49 AM
Join Date: Nov 2007
Originally Posted by
There are many Chess and tactics Server using PGN files.
Are those games played on client side ?
Can anyone tell how they embed it into php ?
I'd have to say though, I'd rather just use flash for that type of board game. ActionScript 3 offers you a lot of control in flow, and the ability to create movie files for each piece. Which offers a lot of possiblities as far as adding spice to the game. Like pieces that walk to their position with animation, animiated combat, etc etc. ActionScript 3 can also be bundled with SmartFoxServer - which would allow you to have a multiplayer chess game in about 2 or 3 days of work.
But as far as doing it in just PHP... that's not too difficult either.
You have to set up a series of rules for the game, ie: pieces can only move in this direciton, only move so many spaces.
This can be done with ajax.
Now making this multiplayer is a little more difficult, as you'll need to handle and hopefully maintain several sessions at once. You must also force the user to respond.
There's several design methods to get around this, not all of which I'm allowed to speak of due to where I work ;p
Then try to get it to allow you pick a piece, and move that piece to that place you click.
Then, try and get it to respect the rules you want to use.
And yes, use pngs :)
Where I Ramble:
What I do:
Zynga Game Network
Senior Software Engineer at
View Public Profile
Send a private message to dschreck
Visit dschreck's homepage!
Find More Posts by dschreck