DOS Network programming [C]

Sharky Forums


Results 1 to 2 of 2

Thread: DOS Network programming [C]

  1. #1
    Expensive Sushi
    Join Date
    Oct 2000
    Location
    Leeds,Yorkshire,England
    Posts
    14

    Post DOS Network programming [C]

    Ok, so I've made some sort of Dungeons and Dragons game in C that plays in a Console. I want to make a two player version (or more?) where two people on a LAN can play together against a common enemy! How can learn about making programs talk across a network? All it needs to do is transmit simple commands like "Pick object" ect. I really don't even know where to begin! What protocols could I use? TCP/IP?
    Thanks in advance!

  2. #2
    Hammerhead Shark Racer^'s Avatar
    Join Date
    Feb 2001
    Posts
    1,758

    Post

    Even though the program you are making runs in DOS, I recommend that you create a TCP/IP network interface that uses a Windows based TCP/IP library to do LAN/Internet gaming.

    There are a few main reasons for this:
    1. You would have to use DOS network drivers which are a pain and sometimes don't even exist

    2. You would probably have to program separate interfaces for a network card and a modem in DOS. However, Windows makes a connection through whatever TCP/IP enabled device you decide to use

    3. The Windows TCP/IP libraries available are much more developed (and more common) then their DOS counterparts

    By the way, it is possible to run Windows TCP/IP in DOS (without booting to Windows) but this is often difficult or even impossible to do and depends on your network card. If you want to be able to run this program in plain old DOS (no DOS box), separate the LAN interface into a different executable so as to not require Windows when you are playing single-player.

    ------------------
    TBird 880 (oc 110 x 8) /
    ABit KT7 w/ 256 MB RAM /
    TNT2 16MB
    Primary:
    Shuttle SN41G2 (nForce2) 333 FSB sync. /
    Barton 2500 w/ 2 x 512MB PC2700 DC-DDR /
    GeForce 4 4400 / Seagate Bara-V 80 GB /
    Envision 980e 19" + ViewSonic 15" / Windows XP SP1 /
    http://service.futuremark.com/compare?2k1=6388169

    Secondary:
    ABit KT7 (YH) VIA 4.29 /
    TBird 864 (oc 108 x 8) / 256 MB PC133 /
    TNT2 / 40GB 5T040H4 / ESS 1869 /
    NetGear FA311 10/100 NIC /
    Win2k Pro SP3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •