Wahoo: Multi-Player Version Launched
A multi-player version of the Wahoo game has been launched. This version is essentially a beta version as there has been limited testing. Now you can play against other players online in real time.
This version of the game was built using WordPress as a database framework for users and games. In developing this project the initial key element was creating a system where users can log in and view a list of games looking for other players to join. Games require 4 players. A user can either join a game, or start their own game. The system also had to have the flexibility to allow players to leave a game and join a game that might only be looking for one more player for example. While a user is waiting for other players to join the game they will see updates showing the number of other games looking for X amount of players and have the option to leave that game and join one of those.
The next key element was creating the actual multi-player system for the game. The single player interface was the starting point. Because the game was now being played by human players the AI game engine was removed. The big difference is the storing of the game data in a central database. Using ajax, every action that takes place during the course of a game by any user has to be sent to the database. That data is then pulled from the database for each user so that they are constantly looking at an up-to-date state of the game.
After the previous elements were developed there were 2 more key features that were developed in order to make the whole multi-player concept more practical. The first was the realization that it would be necessary to impose a time limit on user actions. That way a player couldn’t just walk away from the game and leave the other players hanging. If a player did so their team would forfeit the game and the other players could start a new game. A timeout feature was subsequently added which would allow one 5 minute timeout for each player during the course of a game.
Finally, a feature was added that would allow players to accept a rematch after a game was completed. There were a couple of considerations that added to the complexity of this feature. One was the fact that not all players might accept the rematch, The other was the possibility was that a player might not even bother to take any action after a game. So if a player declined a rematch or a certain amount of time lapsed before they took any action the other players would then be given the option to allow other users to join the game as they would any other new game.
One more additional feature the multi-player has that the single player version does not is the display of some simple stats like wins, percentages etc.