Quote: "1000 lines is quite alot for OS Specific issues..."
The Tier1 game I am currently working on is 4394 lines across 14 files (13 included). Even assuming 50% for comments and blank lines, that's still over 2000 lines of code. And I'm having no problem on any platform.
I am currently testing it in Windows, Android and iOS platforms. I use a Mac Mini and Xcode 4.3.2 to do the iOS bits.
It took a while to get my Xcode and Android setups working, but I succeeded.
The Android one needed to be followed pretty much letter for letter (I did change a couple of directories and made sure to modify instructions to take that into account).
I, too, had 'fun' working through the Xcode 3 instructions, but eventually got it to work. Then I rewrote them for the differences in Xcode 4.
Here are the my version of the Xcode 4 instructions (updated for v107):
• Copy the entire IDE folder from the AGK installation to your Mac
• On the Mac copy of the files, delete the Compiler, Editor and Help folders
• Navigate to \IDE\Apps\interpreter_ios folder and duplicate it
• Rename the duplicate to your chosen app name (i.e. foo)
• Navigate into this folder and double click on agkinterpreter.xcodeproj (i.e. \IDE\Apps\foo)
• This should launch XCODE (4.3.2) with the iOS application project
• If you want your compiled project to end up in a friendly directory (the default is quite ugly):
⁃ Select Xcode -> Preferences from main menu
⁃ Click on the "Locations" tab/icon
⁃ Click on the "Advanced…" button
⁃ Select "Custom", click on the select list next to it and select "Relative to Workspace"
⁃ Click on "Done"
⁃ Do yourself a favor and click on the "Text Editing" tab/icon and check "Line numbers", this comes in handy later
⁃ Close the Preferences dialog box
• Click on "Validate Settings" in the middle at the bottom of the interface and click on "Perform Changes" in the popped up dialog (it's up to you whether you enable or disable automatic snapshots in the next pop up)
• Click on the folder icon under tab-like thing with label "agkinterpreter.xcodeproj"
• To rename the basic project:
⁃ Click on "agk_interpreter, 1 target, iOS SDK 5.1" next to white right pointing triangle
⁃ In the area to the right, click on "agkinterpreter" under the word "PROJECT"
⁃ Click on "Build Settings" in the header in the area next to that one
⁃ In the far right column, under the heading "Identity", change 'Project Name' from 'agkinterpreter' to the new name of your application (foo) and then press the enter or return key
⁃ In the "Rename project content items?" dialog that pops up, click on the "Rename" button
⁃ Double click on "agk_interpreter" under "TARGETS" (beneath "PROJECTS")
⁃ Type in your preferred name (should be same as project, for simplicity) and press enter/return key
• Now, to rename the application itself:
⁃ Click on the name under "TARGETS" and select "Build Settings" from the set to the right
⁃ Scroll down to the "Packaging" header and open the section, if not already opened
⁃ Double click on "AGK Player" next to "Product Name"
⁃ Type the name you want to use for your app and press the enter/return key
• You probably will want to change the bundle identifier (certainly before you publish):
⁃ Select the target under "TARGETS" and select "Info" on the right
⁃ Double click on "com.thegamecreators.AGKTestApp" and change it to something appropriate for your app. "thegamecreators" should become your indie/company name (no spaces) and "AGKTestApp" should be your application name without spaces
• Select Product > Clean from the main menu (or click {apple}{shift}k)
• Select Product > Build from the main menu (or click {apple}b)
• If all goes well, your application will build successfully
• You can test your new application:
⁃ Select where to run it from the list that appears when you click on the text to the right of the faint right arrow next to "agk_interpreter" near the top of the interface, next to the two buttons (one with a big right triangle and the other with a square)
⁃ Click on the big right triangle
• You should see the AGK Player standby screen on your connected iOS device
• Your connected device could be an iPhone, iPad or 2nd gen iPod
• Quit the application and collect the byte code and media files you sourced at the start of this guide
• The byte code and media files should include the BYC file
• Copy these files into your new project folder
• Rename the .BYC file to 'bytecode.byc' exactly
• From the project project tree to the left, open up your project so you can see your project files
• Right click on the Resources item and select "Add Files to '<your project>'"
• Enter your project folder and select the media and BYC files you added earlier
• Click the ADD button when promoted to add these files to your project
• Modify the interpreter.cpp file to include the 'bytecode.byc' file:
⁃ Make sure the application tree is open, the right triangle next to the project name in the far left column is changed to a down triangle and a list of directory boxes appears
⁃ Open the "Classes" directory
⁃ Click on 'interpreter.h'
⁃ Add this as the third line (after '#define _H_APP'):
#define STANDALONE
⁃ Save the file
⁃ All being well, when you click Build and Run you will see your Tier 1 BASIC app appear!
• You can find your final application binary at IDE\Apps\yourproject\Debug\Products\Debug\yourapp
When v1070 came out, I was ready to update my Mac files and did exactly what I would have done in Windows. I simply copied the directories from the zip file to the right place in my AppGameKit directory.
In windows, it would have simply replaced any existing files, without affecting anything that didn't appear in the copied directories.
On a Mac, it completely replaces the directory, wiping out anything you had added since it was originally created.
My game project directory disappeared completely.
It allowed me to go through the steps for setting up an Xcode 4 project and fine tune my instructions, given the changes in the interpreter.cpp file.
So, if/when you update your Mac AppGameKit setup, copy any of your project directories to somewhere above AGK/IDE and AGK/Projects.
Once you've updated your basic AppGameKit setup, you can copy your projects back. Then do the following (for Tier1 projects):
1. replace the 'UntitledViewController.m' file in your Classes subdirectory with the one from the new interpreter_ios
2. add the line '#define STANDALONE' as the third line in the 'interpreter.h' file
It doesn't appear that you need to do anything for Tier2.
In both tiers, make sure to clean your project and rebuild it.
Cheers,
Ancient Lady