I’m wondering about how to make a MMO game in unity.
I’ve read, and I believe, that unity is perfect for MMO’s, but how to organize the networking/database stuff is a bit unclear.
I’ve working on a concept, and would love to hear if this is somewhat in the right direction of a proper setup. But of course; several different setups will probably do the job.
Let’s say you want to make game with several areas where players walk around, chat, quest and kill monsters.
As an example, you could think of World of Warcraft, but leave away the seamless worlds, that will probably require another full thread and I’m actually not very interested in a seamless world.
The setup I was thinking about:
There is one login database, containing account details for logging in ;).
There is one “game” database, containing all game details (levels, items, quests).
There is 1 unity game server per location. If a player moves to another location it will be reconnected to a new unity game server.
Note that the game servers(LOCATION-servers) and the databases could of course each have their own physical server, or be hosted on the same machine.
I haven’t added a login server here yet, because that could either be integrated in all game servers, or have its own specific program, that’s not too hard to decide about.
Now, it would be nice if this idea was do-able:
Make 1 unity project for this complete game.
Each location has it’s own scene, and scripts of course check if the application is running as server, or as client.
The clients get a build application with all scenes in it, and the game servers get a file with just the 1 scene they got to run, or actually probably also all scenes: As I believe it wouldn’t matter performance wise, but it’s lots easier to deploy.
My questions:
1 Does this setup sound alright ?
2 How can I safely deploy the files for client&server ? (The problem is that if i code the server&client in the same file, users could possibly hack the file and run a server ?)
3 How can I integrate MYSQL into unity ? (without using the WWW->php method ofcourse)