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 / broadcast works fine but compiled crashes

Author
Message
Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 3rd Jun 2012 11:58
When I broadcast my app it works and plays on the android just like it does when I play it on the pc with the editor, however after compiling (following the steps in the android instructions) it loads the title screen, but one of the sprites (called PlayOptionsQuit.png) doesn't load properly (I get an X instead of the picture) then when the game starts, it crashes.

The app Is Haunted Mini Golf and it's nearly finished, any ideas? Can I send it to someone here and see what's going on?
Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 3rd Jun 2012 17:04
I'd happily take a look... The first thing I'd check is to ensure you have the case correct in your code vs your image name. Android is case sensitive so you need to make sure your code is identical to the file name. For example, an image name of MyImage.png will not load if you are coding myimage.png.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jun 2012 19:37
If you are using v107x then you need to ad a media directory under the assets one (assets/media).

That is the directory to put all of your media and the bytecode file.

The only exception is if you are using an AGKSplash.png file, that goes in the assets directory.

Also, it helps if you explicitly request the media directory in your loads like this LoadImage("/media/myimage.png"). The leading '/' forces the app to look in the media subdirectory.

When an Android app is loaded to the device, it appears to include everything in the assets directory on the PC in the same directory as the executable is loaded on the Android device.

If you never use any of the functions to change the directory location (and I've had a lot of trouble with them), you should not need to explicitly add '/media/' to the media loading functions (I think).

Cheers,
Ancient Lady
Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 3rd Jun 2012 20:57
I'll check the case and if that doesn't work I'll try the media directory. It's weird how it works just find when broadcast...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jun 2012 22:19
Windows does give a hoot about case, which causes lots of problems (in my opinion).

Also, in about 1073, they modified the non-windows interpreter codes to force all other platforms to use a directory named 'media'. But they didn't publish that information very well. So, something that worked prior to that with just the assets directory, no longer works as expected.

Cheers,
Ancient Lady
Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 4th Jun 2012 00:40
Does the bytecode go in that media folder or does it stay in the assets folder?

Why does the AppGameKit player version work just fine... even with the mismatched cases on media files? I really think they could make this a lot easier.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 4th Jun 2012 00:44
It goes in the media folder.

The player works fine because it is simply echoing what is being sent from your windows machine. It is not actually executing stuff on its own device.

Cheers,
Ancient Lady
Sinistar99_2
13
Years of Service
User Offline
Joined: 5th Dec 2010
Location:
Posted: 4th Jun 2012 02:08
Now I can't figure out if it's compiling or not. Here's a screenshot --which doesn't seem to look like the lines in the instructions. What am I missing?

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 4th Jun 2012 04:21 Edited at: 4th Jun 2012 04:21
That doesn't look complete.

Try this first, to make sure it is 'clean':


It should look something like this:


Cheers,
Ancient Lady

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 6th Jun 2012 03:35 Edited at: 6th Jun 2012 03:36
Quote: "Why does the AppGameKit player version work just fine... even with the mismatched cases on media files? I really think they could make this a lot easier."


AGK makes every effort to ignore case, and items broadcast to the AppGameKit player are under its control so it can know it has a file "Image.png" when you try and load "image.png" it'll switch to the correct file name.

Unfortunately the one exception to this rule is the Android assets folder which for some reason has no API function to list the directories it contains (only files in the root folder), so AppGameKit can't know in advance what files it has available so can't correct any file names for this folder.

Quote: "Here's a screenshot --which doesn't seem to look like the lines in the instructions. What am I missing?"


You will get the two "Install" lines like that if NDK can't detect any changes in the source files, so skips the compile step.

Login to post a reply

Server time is: 2024-05-02 17:10:52
Your offset time is: 2024-05-02 17:10:52