Two-Year Computer Science Tripos
Project Dissertation
Old Regulations


An Experiment in Real-Time Networking.


Stuart Cheshire

Sidney Sussex College

Stuart Cheshire,
Sidney Sussex College.
An Experiment in Real-Time Networking
for Computer Science Tripos (Old Regs).
Submitted Friday 19th May 1989.
Project Originated by Stuart Cheshire.
Project Supervised by Dr J. K. M. Moody.

Initial aims:
To produce a graphical multi-user game running on a slow local area network. It must have fast real time response and achieve smooth movement of objects on the screen. The network protocol should be hardware and software compatible between many machines, initially the BBC micro (in assembler) and Acorn Archimedes (in C), but in principle, any machine with an RS232 serial port.
To produce a simple program to generate, in a pseudo-random manner, network packets to simulate the presence of other players in the game, in order to test the response of the network under heavy load.
Work Completed:
The basic aims of the project were achieved, although the high level language implementation was done on the Apple Macintosh instead of the Archimedes. The extra time involved in doing this meant that it was not possible to write the automatic testing program. The program was tested instead at the Acorn User offices, Shoreditch, and the Kingsbury High School, Brent.
Difficulties Encountered:
Arranging to use the BBC Masters in the Old Biometry Room to test the program turned out to be far more difficult than I had expected, and I was only able to do this once, so I had to find alternative venues for testing.

Also, I was unable to obtain an Archimedes from Acorn at the discounted software developers' price as I had initially hoped, so eventually I decided to write the high level language version for the Macintosh instead. This obviously entailed learning a whole new programming environment, which had not been anticipated.

Table of Contents

Author's Note


Notation Used in this Dissertation

Chapter 1 -- The History of the Project

Chapter 2 -- Foundations
The Structure of the Program
A `Real' Game
The Coordinate Systems
W(Global)16 + 16 bitsWorld coordinates
M(Global)8 + 8 bitsMap coordinates
N(Global)12 + 12 bitsNetwork coordinates
P(Local)8 + 8 bitsPixel coordinates
V(Local)4 + 4 bitsView screen cell coordinates
C(Local)8 bitsCell numbers
Utilities Module -- Conversion Routines
Utilities Module -- Map Routines

Chapter 3 -- The Core
Discussion In the Foreground...
Building Control
Pillbox Aiming
Forest Growing
Automatic Scrolling
At 50Hz...
Tank Movement
Man Movement
Shell Movement
At Last, a Real Flood-Fill!

Chapter 4 -- Graphics
The Background
The Foreground
Making Pictures
The `setob' Routine
The `refresh' Routine

Chapter 5 -- The Network
The Network Scheme
Serial Port Operation
The Initial Network Scheme
The Packet Based Network Scheme32
The Final Network Scheme
Error Recovery
Big Trouble!
Let Me In!
joining = 0(Waiting to join ring)
joining = 1(Waiting to select a station number)
joining = 2(Waiting for boot data)
joining = 3(Waiting for map data)
Let Me Out!

Chapter 6 -- MacTransfer

Chapter 7 -- Playing with a Macintosh

Appendix A -- The Original Proposal
Project Description
Part I
Part II
Resources Required Plan Of Work

Appendix B -- Specific Instructions for the BBC micro

Appendix C -- The Timetable of the Project
Mid December 1987 -- 2 Weeks
Mid January 1988 -- 2 Weeks
Easter Holiday 1988 -- 4 Weeks
November / December 1988 -- 9 Weeks
February / March 1989 -- 6 Weeks
March 1989 -- 2 Weeks
April 1989 -- 4 weeks

Appendix D -- Supporting Software
The Assembler Environment
Making Pictures
Building an Island -- The Map Editor
Booting from Nothing!

Appendix E -- Code listings

[ Intro | News | Links | Archive | Guides | Gallery | People | Misc ]
The Bolo Home Page is copyrighted by
Joseph Lo & Chris Hwang