Game Development Community

Anyone got an idea for me?

by Nathan Huffman · in Torque Game Engine · 05/22/2006 (2:39 pm) · 9 replies

I'll try to keep this brief. Maybe there is some existing code in Torque I'm overlooking that will help me get this done.

In my game, which is login (client->server) based, users can create new 'rooms' which after everyone is readied up, the server will launch a new dedicated server for that group of players and off they go (do sql queries to get player stats, etc)..

However, if I had everyone (1) single player create their own room and launch a game by themself (or even if it was just 2 people per 'room') ... that would launch a whole lot of dedicate servers and put tons of stress on even if I had multiple server PCs. (probably wouldn't even work without denying service to some).

Any ideas if it's possible to have one 'dedicated copy' (not server pc, but application instance on a PC) host more than 1 map at a time?

I'm guessing RTS games that are going to be client->server based with the servers being provided by your team would have a similiar issue. Should I have my Torque Login Build launch another Torque Dedicated Server build for each game being played in an RTS game? If that's so, say a bunch of people in your RTS decided to play a bunch of 1on1s.

Say you had 5 server pcs for 4000 players which would work theroitically speaking as long as each game had about 12-16 people in it. But say everyone on your server (all 4000) are going to play 1on1 matches. Now you have more than your servers can handle if the only method is to launch a new dedicated server application instance for each map.

Am I being clear in what I'm asking?

Any responce to this is /greatly/ appreciated. Please don't leave me high and dry even the smallest of help IS help :)

#1
05/22/2006 (3:14 pm)
I don't see how loading multiple maps into a single server would make things any less stressful. Wouldn't it just have to be doing vastly more complex calculations and work within that one dedicated server then?
#2
05/22/2006 (8:41 pm)
FYI, Josh Ritter does do this in Minions of Mirth, but unfortunately his implementation is proprietary to his product. Just letting you know however that it is in fact possible.

I have no information personally on how it would compare to simply creating new servers for each mission, performance or server impact wise however.
#3
05/22/2006 (9:11 pm)
@Paul "Wedge" - if anything, your ram wouldn't be stacked with 1000 copies of the same engine code (as if 1000 is even possible... i'd need one heavy box!)

@Stephen Zepp: Only difference between what I'm wanting to do and MoM's implementation is inside MoM Josh knows for sure each 'instance' of the engine on any given server hardware is designed to hold multiple players. In a game like I'm drawing up, the users 'rooms' in which 2+ enter then they can 'launch game' and I want one of my server PCs to host their map. I was thinking what if (say I have 2,000 users) everyone decides they want to play 1on1s. That's 1,000 "servers" (and by servers there, I mean dedicated engine instances). Would you happen to know if it's possible (without too much engine modification) to have one dedicated software instance of Torque hosting multiple missions OR hosting one mission but some players don't see eachother (that way it would have the illusion that you're on your own 'instance' of the map).

thanks.
#4
05/22/2006 (11:45 pm)
I would imagine hosting 1000 games in one instance of the engine is going to take a massive amount of RAM as well. Don't most 1v1 games use a P2P method anyways? I've heard Torque can be and has been modified to run like that.
#5
05/23/2006 (1:33 pm)
Only issue I'm having is one second it could be 12on12 and the next 1on1. And of course the issue with P2P is cheaters >.>

Without "big brother" server around, it's any half-knowledge persons playground.

I guess I'm just at a stand-still. May have to scratch the idea. Shame; it woulda been a good one! heh
#6
05/25/2006 (12:58 pm)
This sounds more like an infastructure issue that you need to deal with than a code issue. I would suspect that launching multiple server instances would be preferable to having 1 complex server that can host multiple game instances in the same process. For one, if you end up using a system with multiple processors each new server process should theoretically have its affinity for a processor that is under low stress, essentially providing a sort of built in load balancing. Another benefit of spawning a new server instance for each game that you want to host is that in the event of one game having some kind of problem and possibly crashing, if one server out of 1000 goes down, you still have 999 servers up and running. If the main consolidated server process goes down you go from 1000 running games to 0 -- everyone's game gets shut down basically. No matter what if you want to run several thousand games at a time, you will need the physical infastructure to support such a venture. This includes having powerful enough server hardware to handle hosting all of the games and especially includes having sufficient bandwidth to host these games.

Its unlikely that even a high end dedicated server (something like an AMD Athlon 64 4400 X2, 4GB RAM, SATA HDs with page files / cache files properly established across multiple physical drives etc) with a small business cable line (something like 5mbps down, 1mbps up) is going to be sufficient to host 1000 games with 1-2 player in each game, much less 1000 games with 10 or more players per game.

That being said, I wouldn't give up on your idea. If you can get a prototype working you can start working on finding ways to fund the infastructure that you want while continuously optimizing your code. I wouldn't expect thousands of players to be flocking to a new (especially indie) game within the first days much less weeks or month(s) of launch either (unless you have a major marketing campaign). If you can get your game made, you will have plenty of time to work out the logistics of going from handling possibly a few hundred players to handling several thousand players in time.

You are aiming big, which is good, but its unrealistic to expect to be an overnight hit with thousands of players over night. You can do it, just don't give up.
#7
05/25/2006 (1:36 pm)
Right now I'm looking at a maximum of 20 copies of Torque OR a maximum of 40 players (whichever is hit first, with allowing a slight overage) PER 'server PC' which is a P4 3.0ghz with 2GB RAM. In my initial testing of 20 copies of Torque with 2 players each, everyones latency was <100ms and there was no lag to be had.

In the grand scheme of things, this will do my bidding.

And I have plenty of bandwidth. Professionally hosted 10mbit w/ 3TB per month limit per PC. More than enough.

Turns out all I need to figure out now is a good system for load balancing across the multiple 'game servers'.

That shouldn't be too difficult since there is like 100 different ways I could approach that. However, a SQL table containing data about that game server's current useage (populated by the game server) is probably how I'm going to handle it.

Any further comments?

Thanks!
#8
05/25/2006 (1:53 pm)
Sounds like you are off to a good start. The server hardware and bandwidth should be more than enough for quite awhile. As far as load balancing across multiple servers, querying a SQL database seems like it should work just fine for keep track of server load. Good luck!
#9
05/25/2006 (1:59 pm)
Thanks, Matt. I'll be sure to share whatever setup I get going.

This raises one more small question on my part, which I'm going to make a seperate thread right quick for it since it's a different topic. Sorry for the spam :)