Search Unity

General questions about unity multiplayer

Discussion in 'Multiplayer' started by xav, Jan 19, 2008.

  1. xav

    xav

    Joined:
    Jan 19, 2008
    Posts:
    2
    Hello, I am considering unity for a project that needs to be deployed in a web browser, and run from pc and mac, as well as being multiplayer (6 concurrent players for each game session).

    I'm still in the research of the best tool to do so, and unity seems to be one of the best options around. While I would love to try it, all of my pipeline is currently centered on pc, so can't quite (yet) try the demo. Will buy a mac if unity is the option, but before going shopping, I have a few questions, hopefully some of you can help me out.

    a) Network code, the model used as far as I understand is based on client - server. Is there an option for client - client (client server)?
    b) What kind of server does unity needs? (In terms of port access, shell access, etc). Server runs as scripts (say python for example) or is it a stand alone application? Does one have to code own server?
    c) What is the major block you have found while doing multiplayer projects? (realtime, not turn based).
    d) Are there any problems with compatibility across platforms?
    e) Is in-browser gaming able to use networking in unity?
    f) While content is loading in web player, is there a way to customize it (say for instance allow a logo of company while streaming / downloading).
    g) On stress tests, what are your maximun user counts (if available).
    h) If you have user created samples online, would love to view them.


    Thank you, kind regards.

    Xavier.
     
  2. half_voxel

    half_voxel

    Joined:
    Oct 20, 2007
    Posts:
    978
  3. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Hi Xavier,

    I'm a bit in a rush, but I'll try to answer some of your questions real quick ;-)

    You mean peer to peer? I'm not sure, but I don't think peer-to-peer would be anything I'll try, either. However, any client can be a server, too (if that's what you meant). So basically, your players can have their own servers (while playing), if you wish.

    The cool thing is that Unity supports NAT-punchthrough, so basically, when you have a few clients that also could act as server, it should usually work. There's some cases in which NAT-punchthrough fails, but as far as I can see, this is only a problem when the player who wants to be the server is influenced by that. If another player can do NAT-punchthrough and takes the server role, it's no big deal.

    If you want to have a standalone server (I do, but I think that's somewhat "special", I sure wouldn't need this for the game I'm currently working, I'm just preparing for the future ;-) ), currently, a Mac server might be best... but then again: I'm using a hosted Windows server and that works more or less fine (no headless mode supported for Windows, yet). Hosted means "full access" - I'm also that machines administrator. But as I've said: It's unlikely you *need* that.

    That it's so easy that probably, everyone's gonna do multiplayer now ;-) Just kidding, but I guess you get what I mean. It does take a little time to understand networking and multiplayer - it's definitely not trivial. But Unity makes at as easy as I could imagine (without constraining the flexibility... well... at least not in any narrow bounds)...

    Not that I would know about them... Mac OS and Windows run just fine. I did have a problem with two specific Windows machines, but that's already fixed (just found out a few minutes ago, God did I have fun with this ;-) - playing against myself on 3 machines).

    Sure, see below (my game)...

    Yes, it's very easy, too (just a few HTML-attributes to be set). Also, as the new Web player supports streaming, you can minimize the startup time significantly by providing a "loader first level". Again, this is so easy it could almost scare me ;-)

    I have no data on that, yet... But this heavily depends on the kind of game you create, and the way you implement the server. I don't think Unity will give you trouble here - but you might do that yourself, if you're not careful in the implementation.

    Since you have a rather "small player count" (6, right?), if you set it up as "players provide the server", it's very unlikely you run into trouble with that.

    Sure, V0.7 of JC's Unity Multiplayer TRaceON. It's not a finished game, yet - but it's already fun to play (I would say). I haven't put much effort into the networking of that game, so it may show weird behaviors now and then, but so far, it's been working well-enough. I have to leave in a few minutes, but I might be online later tonight, or maybe tomorrow...

    Jashan
     
  4. xav

    xav

    Joined:
    Jan 19, 2008
    Posts:
    2
    Hey, thank you both!

    Sturestone, I will certainly look into the file you linked when I get unity demo (as on pc seems only .rtf file opens).

    Jashan, thank you very much, indeed your answers did helped a lot. And yes, I meant peer to peer (was somewhat worried if central server had to do all processing). Indeed multiplayer programming isn't something trivial, but project calls for it, so will give it a go.

    Now I just need to go to the bank and get a mac + unity, after having a little chat with my partner.

    I tried your game, looking good!! Will you add some sort of "powerups" that can accelerate lightcycles a little bit more? (kind of augment speed) or maybe some irregularities to the map? Just wondering.

    Thank you again, all the best!!

    Xavier.
     
  5. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Yes, there'll be quite a few power-ups, and some of them kind of "extraordinary" ;-) And also, the different levels will be quite interesting (I have quite a few ideas I guess will be fun to implement, and hopefully as much fun to play ;-) ).

    In fact, the visual implementation and handling of the power-ups are my next "step". The actual logic for some of them is already implemented on "secret keys" ;-) ... well, more or less secret ;-)

    Jashan