Quote:
But how could you use multiple worlds to handle multiple instances of the same world???
If I want to handle another world on the server, I'd just create another World class and populate it. All it would take is a little bit of tweaking on the Server class maybe, since I don't have it set up perfectly, but yeah, it would be pretty simple. Again, its all about abstraction.
Just to clarify, it would be, like you said, multiple instances. The world is constructed the same, but the dynamic entities that define it (NPCs, users, generated items, etc) are different. Its just like choosing a server on WoW or a channel on Maple Story - same world, different dynamic population.
Also, whats wrong with having "one instance to hold everything"? The World contains everything that is part of it, just like it should. It doesn't mean other parts can't use a reference to the World - each Map knows about what World it is attached to, and each Character knows about what map it is attached to. Of course, with some refactoring, I could break these dependencies apart and make them even more independent.
It sounds like you just need to practice more with your OOP.
