Having built many web applications with ajax / php / mySql I was presented with a "simple" task form a friend of mine. We built a database of every MTG card for a website, then figuerd we have all this data lets build a simplr "tabletop" emulator to play between us, nothing that would be public or against the terms of MTG / WOC.
So knowing Ajax I figured on the following -
Ill create a mySql db to store the gamestate, send new positions to the server and query for changes made by player 2, then relocate the objects on the screen to keep the game in synch.. By no means are we planning any logic, just shuffle/ deal and move cards around the screen. Obviously there are some values that will change per card such as image (fron/back) counters being added ext..
Backend wise I think I have no issue, the UI is my issue, as I havent dealt with moving multiple objects, sending the x,y,z back to a server, then reading changes and moving the items.
I have been searching for HTML5 solutions as well as AJAX simple div positions. Seems like re-drawing a canvas with image data willl be combersome if say 200 cards are in play.
My main question is should I consider HTML5 or simply look at making it purely Ajax.
Here is the requirements -
Present a deck of 60+ cards, deal 7 to each player.
Decks will load a game table, each card will have a unique ID, multiple images, as there is a front / back/ alt side for most cards, counters that change during game play, positions X,y and z index
all cards will be selectable, and able to move anywhere on the table, or be returned to the deck as I plan on having the deck object an array of all available cards left, not a stack of cards.
If you have any input, or possible direction on where to head with this that would be great. I plan to have each "card" as a div, with the image of the card, a counter div inside the card div attached to most cards that have counters.
Thanks,
Chris