l3ger0j / Questopia

Android fork port of Quest Soft Player
Apache License 2.0
16 stars 2 forks source link

> File path question #31

Closed iceberg2271 closed 5 months ago

iceberg2271 commented 6 months ago
          > Try the new version of Questopia!

https://github.com/l3ger0j/Questopia/releases/tag/3.21.2

The problem still exists,When I open image debug,it‘s show that image file cannot be found:/avator. Actually,the filename is Avator. use the 3.21.4

Originally posted by @iceberg2271 in https://github.com/l3ger0j/Questopia/issues/27#issuecomment-1926606928

l3ger0j commented 6 months ago

Maybe this is a code problem? I checked the code and there is nothing here that would affect the case sensitivity in any way. Questoria searches for images exactly along the path that the library gives

iceberg2271 commented 6 months ago

Maybe this is a code problem? I checked the code and there is nothing here that would affect the case sensitivity in any way. Questoria searches for images exactly along the path that the library gives

Maybe,2.4.0 initialize the game by moving the data to the application data path. Is it possible that the file reading mechanism of andorid itself is involved?

l3ger0j commented 6 months ago

Maybe,2.4.0 initialize the game by moving the data to the application data path. Is it possible that the file reading mechanism of andorid itself is involved?

Yes, I do not exclude that the problem is changing the way the Android or player works with the file. Previously, the player got full access to external storage (which, by the way, is highly discouraged by Google) and used the File API. Currently, the player does not get full access to the external storage and uses the DocumentFile API.

However, not everywhere. In the proxy class, a small hack is used between the Questopia application code and the QSP library code to use the DocumentFile API. That is, if you are interested in the implementation details, a third-party SimpleStorageHelper library is used there to get the full path to the qsp file, and then this path is "fed" to the QSP library. Maybe that's the problem? But, again, I'm not sure.

iceberg2271 commented 6 months ago

Maybe,2.4.0 initialize the game by moving the data to the application data path. Is it possible that the file reading mechanism of andorid itself is involved?

Yes, I do not exclude that the problem is changing the way the Android or player works with the file. Previously, the player got full access to external storage (which, by the way, is highly discouraged by Google) and used the File API. Currently, the player does not get full access to the external storage and uses the DocumentFile API.

However, not everywhere. In the proxy class, a small hack is used between the Questopia application code and the QSP library code to use the DocumentFile API. That is, if you are interested in the implementation details, a third-party SimpleStorageHelper library is used there to get the full path to the qsp file, and then this path is "fed" to the QSP library. Maybe that's the problem? But, again, I'm not sure.

Is it possible to provide a method to install the game, similar to version 2.4.0, which places the file in the application directory to speed up the game reading and test whether this problem exists?

l3ger0j commented 6 months ago

Is it possible to provide a method to install the game, similar to version 2.4.0, which places the file in the application directory to speed up the game reading and test whether this problem exists?

Yes, I think it's possible, but this method is not designed for games that will have a "weight" of any more than 100 MB. If you agree with such restrictions, then I will start forming a branch that will include these changes.

iceberg2271 commented 6 months ago

Is it possible to provide a method to install the game, similar to version 2.4.0, which places the file in the application directory to speed up the game reading and test whether this problem exists?

Yes, I think it's possible, but this method is not designed for games that will have a "weight" of any more than 100 MB. If you agree with such restrictions, then I will start forming a branch that will include these changes.

Why is there a 100MB limit?

l3ger0j commented 6 months ago

Because it is from this size that freezes, all sorts of bugs, and other things begin

iceberg2271 commented 6 months ago

Because it is from this size that freezes, all sorts of bugs, and other things begin

Why not try another way.Installing the game is equivalent to opening the specified folder in the application directory. I can try to manually copy the files to the specified folder.