Home Unreal Engine

Is it possible to run multiple games per server?

polycounter lvl 11
Offline / Send Message
Bigjohn polycounter lvl 11
So here's my situation. I was hoping to get some feedback as to what I'm trying to do is even possible, as I can't find info on it elsewhere (only found this thread which seems relevant, but no useful info).

I'm working on this small multiplayer game. The game itself is 1v1, a chess sort of game. So I know for a fact that each game will only have 2 players in it. This works fine on a small scale. The problem comes when I want to be able to support a larger number of players.

Since each server only runs 1 game, I find that I have to run multiple servers to support multiple concurrent games. As you can imagine this adds up rather quickly. Even at just 100 players playing at the same time, that's 50 instances of the server. I'm worried about memory issues in the future with this.

What I'm wondering is if there is any way to have each server run multiple copies of the game?

I know that in regular FPS-type unreal games, the server can do 32, even 64, players in the same game. So it seems like a waste to me to run it with just 2 players each time.

Anyone have any idea? Or if this even possible with Unreal?

Replies

  • Hourences
    Options
    Offline / Send Message
    Hourences polycounter lvl 18
    Never did it but I assume if you run each server instance on a different port you are probably able to connect to different games running on the same PC. It is quick and easy to try for you.

    In case you are running servers through frontend, you need to switch to commandlines or you won't be able to get enough functionality out of it -> http://udn.epicgames.com/Three/CommandLineArguments.html

    I am not sure if you'll manage to run 50 at the same time though. It is not a small 2D engine, the whole thing has a significant footprint.
  • Angry Beaver
    Options
    Offline / Send Message
    Angry Beaver polycounter lvl 7
    BigJohn, the problem is the concept you're working with. right now you're considering a server a 'match' and that's not going to serve you well. You're trying to run multiple games through a server designed for only 1, the approach is going to cause you to rewrite engine code, unless you change your mindset.

    Each server is 'Chess Hall', whenever people join their entering the hall, then players are matched up by your code and put into a game together with your code. Of course this means some minor changes to your team and player classes. It might also mean that there's some wasted networking being sent to every client but you might be able to optimize that out, that is if you don't embrace it.

    The mindset flip of the fact you're writing a 'chess hall' will help you squeeze every drop out of a single UDK server. Cause now you can have 64 man servers supporting 32 games simultaneously.
  • Bigjohn
    Options
    Offline / Send Message
    Bigjohn polycounter lvl 11
    Hourences - Yeah that's what I'm doing right now. But that's the problem, the footprint. Right now it's around 100megs of memory, the game is pretty small, and I don't expect it to get much bigger. But still running 50 instances sounds kinda insane. And since it's 1v1, that only gets me 100 people playing at the same time.

    Beaver, that sounds great, but I don't exactly understand.

    So 64 players will join the server, and the game will pair them up into 32 games. This means that the game will spawn all 64 players in the same map, right? How would I separate them all out so it's only 2 people playing against each other?


    Edit:
    I'm also curious on how this is handled in the bigger games. Like say Gears of War, or Borderlands and those. So any time anyone out there wants to play with his friends, they start a new instance of the server somewhere out there? Wouldn't that mean that there could potentially be hundreds of copies of the server instanced at once?
  • Angry Beaver
    Options
    Offline / Send Message
    Angry Beaver polycounter lvl 7
    You'd separate them out by writing some custom logic for the player and team classes. You implemented chess so I figured you weren't shy of some coding :)
  • Bigjohn
    Options
    Offline / Send Message
    Bigjohn polycounter lvl 11
    heh of course not. I wouldn't mind coding anything. I'm just not sure if I follow the design logic. If I have 64 players on the same map, but only 2 are relevant to each other, then I suppose I could have it so that only your enemy is visible to you, and the others are invisible. Basically at any time there would be another 63 players around you, but only 1 of which is visible to you. Is that what you meant?
  • Angry Beaver
    Options
    Offline / Send Message
    Angry Beaver polycounter lvl 7
    sry for the late reply, but yup totally. whether it works best to have a red team and a blue team for each side of the board or whether the team structure is flexible enough 64 team would work better. there's probably some way to set it up like that.

    (I'm moving and I lack internet sry)
Sign In or Register to comment.