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 / Porting my 1.076 title to Android

Author
Message
ManOfActionTM
13
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 25th Apr 2013 02:08 Edited at: 25th Apr 2013 02:10
I've been trying to do this for the last couple of days, following the guides that are available. However, I was curious:

Would it be easier to update AppGameKit to a more recent version (one of the 1.08's) and port from there? Or is the BETA still too BETA for a release?

EDIT: I should mention that I'm doing Tier 2
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Apr 2013 05:25 Edited at: 25th Apr 2013 05:26
Unless you need something in v108+, do NOT switch. (EDIT) Yes, it is still way too beta with some significant bugs (depending on what you use).

I took an existing and working v1076 Tier 2 WIP and put the files into a v10811 project and now none of the depth layers work properly.

I have my Tier 2 WIP working in Windows, Android, iOS and Mac.

What are you having trouble with?

Where did you get the Android template that you should have started from to port your Windows Tier 2 app?

And were you careful about which files you copied from your Windows project? You need to NOT copy the CoreForApp.h and Core.cpp files from the Windows project into the Android one.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 26th Apr 2013 00:47
We have several projects built in 108 that have been thoroughly tested and released on iOS and Android app stores so I would say they are definitely suitable for development, if not stable.

For the depth issues have you tried the new command SetSortCreated(1), we had a few complaints that the 1076 way of sorting was not consistent enough so now that command will force sprites at the same depth to be sorted in the order they were created.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 26th Apr 2013 18:17
Well, the issue isn't sprites or text at the same depth.

I have buttons made of sprites and text set to depth 2 and 1, respectively. And then a pair of sprites set to depth 3 for blocking the area behind the button sprites. And I have a text object that is set to depth 5, which should be behind everything else. Finally, there is a background object at depth 5.

But when the display gets created, in v10811, the text object is on top with the background object underneath it and everything else is hidden behind the background.

This doesn't happen with the same code in v1076.

I am trying to test this again, but the app keeps crashing in v10811 on Windows. I'll get back to you on this one, once I am sure that what I've stated above is as I thought (my observations had been on Android and iOS versions of the app).

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 26th Apr 2013 20:18
Naturally, having rebuilt the project, issues appear to have disappeared.

But, when using the SetSortCreated(1) command, I actually get things displaying that shouldn't. A sprite set to depth 7 displays above ones set to depth 5. When I removed the command, that problem disappeared.

But I still have some that are not working properly. A whole bunch of sprites set to depth 992 are still showing on top of other things. But that may be a programming issue. Even though it shouldn't be because the same code works in v1076. I am investigating now.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
ManOfActionTM
13
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 27th Apr 2013 03:21
The problem I WAS having was that nothing would run on the Android device--it would just error out and not run without showing me anything.

Taking Ancient Lady's advice, I made sure that I did not accidentally copy over the CoreForApp.h or Core.cpp files from my other builds (not sure if that's the problem or not, but it was at least a possibility).

I am downloading the template from the appgamekit wiki (template_android_v1076.zip)

The problem I'm NOW having is that there is a compiler error using the .bat file the guide told me to create. There is a permission denied error in attempting to open ./obj/local/armeabi/libAGKAndroid.a

quick question: ./obj/ doesn't the . go back one directory?? if so, then that is the problem, as there is no obj folder if I go up a directory
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Apr 2013 18:59
Quote: "quick question: ./obj/ doesn't the . go back one directory?"

No, a single period means the current directory. '..' means the one above.

The CoreForApp.h and Core.cpp files are platform specific things.

I have not tried to use the batch file method in v1076. I updated the Wiki page to use that instead of the instructions for setting the permissions on everything.

Try using the original cygwin instructions for navigating to your project directory and doing the clean and build.

Or, here are cygwin instructions for making everything writable/owned by your Windows id:


That might clear up the problem.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
ManOfActionTM
13
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 27th Apr 2013 21:56
Okay, we're a little closer! (Thanks Ancient Lady again!)

Now, when I try to run or debug the game to my android phone, all that happens is the phone goes dark, then returns to the home screen.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 27th Apr 2013 22:07
That would indicate that there is a failure occurring when the app starts up.

Are the names of any files that you open with a Load<something> or file open exactly the same casewise as used in your code? Android is very case sensitive about files.

And where are the files in your Android project path?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
ManOfActionTM
13
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 28th Apr 2013 00:00
As far as I'm aware, they are all the same case, I'll do a quick look through though...

The code source files are in jni, all of the assets are in assets/media

my code is looking for the assets in "Assets/<folder>"

that seems like there is a problem somewhere...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Apr 2013 00:19
Don't include 'Assets/' in your load statements.

If everything is in <andproj>/assets/media, reference it all as "/media/filname.xxx". The leading '/' means that it is relative to the app execution space (which does NOT include a directory named assets).

And, if you in fact were supposed to include 'assets' in the path, it would have to be 'assets' and not 'Assets'. Those are two completely different directories/files as far as Android is concerned. But, don't include 'assets' in the path.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
ManOfActionTM
13
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 28th Apr 2013 00:35
sorry, nothing is referencing assets (or Assets) like I thought it was (must have taken that at some point)

Everything is following the proper case, everything is looking for "/<theme>/filename.xxx"
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Apr 2013 03:07
And you are sure that all the names/paths used are spelled exactly in the code as in the files/directories?

Does the Windows version work properly?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
ManOfActionTM
13
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 28th Apr 2013 06:39
Yeah, the windows version works fine, the iOS version has already been released for more than a year--I can't seem to figure out the Android version however.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Apr 2013 18:01
Are you running (trying anyway) from Eclipse? Or building the apk in Eclipse and then getting it onto your device and running?

If running from Eclipse:
Have you tried in the debug display (which should show you the logs on your device while executing)?
Have you tried starting the app from the device after it fails from Eclipse (the app is left installed on the device)?

If running directly (or after installed from Eclipse):
Do you have aLogcat and have you checked to see what might be happening?

What Android device are you using (device and version)?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 12:14:21
Your offset time is: 2024-11-24 12:14:21