Git Product home page Git Product logo

Comments (6)

daniele-rapagnani avatar daniele-rapagnani commented on May 29, 2024

After some investigating the problem is potentially linked to #13.
I've discovered that AAssetManager_openDir does not list directories but only files by design (android/ndk-samples#603).
Aleph One needs to enumerate files and directories in multiple occasions and one of these occasions is when trying to load plugins from the Plugins folder but it fails as if the directory were empty.
The problem with the HUD is that there's no default implementation of the HUD for M1, it's distributed as a plugin and the plugin is not loaded because of this issue.

Possible solutions are:

  1. Copy all the assets to the internal storage. This may also help with #13 but will double the storage needed for the games with no good reason.
  2. Bake a list of the assets directory structure in some kind of format that can be loaded at runtime and used to resolve files
  3. Use JNI to interface with Android SDK's AssetManager which is not affected by this design decision

I think N°2 is probably the best of the three and may also help to solve #13 if the enumeration is what's slowing things down but not if it's reading/seeking into the assets. If that's the case only N°1 would help.

from alephone-android.

daniele-rapagnani avatar daniele-rapagnani commented on May 29, 2024

I've implemented solution N°2 in #21. The HUD (and plugins in general) now works but sadly it doesn't seem to have affected #13 at all.

from alephone-android.

PaulShaggy avatar PaulShaggy commented on May 29, 2024

First of all, many, many thanks on porting AlephOne to Android! I've tried to find a way to play Marathon on the go for years and now I finally can.

Regarding the matter at hand: I've compiled the branch with the baked filesystem to get the HUD working in Marathon 1 - and it does - but the game will now no longer load savegames... at least not in any reasonable timeframe (<5min).
This is not the case for Durandal and Infinity when using the baked-fs version. Those load savegames just fine (although it takes a few seconds).
Activating and deactivating plugins doesn't seem to affect the process as far as I could see.

I've used Java 11 OpenJDK, CMake 3.14.4, NDK 18.1.5063045 and Gradle 5.4.1-all.
Did I do something wrong or can you reproduce this issue?

from alephone-android.

daniele-rapagnani avatar daniele-rapagnani commented on May 29, 2024

Hey @PaulShaggy! I haven't encountered this issue but I have to say that I didn't test the baked-fs fix thoroughly, that's why I didn't merge it yet, so it's entirely possibile that it interferes somehow with how saves are loaded in Marathon 1.

I'm currently putting my energies in another project but I'll take a look at this soon I hope!

from alephone-android.

PaulShaggy avatar PaulShaggy commented on May 29, 2024

Small Update:
I managed to compile Marathon 1 using the old M1A1 data files ( https://github.com/Aleph-One-Marathon/data-m1a1 )
This version of the game does have a HUD similar to Durandal and Infinite, and it's correctly displayed on Android. Saving and Loading also works.
On the other hand, it does now suffer from similarly long loading times as the other two games, because the size of the assets has increased.
Still, it might be an intermediate solution to play the game...

EDIT:
Download-Link for my version: https://www.dropbox.com/s/4z2tvof79ug28mr/M1A1_for_Android.apk?dl=0
(I don't think it's signed. Worked fine on my GPD XD+)

from alephone-android.

daniele-rapagnani avatar daniele-rapagnani commented on May 29, 2024

@PaulShaggy that's an interesting find nonetheless. Shapes, sounds, etc, should really be the same considering we are not using HD assets. I don't se why the old data files should slow everything down as with M2 or Infinity, this may be a clue to get a better understanding of the issue.

from alephone-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.