I'm working on a program for a research project (let's just call it a game, for the sake of simplicity).
The "game" is a standard stand-alone program, not an online browser-based game. It is a simple 3D world (think Second Life). So far so good.
Now the problem is that it also needs to be able to allow people to interact with each other within the game (think World of Warcraft). I don't know much about these kinds of game, as all my previous work has been single-player. Unfortunately, I am the only game developer on the research team, so it falls to me to create this "game".
I believe that a common method is:- The client connects to the server and adds itself to the list of players.
- The server creates the required elements.
- The server processes the physics for each player, and transmits the current location & orientation of every player to the various logged-in clients.
- The client renders the scene.
- Repeat from #3.
The disadvantage of this is that the server can't handle many players.
This is my proposed method (not sure if it's already in use or will even work):
- The client connects to the server and adds itself to the list of players.
- The server creates the required elements.
- The client requests a list of players along with their current location/orientation.
- The client renders the scene.
- The client processes the physics for itself ONLY, and transmits it's new location & orientation to the server.
- Repeat from #3.
This means that the server will be able to handle
many more players because all it needs to do is supply the client with the location/orientation of each player, and the client program will do the rest.
However - as I've said - I have no experience with this sort of thing. (I should mention that I'm developing on Fedora Linux, using C++ and the Bullet physics engine.)
Firstly, what kind of hosting would I need for this? Would I need a dedicated VPS?
Secondly, how would the uploading/downloading of player info work? Remote SQL? What is most efficient? An actual program running on the server which stores the info in the memory, or something more like a simple database (SQL?) that the client programs can access?
And thirdly, how would the above be implemented? Are there third-party libraries for this kind of thing? How does my program connect to the server? Do I need to worry about ports? Is there a cross-platform way to do this?
Any help at all - even if it's just a link to something I might find useful - is greatly appreciated.
Thank-you for your time.