I would like to develop a backgammon game to play against other players online, as a way of learning more Javascript/jQuery and a little game development. I'm a web developer and most of my experience is in PHP. I have minimal Javascript experience and no game development experience. Where should I start? Are there any particular books, tutorials, libraries, or frameworks that would help give me a jumpstart? As a beginner, am I better of using the DOM or Canvas?
|
|
I think it depends on how you're planning to render your graphics. Do you want to include animations? A playing board with a pseudo-3d-view? A top-down view is probably easiest and could be done using DOM and/or Canvas. Since DOM is supported in all major Browsers and jQuery offers a nice toolset (including animations) for DOM manipulation, I'd probably pick DOM over Canvas. Since this is a multiplayer game, you'll have to think about where to put the game logic. The best approach (which also prevents cheating) would be to keep all the game-logic on the server-side (programmed in PHP) and only have rendering logic and user-input in the clients. I don't know about any PHP framework that has a focus on game-development. I'd probably pick a multi-purpose framework like Zend, Cake, Sapphire or Symfony. This will let you focus on the implementation of the game-logic while it will already provide tools for data-persistence or handling of AJAX-request (which you'll probably use for communication). |
|||||
|
|
Since your goal is to experiment with Javascript, I suggest you to take a look on Node.js for the server side. It's well suited for what you're trying to do because you can build a realtime server through websocket quite easily and stay DRY. Your backgammon logic will be wrote only one time and shared both client and server side (for anti-cheating / game rules validation) Search for chess games build on these technology. |
|||
|
|
|
With the caveats that I have no direct experience with them and their web site login/logout is a bit wonky, I've heard good things about gamesbyemail.com's developer program. They provide a downloadable tutorial for building games within their framework. |
|||
|
|