Jump to content


This topic is now archived and is closed to further replies.

Dr Ben Warne

PHP Battleships

Recommended Posts

Im not looking for answers, or code. Im just working out how to tackle the below, a sort of plan of action! Because i dont know how i would approach this and am trying to break it into smaller tasks to make it easier.

The game is battleships!

The assignment task is to implement this game using a client-server approach. The server will allow users to request to join a game (the exact mechanism is up to you). When two players have elected to play, they will each be invited to place their ships on a grid. You are urged to focus on the communications protocols to be adopted initially. This is best achieved by implementing a text based version of the game in which everything is achieved though the communication of grid coordinates and damage messages.

The server should be able to support multiple games concurrently.

Having developed and tested such a text-based version, you may proceed to develop appropriate user interfaces. If a graphics interface is chosen you may use a third party library that supports graphics on either the server or the client. Alternatively, it is perfectly feasible to implement the interface using a client-side scripting language to manipulate images within a grid constructed using HTML and CSS. Sound and other appropriate multimedia content may be used.

Better solutions will permit basic configuration of the game. For example by allowing the number and type of ships to be specified or by defining the rule employed to determine the number of shots available at each ‘turn’.

Your solutions MUST be demonstrated on machines within the School of Computing and Mathematics. If you develop any part of your solution on other machines it is your responsibility to transfer the system to departmental machines and ensure that it is working.

A brief document should accompany your work. This must document your overall design particularly focussing on:

The persistence mechanism used
The communications protocol
The software architecture
The design and implementation of the user interface


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.