Skip to content

Directory structure

Peter Robinson edited this page Jun 1, 2020 · 1 revision

Torque Logo

After you have cloned Torque 2D and experimented with the sandbox, we recommend that you familiarize yourself with the directory structure of the Torque 2D SDK.

The stock Torque 2D repository includes dozens of folders and thousands of files. It is easy to be overwhelmed at first, but if you spend a little time to browse through the directory hierarchy while reading along with the directory tours below, you'll find that everything is organized in a straightforward and intuitive manner. Following the tours, we have also included a brief description of the file types you will encounter while using Torque 2D.

Directories

Folder Description
Root_Directory This is your Torque 2D root directory. From here, you can navigate through the rest of the SDK. Most importantly, the Torque 2D application is located in this directory.
Engine_Directory A large portion of the Torque 2D SDK is kept in the engine directory. The libraries, compiler projects, and source files that allow you to build the Torque 2D engine are located here.
Engine_Bin_directory The bin folder contains the binaries (utility programs) used by the engine for compiling. It is not likely that you will need to dive into these folders for your game's development. Bison, Flex, PHP, and Nasm are code-generating tools designed to aid in compiler development.
Engine_Compilers_Directory The compilers directory is where all source projects should exist. Currently, we only have projects for Visual Studio and Xcode. More will be added over time.
Engine_Lib_Directory The lib directory contains all of the 3rd party libraries Torque 2D utilizes. Each SDK has a specific function, such as lpng and ljpeg for image loading
Engine_Source_Directory This directory contains all of the source code that makes up Torque 2D. The major systems are organized into separate folders, with each sub-directory pointing to more specific modules. For example, classes related to Sprites will be in the 2D folder
Modules_Directory This directory contains all the stock modules that ship with Torque 2D. It contains many example "toys" that showcase the the engine's features
Tools_Directory Miscellaneous utilities and plugins that are not directly integrated in the engine. For example, an exporter for TexturePacker
Note: Based on a fresh clone Subject to change as the repository is updated

File Descriptions

  • .asset.taml - A TAML file containing an Asset definition. Can be edited using any XML or text editor.

  • .bat - Windows batch files that contain OS commands which can be run to perform tasks. Mostly used in the Torque environment for deleting multiple files at once (.dso, prefs, .uft, etc).

  • .c / .cpp - Source code files. These contain the C and C++ language programming instructions which are compiled by developer tools to create the game executable (.exe).

  • .cs - TorqueScript files contain most of your programmed game logic and processing using the TorqueScript language.

  • .command - The Mac equivalent of a .bat file.

  • console.log - This file is generated by your game whenever you run it. A lot of information about the critical events that occur during your game are written and saved here.

  • .dso - TorqueScript (.cs) files that have been compiled into an encrypted format. DSO files are more secure than the original uncompiled .cs files that they are created from.

  • .dll - Dynamically Linked Library files (DLL) contain code that can be called at runtime by application binary files (.exe and .app) instead of being compiled directly into the binary file itself. This is useful for common libraries, such as OpenGL, OpenAL, Havok, etc.

  • .exe / .app - Binary files created by developer tools during the compiling process. Most commonly used to launch your game, a Torque tool, or any other normal computer application.

  • .gui.taml - A TAML file containing GUI controls. Can be edited using any XML or text editor.

  • .h - Header files contain declarations written in the C and C++ languages for classes, structs, variables, and other programming elements, which are compiled by the engine in conjunction with .c and .cpp files to create binary files.

  • module.taml - A TAML file containing a module definition. Can be edited using any XML or text editor.

  • .ogg - Contains audio data in the Ogg Vorbis format for playing sounds and music in your games.

  • .png / .jpg / .gif / .dds - Raw image files.

  • .scene.taml - A TAML file that contains a Scene. Can be edited using any XML or text editor.

  • .taml - A generic TAML file containing persisted object(s). Can be edited using any XML or text editor.

  • .torsion - Contains project configuration information which is understood by, and can be loaded into, Torsion which can be used to edit Torque .cs and .gui files. These are Windows only files.

  • .uft - These files contain pre-cached font information.

  • .wav - Contains audio data in the Waveform format for playing sounds and music in your games.

Clone this wiki locally