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 / TGC's AGK Tier 1 Android Tutorial for Windows [beta]

Author
Message
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 28th Mar 2012 12:10 Edited at: 28th Mar 2012 14:00
Hi everyone,

As you all know TGC conducted a survey not so long ago in an effort to better understand the needs of our growing AppGameKit community. One of the most frequent requests from that survey was to improve the AppGameKit Tier 1 to Android documentation. Therefore Rick asked me to fully document this process. Attached to this post is the first draft of that document which will go on to be part of AGK's official support files.

Draft 1

In this draft the whole process of building your Tier 1 app for android has been documented and organised into modules, then sections. You may note that Module 6 has yet to be written, but module's 0 to 5 now reflect the full build process.

If you have any comments or suggestions on how to improve this document please post them. I'll upload draft 2 just as soon as I've documented the submission process for the Google Play app store.

Download Draft 1 PDF (6.05 MB)

Attachments

Login to view attachments
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 28th Mar 2012 13:50
I guess many people will be very happy with this. well done!
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 28th Mar 2012 14:31
Well done. Though, I need AppGameKit for Playbook deeper documentation right now, as I have no way of proper building the project. (I get patch errors and nobody is willing to help, besides Lee & Paul, but it seems they gave up or have no time to help me)

Your signature has been erased by a mod, please reduce it to no larger than 600 x 120.
The Zoq2
14
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 28th Mar 2012 15:05
Awsome, this will be helpfull for a lot of people!
Trisect Development
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Denmark
Posted: 28th Mar 2012 20:25
And a video tutorial on the side??

iOS Apps from Trisect Development.
Click here.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 28th Mar 2012 23:23
Daniel, take a look at this.

This is what I use myself & I got rid of Cygwin and command line typing!!!!!

http://mobilepearls.com/labs/ndk-builder-in-eclipse/
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 29th Mar 2012 00:13
Thanks I'll have a look into it.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th Mar 2012 06:44 Edited at: 29th Mar 2012 07:10
I have just tried this help file and it seems less confusing than the original, but I have still hit a snag. I have just installed the adt plugin as the guide instructs and on reboot of eclipse have encountered this problem.

I downloaded version 17 off the link provided and installed only what the guide said. I also had this issue, when I first tried to put a project onto android using the original guide. I got round it, by installing a newer API, but obviously it led to problems further down the line, and I don't want to repeat them. So before I bother going any further, I thought I'd post the question. Am I missing something obvious? Why am I being forced to reload the SDK manager to update it? Will installing a API higher than 17 mess up AppGameKit builds later?

Any suggestions would be appreciated.

Edit - I couldn't wait and had to press on lol. I noticed when going into the SDK manager, that the path had reverted to the original rather than the one I copied and pasted in from the guide. So on exploring Eclipse I found where to change it, and I seem to have got past that problem. I have no idea why it reverted to the original path, but if anyone else gets this problem, that's the solution anyway. I seem to have sorted that but I don't get the welcome to android development screen still just the eclipse ide, so something is still amiss.

Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 29th Mar 2012 10:17 Edited at: 29th Mar 2012 10:25
I had the same problem on one of my virtual machines. I initially tried various attempts using virtualbox and the Android SDK manager not appearing did appear at one point. This is because you've have a previous attempt fail or setup a previously different configuration. So Eclipse assumes that Android SDK's manager has already run.

You can open Android SDK's interface from your start menu, you can untick everything, then make sure you select the correct obsolete packages and install those to the correct path.

Failing this I would recommend the most direct solution. Remove everything, clear it all out and start over.

If you ever want to create a builder that's clean and separate from your system the virtualbox route is another approch, it's a bit slower but it has the benefit that you can just use it to build your programs without anything else on your OS getting in the way.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 30th Mar 2012 01:34
I decided to delete and try again. Still didn't get that Welcome screen again, but it seemed to have the correct SDK installed so I continued anyway. I seem to have had success! One app is not showing images, and has lots of x's moving about, but I think that is because most my media has capitals in the names, and or spaces. Another works fine, apart from me underestimating the small screen and hence having way to small buttons to be playable.
Odd that when sending my project via AppGameKit it ran fine, but when compiled it trashes the graphics, if it is just the case sensitivity causing it( I am only going from forum posts I have read in the past here).

Still I am happy I have got something working at all!

Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 30th Mar 2012 10:39
Quote: " but I think that is because most my media has capitals in the names, and or spaces."


All my media has capitals and spaces. This shouldn't be an issue aslong as it matches exactly to what you've coded. For example an image named 'Image One.png' is fine providing your code reflects this i.e. LoadImage("Image One.png").
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 30th Mar 2012 22:32
If the AppGameKit app itself compiles in Tier 1 and runs properly and you copy the files over to the assets folder correctly then it doesn't matter if there are capitals and spaces in it. Tier 1 code is more like a plugin, then something that actually gets handled by this process.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 31st Mar 2012 20:21
Well in looking and seeing what works and what doesn't, I can tell you that the one or 2 intact images are lowercase. The rest are differently scaled red x's, and also happen to contain uppercase letters. I will try changing my load code to match the media first. If not, I will have to change the media to all lowercase. Other than that, some media is in sub folders and some is not, but that seems to be ok as far as I can see.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 31st Mar 2012 20:37
Several of us have discovered problems with sub-directories under the main media one.

I know that I couldn't get my Android version to see my image files when I used sub-directories.

Cheers,
Ancient Lady
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 31st Mar 2012 22:20
If you send the your zipped projects to me I'll see if I can troubleshoot the issue, and if necessary I will update the instructions so others can avoid the same issue.

You can send your project to daniel@thegamecreators.com
Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 31st Mar 2012 22:39
Quote: "All my media has capitals and spaces."


I take that back... I just took another look and although I have capital letters and sub-directories, I do not have spaces (see below)... DVader, does the two that are intact have spaces? Similarly, does those that don't work have spaces? If so, that'd probably confirm that spaces are causing the problem...

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 31st Mar 2012 23:39
don't use spaces in file & directory names!

keep it simple, have all files & directory names as lowercase!
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 31st Mar 2012 23:45 Edited at: 31st Mar 2012 23:47
My TAB HD uses the same kind of subdirectory structure, I would look at the way the png files are encoded maybe. I use Gimp 2.7.6 to export my images without any issues if I use the default settings. Gimp 2.6 works as well. Also try using a power of two resolution for the image and as a rule I don't exceed 256x256 if I can avoid it.

But capital letters and spaces in the tier one app itself shouldn't cause any problems. It doesn't with my own sample programs.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Apr 2012 03:22 Edited at: 1st Apr 2012 03:30
I have got all the images in correctly now. I had to change all the files and directories to lowercase. It seems sub directories aren't a problem as long as they are lower case also, as I still have a number of them. I also checked my program structure, and made sure all references in the AppGameKit code were lowercase to match. It may be that if they matched beforehand, both in code and media they may have worked anyway. I might do a deliberate test to check this, now I have the compiling working.

Edit thanks for all the responses. I obviously hadn't refreshed the page when I posted this as several suggestions have appeared
@Daniel, it would be useful to include this in the guide as you say. If I find a definite answer I will post it. Changing to lowercase certainly did the trick for me this time, but as I said it may be because I didn't have the code exactly matching the media's name in parts, which it now does. So it could be either or at the min. If others have no issues with caps then I would imagine it is the code reference that is more important.

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 1st Apr 2012 09:49
For Unix or Java-based systems it's vital to use the same case throughout and avoid spaces in file names. What works on Windows may well NOT work on other platforms!

-- Jim
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 1st Apr 2012 13:48 Edited at: 1st Apr 2012 14:58
Ok I have created an application with multiple image files and just about every reasonable naming convention I can think of. Lowercase, uppercase, mixed case, spaces, and numerical. I even mixed the file extensions with mixed case.

In addition to this I've repeated the same with the subfolders down to two levels.

I've tested this on my PC, Android and Playbook device using the usual broadcast method. So far all these files loaded for me.

Feel free to test and comment.

Download

Directory structure and filenames

Attachments

Login to view attachments
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Apr 2012 15:17
Hi Daniel, I have tried your program and it has proven me correct in my assumption. You have many upper and lower case letters in your file names, which seems fine, I compiled it, and it ran ok. However I changed one capital in the AppGameKit code so as not to match the media one on a selected image. When running this, it still loaded fine, but when I clicked the relevant image, red x's abounded.

So it does seem vital to match the media casing with the reference in the code. It will work with either upper or lower, but only if both code and media names match exactly.

BTW, when running via AppGameKit on broadcast I had no such issues. I only had this media problem when my project was compiled.

Still, I forgot to thank you for the improved guide, as I have fared somewhat better than with the original!! Good work on it.

Mark Harrison
12
Years of Service
User Offline
Joined: 28th Oct 2011
Location: Australia
Posted: 5th Apr 2012 12:55
Thank you for the guide.
Would anyone like to test my game Big Guys? I followed the steps in the guide, but can't test it on the android phone i have because its locked to the android market, and the simulator on my computer seems to be running really slow, i don't know if its because of my app or not. It works ok in the agk player.

yo
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 5th Apr 2012 17:32
e-mail a link over to daniel@thegamecreators.com and I'll have a look at it for you. If you need something you can host it on while maintaining control of the download then Dropbox is good for that.
Joshua A
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location:
Posted: 9th Apr 2012 22:27 Edited at: 9th Apr 2012 22:30
Nice, this will be real helpfull.

will the tutorial also cover compiling the finished product.

Edit: Never mind... i failed to read the beta docs first.
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 10th Apr 2012 12:23 Edited at: 10th Apr 2012 12:24
It's all there, takes you from the start to the finish. The only bit it doesn't cover is the submission process for Google Play. Other then that, you have your APK ready to deploy.

As far as I can see no one has any major issues with this version of the document, if you do please let me know before the end of today as I'm going to be converting this into a full video tutorial.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 10th Apr 2012 19:23
Maybe you can do a part 2, with the submission steps to the google play store!
BraindeaD
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 11th Apr 2012 10:48
Anyone know if you can do from a Mac?
Is the process very different?
Thanks.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 24th Apr 2012 14:10 Edited at: 24th Apr 2012 14:10
Daniel, the guide seems good to me, perhaps you can mention on android you need to keep case sensitivity the same. So if you call a file "Bigwup.png" in your code make sure it is named Bigwup and not bigwup for instance. That is what seems to cause images to fail and be replaced by the red x.
Also, one thing that is a concern to any of us who had issues getting a compile enviroment set up, and don't much fancy repeating it is the new update. Will we have to go through the process all over with the new version? Or is there an easy shortcut? I can currently compile my projects fine since going through your guide, but will I have to redo most of it for 107?

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 24th Apr 2012 16:10
you just need to place the library files when new updates come out
payopepe
15
Years of Service
User Offline
Joined: 10th Aug 2008
Location: Spain
Posted: 10th May 2012 15:17
Thanks to the tutorial, I could compile Android APK games in version 1.0.6.5 of App Game Kit, but does not work for the new version 1.0.7.2

What changes must be made for the tutorial works with the latest version of App Game Kit?

We must re-copy the folders and files /IDE in /Android?

Greetings and thank you very much.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th May 2012 16:43
You definitely have to recopy all the /IDE files to /Android.

I've done it three times.

The fun part is that the cygwin setup does strange things to permissions and ownership.

Before you do the copy, you need to open a cygwin command window and reset the ownership for everything in the IDE directory to your Windows id.

If you look in the app you've created in the Android apps directory (using ls -la) you can see the group is probably mkgroup, with your user name to the left of it. This is the sequence I use (after opening a cygwin command window):


Then you should then be able to use Windows File Mangler to copy the entire IDE directory from your newly installed AppGameKit update to the /Android directory. Tell it to overwrite everything and skip any files named 'Nul' (if it pops up).

Or manually delete all directories in /Android/IDE except your projects and then do the copy.

For the v107+, instead of uncommenting the bytecode.byc line, simply add this as the third line to the /Android/IDE/apps/intepreter/intepreter.h file:


You will need to do a build clean before you do a build to make sure all the old files get removed and replaced with a the new stuff.


Cheers,
Ancient Lady
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 10th May 2012 16:55 Edited at: 10th May 2012 16:56
I encountered this problem myself when I tested the solution for the new video.

Simply change the CHMOD command to the following.

chmod 777 /cygdrive/c/Android/AGK/* -R

This seems to have solved the issue.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th May 2012 17:39
Quote: "chmod 777 /cygdrive/c/Android/AGK/* -R"


That makes all files executable. A little overkill. Maybe:


And you want to be absolutely sure you are at the /Android level or LOWER before doing the chown or chmod commands. Otherwise you might change properties for your basic windows setup (and that would not be good).

Fortunately the *nix commands know not to recurse (the '-R') on the '..' directories. Once long ago, I had a Perl script that parsed directories and I forgot to ignore '..' and managed to wipe out quite a bit of stuff. Fortunately our techies had a backup to restore what got lost. It's a mistake I've been very careful NOT to repeat.

Cheers,
Ancient Lady
payopepe
15
Years of Service
User Offline
Joined: 10th Aug 2008
Location: Spain
Posted: 10th May 2012 17:54 Edited at: 10th May 2012 17:57
Thanks for your help, I followed your steps but it giving me the same error:

See Capture Process

As shown in the screenshot, a file disappears and other resized.

Thank you.

Attachments

Login to view attachments
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th May 2012 18:05
You need to do this step:


Before this:


That will clean up the old files and create new ones from the updated AppGameKit interpreter source.

Cheers,
Ancient Lady
payopepe
15
Years of Service
User Offline
Joined: 10th Aug 2008
Location: Spain
Posted: 10th May 2012 18:51 Edited at: 10th May 2012 19:14
Thank you very much! was that!

Although when tested on my Android one application *. Apk are 2 equal installments, but does not really matter.

Now I can only solve the issue of AppGameKit Player 100006 to run projects created with version 1.0.7.X

Thank you!


EDIT:

AGK PLAYER 1072b

http://forum.thegamecreators.com/?m=forum_view&t=196684&b=41
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 10th May 2012 18:57
Always glad to help.

Happy Programming!

Cheers,
Ancient Lady
GasiusGames
12
Years of Service
User Offline
Joined: 8th Mar 2012
Location:
Posted: 10th May 2012 20:00
Why release AppGameKit 1072 if its not ready? This just defeats the the whole 'build once deploy anywhere', since the AppGameKit Players dont work. Seems to me, to be a step back!

I love AppGameKit, this just breaks my heart in 2.

PLEASE FIX THE AppGameKit PLAYERS!!!!!!!!!
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 11th May 2012 12:18
GasiusGames released 1072 helps us start using the new commands.
If we have to wait for everything to be finished, we might have to wait 1 more month.

If you are a T2 user you have everything ready
GasiusGames
12
Years of Service
User Offline
Joined: 8th Mar 2012
Location:
Posted: 11th May 2012 15:03
@bjadams
Im a T1 developer, so less than impressed that T2 developers get it all while the rest of us get it broken.

needless to say, I will carry on using 1.06 until the 1.07 is released for the T1 developers.

I was making good progress on my game, all I needed was the HTTP commands.

NB. Thanks for this link
http://mobilepearls.com/labs/ndk-builder-in-eclipse/
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 11th May 2012 18:21 Edited at: 11th May 2012 18:25
These things take time, and everything is produced at tier 2 level before it's integrated into tier 1. Remember tier 1 does a lot more work for you then Tier 2 does, so please be patient. It's natural to want everything yesterday, but we're only human! I think TGC is being fair when it releases tools as and when they are ready rather than worrying about who it might offend.
GasiusGames
12
Years of Service
User Offline
Joined: 8th Mar 2012
Location:
Posted: 11th May 2012 18:24
Thanks Daniel,

I wait in antisipation
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 11th May 2012 18:25 Edited at: 11th May 2012 18:27
What does the T2 people have that we the T1's does not? I compiled my own player for 1.072 using Daniel's tutorials.

Btw, Daniel, can you make a tutorial on how to upgrade from say 1.065 to 1.072, and how to update the projects in the C:/Android folders?

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.
GasiusGames
12
Years of Service
User Offline
Joined: 8th Mar 2012
Location:
Posted: 11th May 2012 19:26
Impetus73
Yip, Im trying to get it to compile right now. Lets hope this works. Im dyin gto get going again.

Does anybody know when Google Play is going to allow South Africans to seel there games, as apposed to giving them away or free.
GasiusGames
12
Years of Service
User Offline
Joined: 8th Mar 2012
Location:
Posted: 11th May 2012 20:03
Nope, recompiled the AGKPlayer. It comes up with 2 icons, 1 that is blank for about 3 seconds and then exists, and one that runs my image gallery.

Daniel, can Impetus73 share his compiled player with the rest of us?
GasiusGames
12
Years of Service
User Offline
Joined: 8th Mar 2012
Location:
Posted: 11th May 2012 20:18
I give up. This is like beating a dead dog. I will wait another month and see what comes of it. Hopefully by then the T1 version will be working. I am gonna reinstall 106 and play with that again.
So much for a bug free version. Aaaarrggghhhh!!!!!!!!!
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 11th May 2012 22:06
As Impetus well-said, you can compile your own player and you have nothing missing in T1!!!
GasiusGames
12
Years of Service
User Offline
Joined: 8th Mar 2012
Location:
Posted: 11th May 2012 22:20
If its so easy, why doesnt TGC, just put the player on our product page?
I did compile the player as i did for the previous version. This one just comes up blank. So frustrating.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 15th May 2012 18:26
I am working on the build 1074 now, and right after that the AppGameKit Players. I have decided 1074 will be the one all the players will be based on, so hopefully you won't have to wait much longer. I think Android store is pretty quick for validation, as is the Mac store.

I drink tea, and in my spare time I write software.

Login to post a reply

Server time is: 2024-04-27 20:39:11
Your offset time is: 2024-04-27 20:39:11