Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!wuarchive!uunet!mcsun!ukc!edcastle!aikc From: aikc@castle.ed.ac.uk (Kenneth Cameron) Newsgroups: comp.sys.atari.st.tech Subject: Re: Many player games Message-ID: <8580@castle.ed.ac.uk> Date: 18 Feb 91 16:41:57 GMT References: <8553@castle.ed.ac.uk> Organization: Edinburgh University Lines: 52 In article <8553@castle.ed.ac.uk> elev35@castle.ed.ac.uk (R C Smith) writes: >I would like to write a many ST game programme which links together n >STs where n>=2. Could anyone give me a pointer as to how this could be >done? I've done this with a Multi-User Adventure game that I wrote. (Called Cantrip). I was meant for use on unix hosts, but I ported it to the ST. You can connect upto 20 machines together, (this is a #defined limit, so more could be connected upto something like 64). >1. Would it need one ST used as a server to the rest? Thats the way I've done it. One machine runs the game, and the others act as terminals (of a sort). >2. Should I use the MIDI port as there should be a through connection? I used Midi. But not the through option. You need to connect Midi out to Midi in on the next machine in a loop, all the way round to the first machine again. >port or should let it through to the next ST (This is beginning to sound >like a LAN!!!) I developed a packet protocol suited to the task. Each machine has a unique address, it extracts all packets addressed to it, echo-ing on all others to the next machine in the loop. It can also insert a packet into the loop when it needs to. Who generates packets, and when is defined as part of the protocol. There are a few of points to watch out for. 1. The standard io handlers can't cope with the kind of data flow rates you can generate on the ring. Resulting in loss of characters. 2. Data can only flow in one direction. So it may take a while to pass a message from one machine to another. This also means the only handshakeing that can be done is to pass a message back round the other half of the loop. (In case of errors, its useful to get machines to extract out any packets which were sent by them. Otherwise they may go round the loop for ever} 3. If each machine reads an entire packet before it retransmits it, the baud rate is divided by 2 for every machine in the loop. I cured this problem by reading the packet header, and if the packet was not intended for that machine starting to dump out the rest of the packet as it arrived. >Anyhow you get the idea >advaTHANKSnce >Robin Your welcome. What kind of game did you have in mind ? Midi may not be fast enough for arcade games, unless the amount of data to be sent is kept small. Cantrip is not quite finished (I'm not happy with the NPC code). But if theres any interest in the ST version, I could post a set of binaries (it should run on any ST, single or multiplayer). ,Kenneth. -- ,Kenneth. K.Cameron@uk.ac.edinburgh kenneth@uk.ac.ed.cs.tardis