• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Create FS2004 & FSX Compatible Multiplayer Software

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
 
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
 
Back
Top