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 / Testing on OS X, media subfolder

Author
Message
EarwigTC
11
Years of Service
User Offline
Joined: 3rd Sep 2012
Location:
Posted: 2nd Dec 2012 16:50
I need to make a test version of my app on OS X, so I started by building some of the examples and following the (slightly dated) instructions for Tier 1 use of the OS X player. A project without subfolders for media assets seems to work fine (like ScrollingSprites) but anything with the assets sorted (SmackIt, SpaceShooter) brings up "fail to load" (eg SmackIt, "Failed to load image main_menu/background.png at line 131")

Projects built in Win 7, AppGameKit 1.076. AppGameKit player 1.074 fresh from App Store.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Dec 2012 18:32
The AppGameKit Player from the App Store is actually a Viewer and not a Player.

Due to the way Apple does things, you need to create and install your own Player for each AppGameKit release.

Also, none of the examples provided (for any platform) are up to date for anything past v1065 (I think). I know they are not up to date for v1076. 'Up to date' means that the core AppGameKit files in the project are correct for the version you are building.

And, from a quick look at the projects under Native/iOS/projects, the media directory for SmackIt is missing. After messing with the project a bit, I was able to get SpaceShooter to compile, but it wouldn't run. Like I said, the files are out of date.

I am assuming that you are working with Tier 2, otherwise you wouldn't be trying to compile the projects in Xcode.

What version of Xcode do you have?

You would be better off starting from a clean template to try building Tier 2 in any platform. Clean, working templates for all the currently supported platforms for v1076 can be found on the AGK Wiki Templates page. There are even some working templates for v1085 on that page for Windows and iOS.

Cheers,
Ancient Lady
AGK Community Tester
EarwigTC
11
Years of Service
User Offline
Joined: 3rd Sep 2012
Location:
Posted: 2nd Dec 2012 19:03
It's Tier 1 as I said, and I just need to run it for demonstration and reference. Not packaging for distribution. The linked instructions would seem to be the right solution. Copying the media folders into the .app and renaming the bytecode works fine if the assets are all in media root, but the media won't load if it's in subdirectories.

Forgot to mention I'm running it on Mountain Lion.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Dec 2012 19:30
I'm sorry, I thought I looked and couldn't find the mention of the Tier. And, since you were talking about the examples, I thought you meant Tier 2.

Assuming you created a new project directory using a copy of the IDE/apps/interpreter_ios directory, you should then create a media directory in your project directory. Then, within your project, you add that media directory under the Resources folder in the folder view of the project. This is done by right clicking on Resources and select 'Add files to "<project name>"', select the media directory and make sure that the 'Create folder references for any added folders' radio button is selected and the 'Copy items into destination ...' checkbox is unchecked. Then click on the 'Add' button in the lower right. This should create a blue media folder under the Resources folder.

Then you put your byte code file (<yourproj>.byc from the Windows <yourproj>/media directory) in the media directory (along with any of your media) and make sure the byte code file is renamed exactly 'bytecode.byc'.

A shortcut to getting the built project to use the byte code file (instead of just creating a Player app) is to edit the interpreter.h file and add the line '#define STANDALONE' just after '#define _H_APP'. This way you don't have to find the correct line in the interpreter.cpp file to uncomment (there are several and only one is correct for each platform). Note that this fix doesn't work in Android builds, there you need to find the correct line in interpreter.cpp.

Cheers,
Ancient Lady
AGK Community Tester
EarwigTC
11
Years of Service
User Offline
Joined: 3rd Sep 2012
Location:
Posted: 2nd Dec 2012 20:02
I think we're still missing connection. The page I linked to, which appears has just become file not found(???), was the Tier 1 Publishing & Players Mac OS X guide, linked to from here:

http://www.appgamekit.com/documentation/guides.html

The first thing it had was a very basic method of testing by using the AppGameKit Player on OS X without needing to build a new player in Xcode. It involved simply placing the AppGameKit project bytecode/media into a duplicate of the AppGameKit Player Mac app's Content/Resources folder. This is what I'm doing, not building the project with Xcode. The projects I'm trying are Tier 1 examples from AppGameKit in Windows 7. I build it in AppGameKit, and copy the media and bytecode over, and rename the bytecode. And it works great, unless there are subfolders of media.

I'm mainly asking if there's something I'm missing in terms of this method and subfolders. I appreciate the effort at the other explanation, but I'm not ready to go through the whole Xcode build yet just to give my graphics guy the demo. I'd probably just move my media to root instead.
EarwigTC
11
Years of Service
User Offline
Joined: 3rd Sep 2012
Location:
Posted: 2nd Dec 2012 20:06
My local docs still have the page. Other than the AGK/Players/Mac folder no longer being in the distro and needing to use the App Store player, this is what I'm doing:


Modifying the AppGameKit Player

The easiest way to prepare a standalone application is to modify the AppGameKit Player for Mac which is provided in the AGK\Players\Mac folder. Follow these steps:

Navigate to the AGK\Players\Mac folder and make a copy of the AppGameKit Player.app folder
Rename this copy to the name you wish to call your application (i.e. MyStandaloneApp.app)
Don't forget to include the '.app' at the end of your renamed folder
Navigate inside this folder to Contents\Resources (i.e. MyStandaloneApp\Contents\Resources)
Copy all the files in your projects media folder to this location (except the AGC file)
Rename the project BYC file to "AGK Player.byc" (case sensitive)
Copy the whole application folder (i.e. MyStandaloneApp.app) to a Mac
You can launch the standalone application by simply double clicking the .app file
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Dec 2012 22:09
Quote: "AGK Player Mac"

I thought you were doing the iOS version. I misinterpreted OS X, sorry.

Quote: "AGK\Players\Mac folder"

The only thing I found in this folder is a text file talking about the Player. I just looked at the instructions on that page and they make no sense, given what I see in the installed AppGameKit v1076.

Did you actually find anything called 'AGK Player.app' in your installation?

I unzipped the v1071 and found the 'AGK Player.app'. But it disappeared by v1074.

I never even noticed those instructions before. Everyone doing Tier 1 basically starts from the interpreter_ios or interpreter_mac and builds the project from that.

In that environment, if the app you are trying to copy from Windows has any directories under the media one, you must include it in the Xcode project and rebuild it. Otherwise the built project doesn't recognize them.

If there are any subfolders, you need to add them to the Resources folder in the Xcode project as I described for the media folder.

Regardless, if you found an 'AGK Player.app' directory, the app built would not know how to find subdirectories that were under the media (or main) directory. That information gets stored in the app when it is built with Xcode.

So, if you want to demo any of the projects with subdirectories under media, you need to go the regular route of building a new project based on the interpreter_mac directory and manually add the extra directories in the project.

Cheers,
Ancient Lady
AGK Community Tester
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Dec 2012 22:11
And, the v1074 AppGameKit Player from the app store is probably not compatible with the byte code files created with the v1076 AppGameKit IDE.

Cheers,
Ancient Lady
AGK Community Tester
EarwigTC
11
Years of Service
User Offline
Joined: 3rd Sep 2012
Location:
Posted: 2nd Dec 2012 22:53
Right, AppGameKit Player.app is the Mac AppGameKit Player, just like in the App Store. It was apparently bundled in at one point, but now is not.

Okay, that answers my question then. This quick-and-dirty method will suffer that limitation, and possible version incompatibility.

Thanks!
EarwigTC
11
Years of Service
User Offline
Joined: 3rd Sep 2012
Location:
Posted: 6th Dec 2012 01:34
I'm having a lot of trouble finding anything about compiling a Tier 1 Mac app in Xcode 4. The Tier 1 guide stuff appears to be for earlier Xcode. Ancient Lady, can you (or anyone) point to a write-up/thread/video for this version?
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Dec 2012 04:13
The AppGameKit documentation pages on the iOS/Mac Tier 1 publishing is woefully out of date. They have never been updated for Xcode 4.

In this google issue I wrote my version of Xcode 4 instructions (they mostly relate Mac as well as iOS). Some might be a little out of date, but it worked for a while.

Cheers,
Ancient Lady
AGK Community Tester
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Dec 2012 11:13
@Ancient Lady, awarding you with the AppGameKit Master badge. You are always providing an exceptional amount of help, tutorials, templates, etc on the forum and were nominated by another forum user. Congrats.


this.mess = abs(sin(times#))
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Dec 2012 17:10
Thank you! I appreciate it.

Thank the other forum user for me as well.

I'm always glad to help.

Cheers,
Ancient Lady
AGK Community Tester
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 6th Dec 2012 19:48
Congrats Ancient Lady! That badge is well deserved. You'll have to update your sig.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Dec 2012 20:11
Thanks Hodgey! I updated it.

Cheers,
Ancient Lady
AGK Community Tester
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Dec 2012 20:12
Oops, I just found out you may only have two carriage returns in the signature. Now it should be right.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
EarwigTC
11
Years of Service
User Offline
Joined: 3rd Sep 2012
Location:
Posted: 6th Dec 2012 20:15
Thanks much, Ancient, that synopsis is working well for me so far.

I cannot believe there isn't some sort of 'production bible' with those sorts of checklists. I abandoned Adobe as a cross-platform mobile solution because they did not address major bugs that prevented professional production, but they did, at least, provide clear steps for release on every system.

When all my workflows are up and documented, I'd be happy to help create such a thing.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 6th Dec 2012 20:33
I'm glad to be of help.

And I bet a lot of people would love a 'production bible'.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-04-28 15:27:27
Your offset time is: 2024-04-28 15:27:27