1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Create FS2004 & FSX Compatible Multiplayer Software

Discussion in 'Tools programming' started by Jorick, 9/11/10.

  1. Jorick

    Jorick

    Joined:
    9/11/10
    Messages:
    2
    Country:
    netherlands
    Hi all, thanks for reading!

    For a couple of months, I'm studying on the behaviour of the multiplayer functions in FSX and FS2004. I am familiar with Chocolate Software's FSHost Server and Client (in case of FSX) and at the moment we are running a copy of that software on our server.

    But, the biggest problem with FSHost is the configuration for port-forwarding. Some users are able to properly set their ports, but some can't. In fact, if I'm trying to use IVAO or VATSIM, I'm able to play multiplayer, without the needs of port-forwarding. So that should (and could) be better.

    FSHost is based on a peer-to-peer network environment. That is the biggest issue, because you HAVE to configure your ports properly. Otherwise, FS2004 (or FSHost Client) is unable to broadcast the information of your airplane towards other connected users. So I was thinking: why isn't it possible to make this a straight Client - Server connection, where the server stores the information from the clients and the clients ASK to get information back from the server.

    With that in mind, I was searching for ways to let external software talk with FS2004 and FSX. I found FSUIPC, but that magnificent piece of software can't create AI planes for FS2004. I can extract long- and latitude, speeds, etcetera from FS2004 with FSUIPC, but that is only the half of the circle. I figured out that FSX has it's SimConnect.dll structure and is able to create AI planes in FSX, so that shouldn't have much of my attention. But FS2004 is the big bottleneck in this story.

    Reading on about FS2004 multiplayer functions, it became clear that is uses DirectPlay functions to create, connect and search 'lobby's' to connect with. But that is all native C++ and I'm trying to create a program with Visual C#. Nowhere on the internet (at least not the places that I've searched hours and hours with Google) is described how to connect DirectPlay with C#. Is there ANY way to do so? I know DirectPlay has been deprecated and Mircosoft strongly suggest to use other ways for multiplayer connections. But I can't use other ways, because their multiplayer function in FS2004 is based on that (crappy?) DirectPlay.

    So what I'm looking for is:
    a) Is it possible to connect to DirectPlay with C#? Or:
    b) Is there something like FSUIPC, only with the ability to create AI planes?

    If you want to know more after reading this (thanks again), or I'm not clear enough with my story, feel free to ask.

    Kind of regards,

    Jorick
  2. Jorick

    Jorick

    Joined:
    9/11/10
    Messages:
    2
    Country:
    netherlands
    No one? :confused:
  3. Daniel

    Daniel

    Joined:
    21/12/06
    Messages:
    139
    Country:
    netherlands
    Hey Jorick,

    No expierence with the specific interface, but you can call any exported DLL function from C# using PInvoke.

    Try these terms on google for instance:

    c# pinvoke directplay

    Daniel
  4. Michael Gaut

    Michael Gaut

    Joined:
    23/1/13
    Messages:
    13
    Country:
    unitedkingdom
  5. kevintampa5

    kevintampa5

    Joined:
    3/6/12
    Messages:
    1,691
    Country:
    unitedstates
    Well intentioned, but this thread is over 2 years old.

Share This Page