Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Multiple world support #6219

Open
2 tasks done
NiQ1 opened this issue Sep 14, 2019 · 5 comments
Open
2 tasks done

Multiple world support #6219

NiQ1 opened this issue Sep 14, 2019 · 5 comments

Comments

@NiQ1
Copy link

NiQ1 commented Sep 14, 2019

I'm basically trying to create the option to support multiple world (map servers) from a single login server. Just to be clear I'm not expecting anyone else to bother, rather I'm trying to code this myself and just need some assistance since I'm new to the code. Right now I'm trying to figure out how to add more than one server name when creating a character.

I've narrowed it down to LOBBY_024_RESERVEPACKET in mmo.h, which is a binary hex blob into which the server name is copied. I have no idea what each field in the packet means so if someone knows anything about it please tell me. Also please refer me to any packet dumping tools that I can use to capture the packet from retail so I can compare.

Many thanks for your assistance, please help a new developer join!

I have:

  • searched existing issues (http://github.com/darkstarproject/darkstar/issues/) to see if the issue I am posting has already been addressed or opened by another contributor
  • checked the commit log to see if my issue has been resolved since my server was last updated

Client Version (type /ver in game) :
irrelevant

Source Branch (master/stable) :
stable

Additional Information (Steps to reproduce/Expected behavior) :

@Noikar
Copy link

Noikar commented Jan 15, 2020

Just curious if you got it to work

@NiQ1
Copy link
Author

NiQ1 commented Jan 15, 2020

Just curious if you got it to work

Yes, I did.
https://github.com/NiQ1/darkstar/tree/Multiworld

The thing is that it requires a non-trivial change to the DB schema so I'm not sure it'll ever be accepted. I will create a PR if someone actually interested.

@Noikar
Copy link

Noikar commented Jan 15, 2020 via email

@NiQ1
Copy link
Author

NiQ1 commented Jan 16, 2020

Message me on discord: Lynnea#1328 I feel like we could simplify this system a lot lol

On Wed, Jan 15, 2020 at 5:40 PM NiQ1 @.***> wrote: Just curious if you got it to work Yes, I did. https://github.com/NiQ1/darkstar/tree/Multiworld The thing is that it requires a non-trivial change to the DB schema so I'm not sure it'll ever be accepted. I will create a PR if someone actually interested. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#6219?email_source=notifications&email_token=AJIPZICCRLFFRRZIL7IMKKDQ56GE7A5CNFSM4IWXPVQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJCCFVQ#issuecomment-574890710>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJIPZIH6PZ3FQ5OLKMWLFJLQ56GE7ANCNFSM4IWXPVQA .

Sent you a friend request.

@NiQ1
Copy link
Author

NiQ1 commented Jan 17, 2020

I'll summarize the status here for whoever stumbles upon this -
This is possible and PoC is available in the aforementioned branch. I've decided not to create a PR at this point because I doubt it'll ever be merged due to effort / benefit concerns -
Basically the feature is not practically required by any running services (actually, I'm not even sure whether retail will continue running that many worlds much further). The only reasons to use this is to implement different era / custom-configuration servers and/or allowing developers to connect to Atomos-like test servers from the same login server. It is nice to have but not strictly required.

As for the potential problems - The patch requires pretty extensive changes to the DB schema, with a world id column added to multiple tables in order to achieve complete separation between worlds. Some work (not sure how much) will be needed to provide an easy upgrade path. The changes to the schema will be required even if not actually using the feature.
Another approach that I've considered is to use completely separate databases for each world, however two big issues arise here - (1) it will require to separate the login database from the map database, causing again a big schema change that affects even servers that don't use the feature and (2) there are several tables used by both servers (e.g. the accounts table), which will need to be tightly synced between the servers, causing issues if one goes down. This approach will also make a world transfer service more difficult to implement and it seems that retail doesn't use this approach either.
Also, extensive tests will be needed - I've done basic tests on my PoC branch, namely verified that characters, search and chat doesn't leak between worlds, but have not tested every single feature implemented in DSP and obviously not all content.

Conclusion - This was a nice experiment and at least I consider it a PoC level success. I will only create a PR if requested by a team member who's likely to be able to convince others to merge this or if a major "NG" branch is ever created. Feel free to use my code base though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants