Hosted Servers


As you've seen with the example programs, with Torque there are three different execution modes:

  • client only

  • server only

  • hosted server

Depending on your needs, you might want to create one monolithic program that will run in all three modes. This is certainly possible with Torque—in fact, the Torque demo as created by GarageGames supplies this capability by default.

However, you may want to create two or three different program distributions—one for each mode, or one for client only, the other being one or both of the server modes. There are some reasons for doing this, and probably the best is for server security. It depends on your business model (if you have one). If you are planning to provide all of the server-side hosting, then you might want a client-only version to be distributed to users. By not sending out the server code, you minimize the risk of unscrupulous players hacking the game to gain an advantage over other players in online play.

There are pitfalls to the multiple-version approach, the most noteworthy of which is the need to maintain two or more different versions of programs. That's a potential nightmare looking for a place to happen. Proceed with caution.

Having said all that, the distribution of multiplayer games that allow players to host other players while they all play in the same game is a common approach. Not only do many games offer it, but thousands of players use the capability.




3D Game Programming All in One
3D Game Programming All in One (Course Technology PTR Game Development Series)
ISBN: 159200136X
EAN: 2147483647
Year: 2006
Pages: 197

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net