Introduction

The Net module provides an interface between the core module and the Bluetooth link to the other game machines on the network.

Inputs & Outputs

The net module takes move or button structures from the game core and outputs a text string, which can be sent over the Bluetooth link.

When data arrives from other players on the network, it will be in the form of a text string. The net module converts it back to a move or button structure and passes it to the core module so that the game state is updated to reflect the actions of an opponent.

The bluetooth module is supposed to connect together the net modules of each player to form a wireless network. However, at the time of writing, the bluetooth module does not work. Instead, the net modules can be connected directly and the players can communicate as if the bluetooth module was working.

Design Decisions

I decided to convert the composite VCC datatypes such as move or button to a text string because this means that the bluetooth module only has to cope with one simple datatype. It is also fairly simple to represent complex datatypes as a comma separated string, with one part for each field of the datatype.

Assumptions

The net module assumes that communication across the bluetooth network is reliable. This means that it will not check whether messages have been received or have been currupted during transmission.

Bugs and Future Development

There are no known bugs in this module. If the bluetooth module is ever finished and is able to cope with three or more players, the net module could be expanded to handle the network communications required by the lobby. At present, the lobby modules of each player are connected together directly.

Home


Copyright © 2002 Andrew Bates
Last Updated 04/04/02