log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
- RISC OS London Show Report 2024 (News:1)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Multi-computer gaming
 
  Multi-computer gaming
  Loris (19:29 18/2/2002)
  andreww (20:51 18/2/2002)
    Loris (11:23 19/2/2002)
      johnstlr (12:37 19/2/2002)
        johnstlr (12:39 19/2/2002)
          johnstlr (12:41 19/2/2002)
            Phlamethrower (18:24 19/2/2002)
              Loris (18:54 19/2/2002)
                johnstlr (09:32 20/2/2002)
                  Phlamethrower (15:14 20/2/2002)
 
Tony Haines Message #86202, posted by Loris at 19:29, 18/2/2002
madbanHa ha, me mine, mwahahahaha
Posts: 1025
I'm writing a game (as per usual).
This one is not particularly processor intensive, and I think it will work best multiplayer. I'd like to have it possible for people to play on different computers over phone lines (possibly also over the internet if that is not much more work).
Anyone got any suggestions as to how to do this?
At the moment this is just an idea, I don't even own a modem at the moment (or indeed, a phone connection cool )
The reason for preferring direct dialled connections are that presumably the information can be exchanged more directly with less overhead and less latency worries. More importantly, it'll often be cheaper for extended play. Some communications companies provide local calls for free or low prices. An example is Kingston Communications, where an untimed call costs around 5p. However calls to internet numbers are invariably timed.
Given that I will probably be able to get my hands on a modem, and will be phone-connected soon, is this a reachable objective?
Ideally someone would already have written a module which would allow you to phone up either manually or for you, then let you talk before doing the handshaking to get the game working. Does such a module exist, and if so, is it 'free'?

If not, anyone care to lend a hand?

  ^[ Log in to reply ]
 
Andrew Message #86203, posted by andreww at 20:51, 18/2/2002, in reply to message #86202
AA refugee
Posts: 555
Try Easy Sockets by Justin Fletcher.
  ^[ Log in to reply ]
 
Tony Haines Message #86204, posted by Loris at 11:23, 19/2/2002, in reply to message #86203
madbanHa ha, me mine, mwahahahaha
Posts: 1025
Try Easy Sockets by Justin Fletcher.

I've just had a look for this on the Web and can't find it.
It doesn't seem to be on what appears to be his main website, or any others I've found.
I've found several references to it using Google, but they all seem to point to removed/deleted pages.
Before I email him, what does this program do exactly?

Thanks for the tip, anyway.
Yours,
Tony

  ^[ Log in to reply ]
 
Lee Johnston Message #86205, posted by johnstlr at 12:37, 19/2/2002, in reply to message #86204
Member
Posts: 193
If you use Easy Sockets just bear in mind that with the version I've got the license doesn't allow free use of it in a commercial game. It might be worth checking your requirements with Justin first - he's usually pretty helpful.

A direct dial should be possible - at the end of the day you'll just be talking an IP based protocol (either TCP or UDP) down the phone line. The trick is the direct dial bit - it's not something that modules like Easy Sockets deal with because they assume the IP network is already in place and ready to use.

You can get Easy Sockets from

http://www.acornsearch.com/catalog/freenet.barnet.ac.uk/pub/Acorn/freenet/j.fletcher/modules/

Note however that even with a direct dial connection you're likely to run into latency problems. Even on a high speed LAN the time it takes to transmit a packet is significantly more than the time it takes your computer to react to, say, a keyboard press. Obviously if your game updates at a relatively slow speed then the problem will reduce.

There are many articles around about network programming in games. A good place to start is www.flipcode.com

  ^[ Log in to reply ]
 
Lee Johnston Message #86206, posted by johnstlr at 12:39, 19/2/2002, in reply to message #86205
Member
Posts: 193
Given that I started my message before you posted again, EasySockets provides a simplied SWI interface to programming IP networks. Basically it's easier to use than the raw sockets interfaces, but at the same time less flexible.

I can't remember if it returns proper socket handles or not when you create sockets. If it does you'll be able to call the more powerful socket SWIs to do anything EasySockets doesn't.

  ^[ Log in to reply ]
 
Lee Johnston Message #86207, posted by johnstlr at 12:41, 19/2/2002, in reply to message #86206
Member
Posts: 193
One last thing, if you go for direct dialled connections you'll be limited to two player games because obviously your phone line can only talk to one other phone line at any one time.
  ^[ Log in to reply ]
 
Jeffrey Lee Message #86208, posted by Phlamethrower at 18:24, 19/2/2002, in reply to message #86207
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
Unless you can work out how to use BT's 3-way phone calls wink
  ^[ Log in to reply ]
 
Tony Haines Message #86209, posted by Loris at 18:54, 19/2/2002, in reply to message #86208
madbanHa ha, me mine, mwahahahaha
Posts: 1025
If you use Easy Sockets just bear in mind that with the version I've got the license doesn't allow free use of it in a commercial game. It might be worth checking your requirements with Justin first - he's usually pretty helpful.
Connecting then would be a problem.
It would be commercial, although perhaps not *very* commercial. I was thinking of perhaps a shareware release (Of course I probably won't get that far.)

A direct dial should be possible - at the end of the day you'll just be talking an IP based protocol (either TCP or UDP) down the phone line. The trick is the direct dial bit - it's not something that modules like Easy Sockets deal with because they assume the IP network is already in place and ready to use.
This then is problematical. From a games-scene point of view I think a module which would do the dirty work for this would be dead handy, and lead to a proliferation of network (or phone-line) games. Ideally it should be use-unrestricted and open source, with a code-maintainer

Thanks for the pointer, I've downloaded it.

Note however that even with a direct dial connection you're likely to run into latency problems. Even on a high speed LAN the time it takes to transmit a packet is significantly more than the time it takes your computer to react to, say, a keyboard press. Obviously if your game updates at a relatively slow speed then the problem will reduce.
I am at least aware of latency issues. I think at least a moderate latency could be acceptable in my case. What is not is the occasional very long drop-out you can get with TCPIP.

There are many articles around about network programming in games. A good place to start is www.flipcode.com

I have been reading flipcode for some time but I don't remember any on network programming from there. I'll have a poke around. I just can't resist this opportunity to mention that I got an image of the day on flipcode. IIRC it was 12th Dec 2001.

One last thing, if you go for direct dialled connections you'll be limited to two player games because obviously your phone line can only talk to one other phone line at any one time.
Heh, no, I'll be limited to two computers, so in
theory I could have 6 or 8 players wink
In reality keyboard clash would probably limit it,
although.. 2*4 buttons each + a mouse based player might be acceptable.
This is important because the game-architecture I've currently got is mostly a fixed cost, with only a minimal increase for every additional player. I chose it over one with a much lower cost which increased with increasing activity. And multi-player would be a good justification.
Hmm, I wonder if it would conference-call. That might be something.

Thanks.
Yours,
Tony

  ^[ Log in to reply ]
 
Lee Johnston Message #86210, posted by johnstlr at 09:32, 20/2/2002, in reply to message #86209
Member
Posts: 193
Connecting then would be a problem.
It would be commercial, although perhaps not *very* commercial. I was thinking of perhaps a shareware release (Of course I probably won't get that far.)

Like I said, contact Justin. It wouldn't hurt to ask.


This then is problematical.

Not really, that's what software like Dialup and Socketeer are for. Personally I think you should just go for a straight Internet based connection - it works for something like Quake (admittedly that's got a hardcore custom network protocol and hardcore client side prediction). One thing you do need is a way for players to swap IP addresses and to start a session. This is easy on a LAN - you just use UDP broadcast. On the Internet you need some way for people to "meet".


From a games-scene point of view I think a module which would do the dirty work for this would be dead handy, and lead to a proliferation of network (or phone-line) games. Ideally it should be use-unrestricted and open source, with a code-maintainer

There are plenty of libraries out there that do this. None of them work on RISC OS because we lack any form of multi-threading.


I am at least aware of latency issues. I think at least a moderate latency could be acceptable in my case. What is not is the occasional very long drop-out you can get with TCPIP.

That's probably due to TCPs congestion backoff mechanisms, without which the Internet simply wouldn't work. If this is a huge problem then EasySockets won't help because it's TCP based. What you'll be after is a custom UDP based protocol. UDP has it's own problems though like firewalls simply blocking it because it can be used to open security holes. Also building a protocol on UDP that doesn't backoff when it encounters congestion can be self defeating.


I have been reading flipcode for some time but I don't remember any on network programming from there. I'll have a poke around. I just can't resist this opportunity to mention that I got an image of the day on flipcode. IIRC it was 12th Dec 2001.

IIRC there was a link a while ago to a bomberman clone which discussed how the author overcame some of the problems you encounter in writing network games. I remember your image of the day - I was gobsmacked to see one from RISC OS smile


Heh, no, I'll be limited to two computers, so in
theory I could have 6 or 8 players wink
In reality keyboard clash would probably limit it,
although.. 2*4 buttons each + a mouse based player might be acceptable.

Or add joystick support.

  ^[ Log in to reply ]
 
Jeffrey Lee Message #86211, posted by Phlamethrower at 15:14, 20/2/2002, in reply to message #86210
PhlamethrowerHot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot Hot stuff

Posts: 15100
In reality keyboard clash would probably limit it

*Wishes someone would invent a decent keyboard*

  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Multi-computer gaming