Hi there, I am currently in the process of planning to develop an mmo rpg, and was wondering if
anyone could assist me in choosing what engine/tools would be best for such a project.
To get started I am a pretty competent programmer, I have been programming for 6+ years now
and know how to program in c++, c#, java and some other high level languages and I do know the
basics of writing a network architecture to accept and handle multiple clients.
I am currently stuck on what tools I want to develop with however, my most preferable option would
be to develop the client in unity, and program some sort of server that handles all player data, hooked
up to a database etc.
My first issue with this was considering how the world will be built with unity, because unity would host
the client the server should send the information of what stuff/people to render around them, while
sending input data back to the server. I thought about using scenes in unity to represent maps of the
server, perhaps completely building the map in unity, but how do I handle the collision in this setting on
the server? considering that the server would control the update process of all the players, like moving
them according to there input data, the server needs to know about the world in some way to manage
collisions properly, ie not letting them walk through walls and not falling through the world if I apply gravity.
If I was however to allow unity to manage all the physics of a player, and just upload the players position to
the server rather than pass input data, isn't this a security risk?
Considering these factors I then thought well what if the server stores all the maps data, passing it to clients
that connect to specific maps, and having a script in the maps scene build the environment when it starts up,
I would however have to program the collision and physics logic myself on the server, but I think I could
program a server capable of doing those things, something along the lines of having a file for a map which
stores objects by name, giving them a position in that map and a bounding box or collision mesh, then unity
can just can just load a prefab object with that name at said position.
Another option I have is rather than using Unity I could program the client using OpenGL, as I have been using
OpenGL for around 3 years now and can write an efficient renderer with it, then in this case I would probably
program the server in a similar way to what I am already thinking, however this would create more overhead
in having to write graphics code on top of network and general mechanics, I would only take this route if unity
provides more trouble than its worth in development.
I also do have a question about general mmo network architecture, how many threads should a server have for
clients, the way I have considered it is to:
* have a thread on the server listening for and connecting clients
* have a thread that is updating all maps/players within the maps
* have a thread for every client that is reading there input data
* the main map/player update thread would send out render data to all clients at the end of each update frame?
That is about as far as I have got in the considerations for developing my project, and would like to know if I am
thinking about it correctly, and any other suggestions are greatly appreciated :)