Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsyncHandler: Normalize file requests #1729

Merged
merged 3 commits into from Oct 12, 2020

Conversation

Ghabry
Copy link
Member

@Ghabry Ghabry commented Mar 26, 2019

Forgot this one

Test case, created with new gencache from gencache PR:
https://easyrpg.org/play/pr1729/?game=yume_nikki_test

Title screen is renamed to "12345①.xyz" and NASU contains some 1s.

Also works because of version check:
https://easyrpg.org/play/pr1729/?game=yume_nikki

Master, fails to load assets in the new normalized one:
https://easyrpg.org/play/master/?game=yume_nikki_test

@Ghabry Ghabry added the Emscripten WebAssembly/JavaScript port for web browsers label Mar 26, 2019
@Ghabry Ghabry added this to the 0.6.1 milestone Mar 26, 2019
@Ghabry
Copy link
Member Author

Ghabry commented Mar 26, 2019

Actually maybe makes sense now to add a version field to gencache.
Because this is a breaking change. See EasyRPG/Tools#33

@Ghabry
Copy link
Member Author

Ghabry commented Mar 26, 2019

okay added the version check, now our old index.json files still work ;)

@fmatthew5876
Copy link
Contributor

How long do we need to keep around support for the old versions? Are they being used in the wild?

@Ghabry
Copy link
Member Author

Ghabry commented Mar 27, 2019

Well, we use them ;) and there are many pages around who use the web player and when they update it we can't expect from them that they create a new cache.
Most prominent is rmarchiv.tk, has a webplayer for all 2k/2k3 games and this uses a custom php-based index.json generator and somebody would need to submit a patch there first.

@Ghabry Ghabry modified the milestones: 0.6.1, 0.6.2 Jul 5, 2019
@Ghabry
Copy link
Member Author

Ghabry commented Jul 6, 2019

This is blocked by EasyRPG/Tools#40 EasyRPG/Tools#51

@Ghabry Ghabry changed the title AsyncHandler: Normalize file requests [DONT MERGE] AsyncHandler: Normalize file requests Sep 26, 2019
@fdelapena fdelapena added the Awaiting Rebase Pull requests with conflicting files due to former merge label Sep 27, 2019
@fdelapena fdelapena added Has PR Dependencies This PR depends on another PR Awaiting Rebase Pull requests with conflicting files due to former merge and removed Awaiting Rebase Pull requests with conflicting files due to former merge labels Jan 2, 2020
@Ghabry Ghabry closed this Jan 11, 2020
@Ghabry Ghabry deleted the emscripten-normalize branch January 11, 2020 11:58
@Ghabry Ghabry restored the emscripten-normalize branch January 11, 2020 14:39
@Ghabry Ghabry reopened this Jan 11, 2020
@Ghabry
Copy link
Member Author

Ghabry commented Jan 11, 2020

sorry I cleaned up my fork and deleted the wrong branch it seems xD

@Ghabry Ghabry modified the milestones: 0.6.2, 0.6.3 Mar 31, 2020
@Ghabry Ghabry marked this pull request as draft April 8, 2020 20:26
@fdelapena fdelapena changed the title [DONT MERGE] AsyncHandler: Normalize file requests AsyncHandler: Normalize file requests Apr 9, 2020
@fmatthew5876
Copy link
Contributor

Whats the story with this guy? Still relevant?

@Ghabry
Copy link
Member Author

Ghabry commented Aug 16, 2020

this still requires EasyRPG/Tools#40 EasyRPG/Tools#51

@fdelapena
Copy link
Contributor

No longer blocked by EasyRPG/Tools#51 🎉

@fdelapena fdelapena removed the Has PR Dependencies This PR depends on another PR label Oct 11, 2020
@Ghabry Ghabry removed the Awaiting Rebase Pull requests with conflicting files due to former merge label Oct 11, 2020
@Ghabry Ghabry marked this pull request as ready for review October 11, 2020 14:13
@Ghabry
Copy link
Member Author

Ghabry commented Oct 11, 2020

I retested now the 3 links above: Still works as expected. So is finished.

The file "TiTlE/12345①.xyz" is stored in the cache as "title":{"123451":"12345①.xyz" (+_dirname) and correctly fetched.


// When this option is enabled async requests are randomly delayed.
// This allows testing some aspects of async file fetching locally.
//#define EP_DEBUG_SIMULATE_ASYNC

namespace {
std::unordered_map<std::string, FileRequestAsync> async_requests;
std::unordered_map<std::string, std::string> file_mapping;
FlatUniqueMultiMap<std::string, std::string> file_mapping;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why switch to FlatUniqueMultiMap? Do you need multiple key support now?

@Ghabry
Copy link
Member Author

Ghabry commented Oct 11, 2020

Retested with the commit removed: Still works (obviously, I just changed the map data structure)

@Ghabry Ghabry requested a review from fdelapena October 11, 2020 17:01
@fmatthew5876 fmatthew5876 merged commit 3ca53ec into EasyRPG:master Oct 12, 2020
@Ghabry Ghabry deleted the emscripten-normalize branch May 27, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Emscripten WebAssembly/JavaScript port for web browsers
Development

Successfully merging this pull request may close these issues.

None yet

3 participants