Robo-Rally by Trevor Oldak
What is this site?
This site is eventually going to be a place where people can go to play multiplayer robo-rally online. It is powered through AJAX, so no 3rd-party software (except firefox for the time being) will be needed. This site is also meant to show my PHP/DHTML/AJAX skills.
What is robo-rally?
Robo-rally is a rather old board game where players select cards from the cards they are dealt, and use them to move robots around the board to reach checkpoints in a race.
Why robo-rally?
AJAX stands for Asynchronous Javascript And XML. Asynchronous means two things that work at alternating times. Robo-rally is asynchronous. Players choose what moves they will do, and the moves play out. This makes robo-rally the perfect game to create in AJAX. This also may be one of the most ambitious AJAX multiplayer games to date. Anyone want to hire an AJAX developer? I'm unemployed and a hard worker.
How close are you to finishing?
Not very. This is a solo project, and I've got 4 jobs to do: Graphics/Design, XML-generating PHP, and javascript/DHTML, and testing. I'm mostly done with the javascript, save a few bugs, some serious code clean-up, and implementation of a neat way to make AJAX more secure that I read about on slashdot, but I haven't begun with the PHP yet. Also, this is a fairly unexplored area of web development, so I have to come up with my own methods of doing some things.
What should I look for in what you have so far?
Everything I have so far is in javascript. 99.9% of the javascript is my own, I learned the basics behind AJAX initally through online developer sites and by un-obfuscating the google suggest code, and I took their method for creating the XML loader. I've also looked at many other code samples over the course of this project., but all of the code here is by own.
- Fully-functional AJAX chat, supporting multiple chat rooms for multiple games. Currently, chat rooms will clean out messages more than a day old. You can't see it yet but multiple chat rooms and player names are allowed.
- Table-less design done in CSS
- The board is generated through AJAX, and it updated as the game progresses. As updates happen, the pieces move around the board smoothly.
- Click the board to zoom in and out. When zooming in, the board will scroll to center around the area where you clicked. (I currently have a small inconsequential bug where the pieces do not zoom at the right time and move incorrectly)
- The cards and player status (whether or not a player has moved and it waiting for other players to finish) are generated through dynamic XML.
- Draggable cards smoothly snap to positions in the cards and registers column, shuffling around when they are dropped on top of each other, or returning to their original position if dropped in an invalid location. Try shuffling them around and watch how they move.
- When five cards are placed in the registers column, the player is given the option to execute their commands. Upon clicking the 'execute' button, the player's commands are sent to the server.