Overview
This project involves little database work but will be heavier in AJAX and
gives you the opportunity to work with HTML5's canvas element. You
should choose and implement one of the following: Tic-Tac-Toe, Pictionary,
or Battleship (no canvas required for Battleship), or request a
different game. Two users should be able to log in and play against each
other.
Requirements (one student)
- Users should be able to create accounts and log in.
- Two logged in users should be able to initiate a game with each other.
This can be as simple as requiring both users to type in the other
one's username to play a game with the other.
- Game communication between the players should be achieved using AJAX
making calls to the server.
- For whichever game is chosen, the server should set the game up
and handle the game's logic.
Requirements (two students)
- All of the one-student requirements are required.
- Any two users who are playing should be able to chat with each other
during the game (you can reuse code from the chat project).
- Users should be able to participate in a "match-making" room, which
shows online users, a group chat room, and allows users to request
starting a game with each other. The other user must agree to the game,
at which point both users enter the game room and play as described
above.
Requirements (Extra Credit)
For 10% extra credit, your application should use WebSockets instead
of AJAX. Keep in mind that this might require things besides PHP (see the Notes
section below).
Notes
If you'd like to use another server (such as Node.js, Python with
WebSockets, Mongrel2, etc.), we can't really accommodate that on the class
server, but feel free to develop it on your own machine and simply turn in any
code you write before the deadline. During grading, you can demo it on your own
machine--- it doesn't have to run on the class server.
Examples
A simple demonstration of canvas