Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Videos, Pictures and others resource from SD?

Author
Message
Juande
13
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 27th Jul 2012 00:13
Hi everyone!

I have build AppGameKit appGameKit and I have started to test the application... This application is perfect for android... It's complicated the part of eclipse cygwin... but finally it's perfect.

But, I have a lot of doubts. I want to make a new game (adventure game) but... First, I can't load and play videos!! and in adventure game is important. Ok... I thought... no problem. I can use the animated sprites. Nooo! it's very slow when the pictures load. How can I play a animation (fastly)?

On the other hand. My game will be a lot of images with high resolution. This is a problem because, google allows up to 50 MB. And I thought... ok the user download my app and next, the app download the pictures from server... but how? how can I load pictures from sd? loadimage allows loading from apk file. What is the folder for using (in android tablet or phone)?

Thanks for your time.

P.S. Sorry, my english is very bad. If you don't understand me, please tell me.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 06:04
There are no video functions in AppGameKit, sorry.

For saving and accessing new files, they end up in the platform specific default location for where application generated data gets put (call this the appgen directory for later reference).

In theory on an Android, the appgen directory ends up on the sd card (if your device has one) in a directory named AGK/<yourapp>/media for Tier 1 and AGK/<yourapp> for Tier 2. But, sometimes it shows up in AGK/unknown/media or AGK/unknown. This is something being looked into.

You can reset the default directory, but I've not had a lot of success getting those commands to behave the way I expect.

An app created with AppGameKit (Tier 1 or Tier 2) will first look in the application directory (Tier 2) or the media directory under the application directory (Tier 1). If the file looked for is not there, it will then check the appgen directory. Or it is the other way around. But either way, if you create a unique file in the appgen directory and try to open it, it should be found.

Cheers,
Ancient Lady
AGK Community Tester
Juande
13
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 27th Jul 2012 09:40
Ok! Video is not supported.

Now, The AGK/<app>/media... I suppose I copy the folder media in my folder "android" for compiling with eclipse but without the images... And then I make a folder in my Android device. This folder is called AGK/app/media for example, but where? in sd root? in data/android Why don't I use the folder com.mycompay.mygame? I thought that I modify Androidmanifest for selecting the folder where I want to save my files...

Thanks!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Jul 2012 19:40
You do not need to copy or create anything manually on your Android device. When you install the app, it takes care of everything automagically.

And my apologies about where the directory is. I was thinking of some other bits when I responded last night (just before going to bed). I'm usually much more careful about that kind of thing.

On the android, it will use the com.mycompany.mygame directory.

Again, you do not have to manually do anything to set/create directories.

When your app runs, if you create a file, the AppGameKit stuff takes care of creating any directory indicated (media or whatever) in the application data area (the same setup used by all Android apps that generate files).

As long as you use the exact same name for the file generated (case counts) as well as any directory you specifically indicate, the created file can be accessed without doing anything else.

So if you download an image from a site, it should be available where you told it to go.

Cheers,
Ancient Lady
AGK Community Tester
Juande
13
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 27th Jul 2012 20:00
Ah! Ok. Thanks!

Login to post a reply

Server time is: 2024-11-23 19:30:48
Your offset time is: 2024-11-23 19:30:48