Android apk and drawers

Please post anything related to the Hollywood APK Compiler here

Android apk and drawers

Postby xabierpayet » Sat Apr 23, 2016 3:18 am

is possible include some drawers with some hundreds of files inside an apk in android? is possible compress and uncompress archives directly from a hollywood application? (in android)
xabierpayet
 
Posts: 160
Joined: Fri Feb 24, 2012 10:34 am

Re: Android apk and drawers

Postby airsoftsoftwair » Sun Apr 24, 2016 11:38 am

xabierpayet wrote:is possible include some drawers with some hundreds of files inside an apk in android?


No, only single files can currently be included directly as assets, not whole drawers.

is possible compress and uncompress archives directly from a hollywood application? (in android)


No, only single files using CompressFile() and DecompressFile().
User avatar
airsoftsoftwair
 
Posts: 2415
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Android apk and drawers

Postby xabierpayet » Sun Apr 24, 2016 7:21 pm

ok, maybe is interesting update the compressfile and decompressfile comands, download 1000´s of files is not a good idea
xabierpayet
 
Posts: 160
Joined: Fri Feb 24, 2012 10:34 am

Re: Android apk and drawers

Postby airsoftsoftwair » Fri Apr 29, 2016 4:36 pm

A plugin is planned for archive support.
User avatar
airsoftsoftwair
 
Posts: 2415
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Android apk and drawers

Postby g0blin » Sun Apr 15, 2018 3:34 pm

Hello guys,

I am currently porting my game to create an apk package and, after some experimenting, I'm finally getting some decent results.

However, since the project is rather complex, I have some issues to raise, hoping to find some work around.

1) I do appreciate the fact that the compiler can wrap "external" files to the package by using the "GetAsset" command. Nonetheless, despite the compiler GUI can link files coming from subdirectories (eg: C:\Users\Gianluca\Desktop\TSMC_And\Data\Stills\entry-credit03.tif), they need to be put in a single directory at executable level. What I mean is that the original code:

LoadBrush(503,"Data/Stills/entry-credit03.tif")

must now become:

LoadBrush(503,GetAsset("entry-credit03.tif"))

It is not a big deal, yet it forces to modify the entire original code, something that it is not error-safe in a project with over 40K lines of code.
I'll try to deal with that a little bit at the time, but I think it should be nice if in the future such a feature could be implemented, since I think it is easier to code a project where resources are grouped into meaningful drawer (Backgrounds, Sprites, Props, Sounds etc...) rather then putting all of them in a single one.

2) At present resouces can be linked to the code by using the "Assets" tab of the APK Compiler. I found no other way to do it than loading them one by one, since the "Add.." button accept only a single selection at the time. Again, the game holds hundres of resources divided in graphics and sounds, and it really takes forever (besides not being error free). Saving the project as ".acp" is sure a very good help (thanks guys, I really mean it) but again, I hope to see an improvement in the future for this matter as well.

3) Finally, the game needs to save and load progress and system data. How does this work on Android? I mean, how does the "GetAsset" command works in this case? Does it sport a behaviour similar to any other file-related instruction? In other words, can i transform these lines ....

If Exists("Saved_game/my_global_variables.bin") And Exists("Saved_game/world.bin")
p_LoadData()
........

in something like ....

If Exists(GetAsset("my_global_variables.bin")) And Exists(GetAsset("world.bin"))
p_LoadData()
......


Thanks for your time and thanks for making this possible.
Gianluca aka g0blin
g0blin
 
Posts: 39
Joined: Tue Oct 04, 2011 9:06 am

Re: Android apk and drawers

Postby airsoftsoftwair » Mon Apr 16, 2018 10:37 pm

g0blin wrote:1) I do appreciate the fact that the compiler can wrap "external" files to the package by using the "GetAsset" command. Nonetheless, despite the compiler GUI can link files coming from subdirectories (eg: C:\Users\Gianluca\Desktop\TSMC_And\Data\Stills\entry-credit03.tif), they need to be put in a single directory at executable level. What I mean is that the original code:

LoadBrush(503,"Data/Stills/entry-credit03.tif")

must now become:

LoadBrush(503,GetAsset("entry-credit03.tif"))

It is not a big deal, yet it forces to modify the entire original code, something that it is not error-safe in a project with over 40K lines of code.
I'll try to deal with that a little bit at the time, but I think it should be nice if in the future such a feature could be implemented, since I think it is easier to code a project where resources are grouped into meaningful drawer (Backgrounds, Sprites, Props, Sounds etc...) rather then putting all of them in a single one.

2) At present resouces can be linked to the code by using the "Assets" tab of the APK Compiler. I found no other way to do it than loading them one by one, since the "Add.." button accept only a single selection at the time. Again, the game holds hundres of resources divided in graphics and sounds, and it really takes forever (besides not being error free). Saving the project as ".acp" is sure a very good help (thanks guys, I really mean it) but again, I hope to see an improvement in the future for this matter as well.


Yes, you're right. For huge projects this is of course very cumbersome. I'll see if I can improve the APK Compiler to allow importing whole asset folders. This should make it much easier for you then.

3) Finally, the game needs to save and load progress and system data. How does this work on Android? I mean, how does the "GetAsset" command works in this case? Does it sport a behaviour similar to any other file-related instruction? In other words, can i transform these lines ....


I'd save data to the path returned by GetSystemInfo().Preferences.
User avatar
airsoftsoftwair
 
Posts: 2415
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Android apk and drawers

Postby g0blin » Tue Apr 17, 2018 10:10 am

Thanks a lot mate,

you're the man!

The more I study Hollywood the more I like it!

Keep it up
Gianluca
g0blin
 
Posts: 39
Joined: Tue Oct 04, 2011 9:06 am


Return to APK Compiler

Who is online

Users browsing this forum: No registered users and 1 guest