ITGB/Tour

From TDN

Image:Alert.png This article or section needs updating.

Parts of this article or section have been identified as out of date.
While the information may be useful, be advised that it may be inaccurate, buggy or erroneous.

Reason: Not updated for iT2D 1.4.x

If you are able to revise this information, please do so and remove this 'update' flag when finished.


Note: This document is for iTGB versions 1.0.1 and greater.


Contents

Folder Hierarchy


Folder View

Description

Image:1_RootFolder.jpg

Your root folder currently has 3 directories: engine, games, and TGB. Documentation has been excluded, since you have obviously found it and are reading these docs. More directories may be added as the engine matures.

Image:2_EngineFolder.jpg

The engine directory contains all of the files that make up the source code and solutions. New users will spend less time in this directory, and more in the games or TGB folders.

Image:3_BinFolder.jpg

Bison, Flex, and Nasm are code-generating tools designed to aid in compiler development. The chances of you ever needing to dive into these folders for your game's development is slim to none.

Image:4_CompilersFolder.jpg

Each of the directories found in the compiler folder refers to a separate C++ project/solution you can open.

VisualStudio 2005 and VisualStudio.net contain the solutions for TGB development on a PC (Microsoft Windows).

Xcode contains the base TGB project (Mac), which you would modify and compile for standard TGB games and modifying the WYSIWYG Editor.

Xcode_iPhone is the base TGB project with the iTorque platform integrated. This is the first project you might use during your initial iPhone or simulator tests.

Xcode_iPhone_Components is the iPhone Xcode project with source code containing behaviors converted from TorqueScript to C++. This was project was created specifically to demonstrate the difference between the BehaviorShooter and BehaviorShooter_Components games.

Image:5_LibFolder.jpg

This folder contains all of the 3rd party libraries iTGB utilizes. Each SDK has a specific specialty, such as the directX8 rendering for Windows, opengl2d3d rendering for cross-platform systems, openal for audio, and so on. Most are pretty well known and can be Googled for more information.

Image:6_SourceFolder.jpg

This directory contains all of the source code that makes up iTGB. The major systems are organized into separate folders. The sub-folders have been labeled appropriately. New to iTGB is the platformiPhone directory, which you may want to become familiar with for advanced modification.

Image:7_GamesFolder.jpg

This folder contains the sample games that ship with iTGB. BehaviorShooter is a game project that was developed for TGB. BehaviorShooter_Components is clone of BehaviorShooter, but contains several optimizations meant to increase stability and speed for playback on an iPhone. Certain image files have been broken up, behaviors moved into source, and so on.

If you compare BehaviorShooter to the _Components version, you will pick up techniques you should use when developing your iPhone game. iPhoneTest shows off more input functionality specific to the iPhone, such as touch input

Image:8_TGBFolder.jpg

This directory is dedicated to the WYSIWYG TGB Editors and the new project generator. Your core binaries (Torque Game Builder.app and TorqueGameBuilder.exe), as well as the required DLLs (runtime code libraries) can be found here.

Image:9_CommonFolder.jpg

This directory (and its sub-folders) contain scripts, GUIs, and other files shared between all of the TGB editors.

Image:10_GameDataFolder.jpg

The files and folders found in gameData are used when creating a new project from within TGB. These files have been changed for iTGB to utilize new variables and special requirements for iPhone development.</FONT></FONT></P>

Image:11_ResourcesFolder.jpg

The resources folder contains art packages from previous TGB releases. Most of these packs are content driven for sample games, such as whack-a-mole or fish game.

Image:12_ToolsFolder.jpg

This directory contains all of the script code and GUIs that make up the various WYISWYG editors for TGB. Unless you need to modify the actual editor for your game's development, there is not much you can do here except learn how the TGB developers utilize scripts an GUIs.

Image:13_TorsionFolder.jpg

This directory is useful only to Windows Users. This folder contains the torsion project file for TGB.

Image:14_UnitTestsFolder.jpg

This directory contains the script code used for measuring the performance of TGB (specifically the behaviors).



File Descriptions

  • .bat - Windows batch files that contain OS commands, mostly used in Torque environment for deleting multiple files (.dso, prefs, .uft, etc).
  • .command - The Mac equivalent of a .bat file
  • commonConfig.xml - This XML file contains the default preferences that are loaded with each game project. We've modified the base file to better fit an iPhone environment.
  • console.log - This file is spit out by your game whenever you run it. A lot of the critical events that occur during your game are written and saved here.
  • .cs - A .cs file, not to be confused with a C# code file, is a TorqueScript file. These script files will contain most of your game logic and code.
  • .dso - This is a TorqueScript file that has been compiled into an encrypted format. DSO files are more secure, and must be compiled before you can test your game on an iPhone or simulator.
  • .dll - Dynamically Linked Library files (DLL) contain code that can be used during runtime, instead of being compiled directly into TGB. This is useful for common libraries, such as OpenGL, OpenAL, Havok, etc.
  • .gui - A .gui file contains the data used to create your Graphical User Interfaces (GUIs). They are also created using TorqueScript, but the special extension allows the GUI Editor to open them for visual modification.
  • .png / .jpg - Raw image files
  • project.t2dproj - This is the TGB game project file. This is what you will open in the TGB Editor to modify your game visually with the WYSIWYG system.
  • .t2d - t2d files are game levels. All of your sprites, triggers, FX, and other scene objects are organized within a .t2d file.
  • TGBGame.exe / TGBGame.app - This is game binary. Running this file by itself launches your game, bypassing the editors.
  • .torsion - This file contains the project information that can be loaded into Torsion for cleaner and more organized editing, as well as debugging and test runs. This is a Windows only file.
  • .uft - These files contain pre-cached font information.



iPhone Options

This tab was added to the TGB Editor specifically for iPhone development. More toggles and variables may be added to this tab in the future. Below is an image that shows the tab, followed by a description of each feature:
Image:IPhoneSettings.jpg

  • Hide Status Bar - Toggle status bar on and off, which shows FPS and other Unit information
  • Status Bar Type - Visual appearance of the status bar
  • Orientation - How your game is displayed on an iPhone screen. Landscape will render and treat your game as if you are holding the device horizontally. Portrait renders and treats your game as if you are holding the device vertically.
  • Screen Auto-Rotate - Automatically rotates and orients your game screen, instead of waiting for a manual call.
  • Screen Upside Down - Self explanatory
  • Use Network - If your game is not networked and does not require internet access, you can keep this toggle off to optimize your game's speed. More optimization toggles will be added later.



Conclusion

I hope this initial tour helps you put TGB and iTGB into perspective. The entire SDK is huge, with dozens of folders and hundreds of files. Figure out what area of development you wish to focus on, then use this tour as a map of where you need to be working.