locked
Can someone point in the right direction for how to make a multiplayer game over the internet

    General discussion

  • Hello,

    I am looking into making a game where two people who can be in different places would log on to the app, log in and can play - i.e. they would be connected over the internet. I'm looking for a hint on what is the direction to take and which technologies. For example is there a best practice for example if you make an app with DirectX and C++, and you use some kind of web service or something? or is it easier using C# and XNA? just looking for some pointers in the right direction. I have played around with DirectX, far from proficient but have familiarity, I have no experience with XNA but hear it's less hardcore and easier going. I'm particularly interested in what the best way to connect over the internet.

    Thanks

    Friday, January 23, 2015 3:18 PM

All replies

  • No, there's no best practice here.  It's wide open - clear blue sky.  Just about anything you can think of has been tried and done with varying degrees of success.

    Literally,

    • To communicate over the internet, use a socket.
    • To display graphics use DirectX.

    But that's not likely the answer you're looking for.

    It sounds to me like you're planning too big of a step.

    This is a VERY open ended question. If you actually expect an answer then you might be interested in using an engine, which puts you into a domain where those open-ended kinds of questions are answered in a single context, like Unity.

    Friday, January 23, 2015 4:03 PM
  • What you are asking is very complicated and one of the more difficult things you can do in gaming. I'd strongly recommend you start smaller to learn and then move up to multi-player games as your skills grow.

    From the multiplayer client perspective it doesn't really matter which technology you use. You can write a multiplayer game in any engine or technology that can talk to the network. Choose the client technology that you are most adept at and interested in and learn it. You can go straight to DX, use a third party library such as Monogame (XNA isn't supported for Windows Store apps), or a complete game engine such as Unity. Once you can write a decent one-player game you'll have the foundation to start on to build a two-player game.

    At that point you'll need to define the problem much more specifically. As you state it, it is really wide open. How do you want the users to connect? Directly machine to machine? Matched through a web server but running client side? Connecting to a game running on a remote server? Something else?

    The network connection itself is probably fairly straightforward, but where to connect and how to manage that can be difficult. You'll have to decide what properties you want. Is this an action game where responsiveness is important or a turn based game where timing is less relevant?

    Are the players connecting locally or completely remotely? If the former then they can probably connect directly over the local network (NFC is great here). If the latter then they probably will need to connect to a matchmaker service to avoid firewalls. This can get very complex, but there are existing solutions you can use rather than writing your own.

    --Rob

    Friday, January 23, 2015 4:10 PM
    Moderator
  • That was exactly the answer I was looking for, something to get going with "socket". Cheers!
    Friday, January 23, 2015 4:24 PM
  • Thanks for your reply and the advice!
    Friday, January 23, 2015 4:24 PM