ITGB/Tutorials/SimulatorTest2
From TDN
[edit] Xcode_iPhoneNow that we have a test game ready, we need to move into the compiler/source section of iTGB. Start by opening engine/compilers/Xcode_iPhone/Torque2D.xcodeproj. When the solution loads, scroll through the source folders until you find the Resources section. Expand this area (Shown in Figure 1).
[edit] Deleting Old ReferencesIf you are testing a new game, check to see if the Resources folder contains a common, game, and or main.cs If so, you'll need to select those items and delete them (Shown in Figure 2). You might be prompted by a Delete References dialog (Shown in Figure 3). If so, choose to delete the references, not the actual files. [edit] Adding Your Game ReferencesBefore you can compile, you'll need to add references to the key files required to run your game in the simulator. Open the menu to Add Existing Files (Shown in Figure 4).
You should be presented with a file browser dialog. Navigate to your TouchGame directory. Select your common, game, and main.cs files (Shown in Figure 5). After you click Add, you will be presented with a new dialog presenting you with options for adding the files. Make sure your dialog matches the one Shown in Figure 6. [edit] Compiling and RunningYou are down to the final steps (hold tight). With your game project created, DSO files compiled, references added to your solution, it's time to compile. You made need to modify your compile options. If you look to the top of your compiler bar, you might see drop-down menus that control Active SDK, Target, etc. If you click on one of those, such as the Active SDK (Shown in Figure 7), you can modify certain settings (Shown in Figure 8). Make sure your Compiler Options match the ones Shown in Figure 9. Once you are all set, click on the Build and Go command (Shown in Figure 10). If you have followed all the steps carefully, and there are no errors, your iPhone simulator should run displaying your first game project (huzzah!). If you click the Home Button (button with a square to the right), you will be taken to the iPhone home screen. You should see a TGB icon (Shown in Figure 12).
[edit] ConclusionThis was a very basic tutorial meant to show you how to create a TGB project and run it on the iPhone simulator. Later tutorials are going to show you how to add iPhone specific functionality (such as touching) to your game.
|














