Little questions about Networking...

Blitz3D Forums/Blitz3D Programming/Little questions about Networking...

Paolo(Posted 2004) [#1]
Just some questions about networking,
please while answer have in mind that I don't know so much about it :)

1- I want to evade the "StartNetGame()" dialog, I have no problem doing it for a TCP/IP game, but how do you evade the dialog if you want to start a game by modem to modem via phone call?

2- In a modem connection game, how do I set my PC to wait for a phone call, I mean, when I select "modem connection" a dialog pops-up where I can enter the phone number I want to call, but I want to receive the call so how do I set my PC as a host so that it says "waiting call..." or something like that?

3- With the "StartNetGame()" command, it gives you options for TCP/IP, Modem Connection, and Serial connection. What commands do I use for a LAN based game, I mean, how do I play the game in let's say 10 PCs connected in the same room :)

Ok, thanks for the help
bye!
Paolo.


jfk EO-11110(Posted 2004) [#2]
For 3: I think you can use IP/TCP for LAN too. Just use the right machine names, such as "pc10", or however the names are, or the correct LAN IP (eg 192.168.0.5). Correct me if I'm wrong.


Jeremy Alessi(Posted 2004) [#3]
I think you are right, though I have created a few networked games (Skyline Riders and True-Vol) none of them functioned on an LAN.


MagicalTux(Posted 2004) [#4]
If you want to use a modem2modem-based system, you can open a stream to the COM port (try OpenFile("COM1:") or something like that.. I already did that with blitz once) and send data with it...

Use the standard modem commands...

When a call is received, the modem sends the string "RING" to the computer.
To answer a call, send the command "ATA"

To send a call, send the command "ATD" followed by the phone number (eg. "ATD0845184". You can put T to use tones and P to use pulse)

After ATA or ATD, if it was successful, you will be directly connected. To escape this mode, you'll have to do the escape sequence (I think it's "+++" but I'm not sure anymore). Then do "ATH0" or just "ATH" to "close" the line.

If you want to check if there is a modem, you can send the initialisation command "ATZ" and wait for the OK.

Try using HyperTerminal (connect to your serial port) to control your 56k modem and have a look at the commands.

ATI followed by a number (0 to 7 on all modems, but sometimes can go higher) to get modem firmware and other useful informations.

there are many other commands available to control a modem but I don't remember them (6 years ago I coded a TCP/IP stack and a dialer with PPP support with Blitz Basic ][ .. I still remember lots of useless things ^^)