- Home /
Most efficient way to structure a huge online "virtual world"
(I am not concerned with the terrain generation aspect yet, but with how the server would work)
I am imagining a huge world with terrain that can be manipulated. For this I imagine large arrays containing terrain heights, tree placement, terrain type, animal spawns; things like that that the client will assemble to display the virtual world.
My question is how best to store all this information? I am currently investigating SmartFoxServer 2X. I have also worked with MySQL databases in the past and realize this is a feasible method, however I have no clue as to how efficient this would be. Perhaps I might build a server application within Unity and store it all in arrays, but that sounds unstable to me.
I'd love to hear what my options are, and their pros and cons! If anyone has attempted anything similar please share your experience. I know I can build this game within Unity but have little experience with Networks or multiplayer, and would love to know where to start.
Thanks in advance to anyone who takes the time to lend their advice/experiences!
...
For the purpose of an example, I am imagining a world with ~2000x2000 tiles, each with height data, terrain type data, tree/foliage data and building data. I am hoping several hundred user connections would be possible (I know view distance will be important).
If you're going to do it yourself, the only realistic way to go is $$anonymous$$ySql. So it would just be a typical "LA$$anonymous$$P" system running on your server at 1and1.
(what you said about 'arrays, build server' etc is totally off track, forget that.)
You should realize this is a staggering amount of work.
Regarding SmartFox, the whole idea is that SmartFox is a middleware system that avoids you having to do it yourself.
I'm not familiar with SmartFox, but perhaps someone who is could list SmartFox and it's competitors? ie the other middleware solutions for $$anonymous$$$$anonymous$$P.
Just to repeat, if you want to "do it yourself", yes you must use PHP (or perhaps Perl) and $$anonymous$$ySql.
Hopefully someone here can compare and contrast SmartFox and other middleware solutions.
Thanks "Fattie", that's great for getting me on track, which is what I was ai$$anonymous$$g for.
I have worked with $$anonymous$$ySQL and PHP a lot before I ever even knew of Unity so that is encouraging. I was not sure about how efficient it was, as I imagine simply building one chunk of terrain means several hundred queries. Perhaps I should investigate that more and see if there is a simpler solution.
At least PHP/$$anonymous$$ySQL is a well explored field so help should be abundant.
And this is just my hobby so I'm not too concerned about the time commitment. I've found that I enjoy learning and creating games more than playing them, and boy do I have a lot of hours to spare now!
O$$anonymous$$. Yeah there is absolutely no problem with efficiency.
Indeed, I'd guess that "SmartFox" in fact uses $$anonymous$$ySql. (If not $$anonymous$$ySql for some reason, just some other sql database.)
Very best !