Search Unity

Server details...

Discussion in 'Multiplayer' started by MTracerStudios, Aug 23, 2011.

  1. MTracerStudios

    MTracerStudios

    Joined:
    Aug 24, 2010
    Posts:
    118
    I plan to make a multiplayer-online-battle-arena game, similar to League of Legends or Bloodline Champions. I plan to start small, with a free, few-featured beta, than go free to play and add cheaply purchased items to the game. I need a server that is relatively easy to use, has a good database system, can handle UDP or some similar method of rapid transfer, can be integrated into PayPal for item purchasing, and can be used for free. I also need a hosting service that will run the aforementioned server for free. (I'm fine with paying if the project gets off the ground.)

    Could someone recommend a back end/hosting service combination that I should use?
     
  2. justinlloyd

    justinlloyd

    Joined:
    Aug 5, 2010
    Posts:
    1,680
    You pick one of the hardest of projects to implement, but want everything free and relatively easy to use. Apart from those two things being almost mutually exclusive I don't think worrying about whether the server is "relatively easy to use" should be even one of your concerns at this point. You've got bigger problems than worrying about whether the server is administered through some arcane command set or a fancy UI.

    Indeed.
     
  3. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    It will take a lot of work no matters how you attempt to do it.

    That said, take a look at http://playerio.com/
     
  4. MTracerStudios

    MTracerStudios

    Joined:
    Aug 24, 2010
    Posts:
    118
    I am aware that it will not be easy no matter how I do it, I'm just looking for the most relatively painless solution.

    NPSF3000, would you happen to know the basic architecture of playerio? It seems like they host it themselves, not sure if I want that. Do I?
     
  5. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    So basicly you want all for free and you want it to be as painless as possible.....
    There is no such thing as free servers ...
     
  6. justinlloyd

    justinlloyd

    Joined:
    Aug 5, 2010
    Posts:
    1,680
    There is a cheap, almost free option (so ridiculously cheap that it might as well be free), and it is actually quite painless, but as every professional game developer will tell you, we actually eschew those in favour of choosing the most egregiously difficult solutions we can find so that it will appear hard to do and get us lots of geek girls. Because of this, none of us will ever reveal the secrets of how to do what you want, even though it is completely possible. Once you have spent ten or fifteen years beating your fists against the monitor, you will be ready to seek the answer, and we will welcome you with a knowing nod, and you too, will refuse to tell the next generation of developers just how easy it really all could be, but why should you, when it was so difficult for you. Anyway, I have said too much already. Back to writing MSIL code directly in to a hex editor.
     
  7. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    You're starting in the wrong end, worrying about stuff that might not even become relevant. Integration with paypal, database setups, etc. You need a game first. I'm working on a similar idea and have gotten pretty far with implementing the game (got network stack built, got money to buy professional art assets, etc.), lets break it down:

    The first thing you do is try to limit yourself, or rather game that you're building. If you look at DotA2, LoL, HoN, etc. they all have a vast amount of heroes, skills (as in both types of skills and individual skills), effects, etc. You will have limit this pretty heavily, just creating art assets for everything is more work then one person could do in a year or two. Limit yourself to maybe three to five champions to start with, give them one skill each plus an auto attack, limit the type of spells and amount of total spells that exist, etc.

    If you don't have a game, why are you worrying about integrating into paypal?

    The way you would structure the technology stack of a game like this is something along the lines of what league of legends have done:

    • Have a separate game lobby server that you use to find games
    • Have a separate game server that is used to run instances of your game
    • Have a separate chat server that can be used to talk to other people from both the lobby and the game
    • Split the game and the lobby into two different clients, this will allow you to use some simple of the shelf tool to build your lobby GUI like adobe flex, .net wpf, etc.
    • The game client and game server communicates with UDP
    • The chat and the lobby server both communicate with TCP

    Don't even care about trying to earn money right now, if you're actually going to do this then first accept the fact that this is going to cost you a lot, in both time and money.
     
  8. omgitsalexl

    omgitsalexl

    Joined:
    Jun 20, 2011
    Posts:
    70
    Honestly, and probably the cheapest way you could go, is to get a free license to say Photon for 100 CCUs which will handle all of your UDP packets from server to the clients; this will allow you to test your project without having to pay any fees for the server software and SDK to see if it goes anywhere, and if it does take off, simply upgrade your license file.

    For your need of a database system, you could go the free route with PHP and MySQL, or simply a binding to MySQL from your server application. You could of course take a look into other database options such as MSSQL if you are running a Windows server, and would prefer to use ASP/ASPX over PHP, and want to keep to a Microsoft application base for programming, web frontend (IIS) and database.

    Then for PayPal, I would look into simply hooking into their already provided IPN system through the offered API. This would allow for any micro-transactions that would take place from your game, and would hook into your ASP/PHP system without much additional work at all.

    From here, we come to the free server hosting issue. Short answer to this question, is that you will not find one. I would highly doubt that you would find a company offering the bandwidth and RAM needed to run an application server on a VPS/Semi-Dedicated/Dedicated without incurring cost to yourself; it could be possible, but I do not know of one offhand. The only other option would be to have a dedicated box running within your office/home that runs the backend for you, but chances are you will have to upgrade your DSL/T1/T3/Fiberoptic line to a business plan to offer the dedicated IP and Upload speed and bandwidth needed.

    But as it has been said already, worry at this point of building maybe a P2P game of the same design using the built in Unity Network that is available for free, and after that is down and some feedback has been provided to you; it wouldn't be incredibly too much work to port over to a dedicated server system (Photon, SFP2, Player.IO, etc.) and slowly release the other planned features, such as the micro-transactions, through patches over time.

    These are simply my thoughts that I can offer you at this time for what I feel will be the best in helping you get a head start on your current project. Best of luck!
     
  9. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    I would strongly recommend against Photon and use something like Lidgren instead (or raw sockets if you're up for it), building your server in Unity also and running it in batch mode since it will allow you to use the same physics, collision detection, etc. between the client and server.

    Build the _game server_ in unity, and then run one instance of it per game, allowing it to recycle a used instance without re-starting it. This will give you a very robust design, and even if one instance crashes it wont take everything down with it making it very hard for people to target you with attacks, etc (not that it matters right now, but still).
     
  10. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    They host it themselves, run on amazon (IIRC), basic room architecture etc.

    Sure you lose a lot of control, and have to pay increased costing costs. But it's simple, has all the 'features', is free to start etc.


    Completely wrong.

    In fact photon have just released a product to help you do this!
     
    Last edited: Aug 24, 2011
  11. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Uhm no, their released solution does not help with sharing any game logic code between the client and server. Their example even just a simple relay server that isn't authorative.

    Edit: The only thing their newly released solution does is masquerade the photon networking to look more like the built in unity networking.
     
  12. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Exactly...
     
  13. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Yeah, but... jesus. It will not allow you to create an authorative server that has control over the game logic like movement, physics, etc. because the photon server doesn't have access to the Unity internals. You can of course build all of this yourself, but that's a lot of work.

    For non-authorative servers, i suppose photon is fine.
     
  14. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Yes... yes it will.

    Oddly I'm building an entirely authorative server... using photon :)
     
  15. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    If you actually have access to the unity internals, such as collision detection and raycasting inside of the photon server I'm very interested in this, how did you expose unity to Photon?
     
  16. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    And well, yes, of course you can create an authorative server with Photon, but doing so requires you to replicate all the game authorative code on the server such as physics, etc. because it is not possible to expose unity to photon.
     
  17. MTracerStudios

    MTracerStudios

    Joined:
    Aug 24, 2010
    Posts:
    118
    In answer to physics, I will be using an EXTREMELY dumbed down physic system, which I THINK I'll be able to program myself into whatever backend I use.
     
  18. justinlloyd

    justinlloyd

    Joined:
    Aug 5, 2010
    Posts:
    1,680
    The only sane decision made so far. If you have not implemented proper, hardcore network physics before you are in for an extremely rough ride.
     
  19. MTracerStudios

    MTracerStudios

    Joined:
    Aug 24, 2010
    Posts:
    118
    Chill dude, I'm risking no ones neck but my own.
     
  20. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Quite simply I didn't.

    But I never said I did :)

    In answer to your question - it's quite easy - photon does not need to know anything about unity for photon to run:

    "it in batch mode since it will allow you to use the same physics, collision detection, etc. between the client and server. "
     
  21. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Ok wait so you're running photon AND unity next to eachother? It feels like you're being confusing on purpose here man, can't you just say what your setup looks like (on a general scale, like what talks to what and who makes what decisions, etc.)?
     
  22. npsf3000

    npsf3000

    Joined:
    Sep 19, 2010
    Posts:
    3,830
    Don't confuse my set-up (which doesn't use unity for any game mechanics), with the set-ups I'm theoretically proposing.

    It is entirely possible to run photon as a lobby, which does little more than forward players to a relevant unity server.

    It is entirely possible to run photon as a game server, which does little more than use running unity servers for certain specific tasks. E.g. all movement etc. is done in photon, but ray-casting is farmed off to headless unity servers.

    And of course there are plenty of variations in-between.

    For example, use photon as a proxy - simply redirecting messages to and from the unity headless server/s. While it does add in a layer of complexity... so does using lidgren or your own sockets as suggested. Furthermore this option allows you to add in an entire suit of features - such as lobby, chat, accounts and persistence - that is separate from the unity engine (and written in .net 4.0 for a few extra goodies + performance :p).

    Whether you do it or not is up to you to decide on a case by case basis - but it certainly is possible.

    http://forum.exitgames.com/viewtopic.php?f=5&t=693&p=3489&hilit=headless#p3476
     
    Last edited: Aug 25, 2011