AttorneyOnline / AO2-Client

An off-the-cuff courtroom drama simulator
https://aceattorneyonline.com
GNU General Public License v3.0
61 stars 59 forks source link

Downloading server resources while connecting to server #177

Open cyb3rm4n opened 4 years ago

cyb3rm4n commented 4 years ago

Some servers have big data sets with custom music etc. Sometimes it's not so easy to download files from google docs, extract it to needed folders. What about giving servers an option to share the needed resources with the client?

oldmud0 commented 4 years ago

Edited original post for spelling.

This was actually one of the first tasks that I took upon myself when I was introduced to AO by my brother. At the time, the only client available was the Delphi client; AO2 did not even exist. I tried finding ways to inject code into the client to execute an auto-downloader on join, but I was not able to find an exploit. So I stayed dormant in the AO scene until someone scraped up the time to make a new client, which to my surprise actually happened (AO2).

When that happened, again I proposed a concept for auto-downloading, but eventually Omni just shoved the whole project at my face. So in my limited time I was more concentrated on holding the project together than I was adding a feature that looked impossible to pull off cleanly considering the state of the code base.

After some evaluation, I concluded that the "best" way of adding the ability to download assets was by writing a launcher. Server owners could push a custom client and assets through the launcher. It was effective, and some large servers like AOV use the launcher. Meanwhile, webAO uses a base folder that is fetched on demand. These are, in some respects, "level 1" implementations because they hide various limitations, such as...

The "level 2" implementation would be to allow multiple base folders to be mounted simultaneously. It's a great improvement, but that still doesn't fully add the feature because players are interested in downloading what they don't have, on join.

The "level 3" implementation is to separate assets into packages that are then installed and mounted appropriately. I outlined what this would look like in an old document. It is not an easy feature to add, and in trying to implement it I got sidetracked and ended up refactoring the wrong part of the code base. Later, I decided to implement it with a fresh mind in a comfortable language, though I made a design mistake that prompted me to rewrite half the thing.

However, this is an otherwise valid feature request, and I'll keep this issue open to track the progress of its completion.