Torque3D
  • General
    • Welcome!
    • Features
    • Release Notes
      • Version 4.0.3
      • Version 4.0.2
      • Version 4.0.1
      • Version 4.0
      • Version 3.10.1
      • Version 3.10
      • Version 3.9
      • Version 3.8
      • Version 3.7
      • Version 3.6.2
      • Version 3.6.1
      • Version 3.6
  • Getting Started
    • Introduction
      • What's the Torque3D Engine?
    • Getting Familiar
      • Getting a Copy
        • Torque Project Manager
        • Downloading it Yourself
      • Getting Ready for Launch
        • Running Pre-Built Binaries
        • Building the Engine Yourself
      • Launching the Game
        • Opening the Example Level
        • Launching the Editors
      • Your First Game
        • Introduction To The Engine
        • The Module System
        • Creating an empty gamemode
        • Adding a Player
        • Adding a Coin
        • Adding a win-condition
        • Custom coin asset
        • Counting coins
        • Adding some effects
        • Supporting multiplayer
        • Adding a Scoreboard GUI
        • Keeping the scoreboard up-to-date
      • Deep Dive: BaseGame Directory Structure
    • Best Practices
    • Porting a Legacy Project
  • For Artists
    • Assets
      • What are Assets?
      • How to Create a New Asset
      • Working With Assets
      • Deep Dive: Creating a New Asset Type
    • Art
      • File Formats
      • 3D Art
        • Shape Specifications
        • Coordinates System
        • Mounting Shapes
        • Animation
        • Player Setup
        • Blender -> Torque3D Pipeline
      • 2D Art
        • Working with Adobe Substance
    • Animation
    • GUI
      • Loading and Initializing a GUI
      • Expanding a GUI via Script
      • How to Network GUIs
    • Materials
      • Material Mapping
      • Material Animation
    • Terrain
    • Shaders
    • Lighting
    • Audio
  • For Designers
    • Base Classes
      • SimObject
      • SimGroup
      • SceneObject
      • Scene
      • Datablocks
    • Game Classes
      • Creating an Object
      • Destroying an Object
      • Gameplay Scripting
        • Spawning an Object from Gameplay Code
    • Modules
      • What are Modules?
      • How to Create a New Module?
      • Making a Module do Things
      • Installing Existing Modules
        • Where to Get More Modules
    • Scenes and Levels
      • How to Create a New Level
      • How to Load a Level
        • Deep Dive: Level Loading Scripts
      • How to Edit Levels
        • Opening a Level in the Editor
        • Spawning Objects from the Asset Browser
        • Working with Scenes
        • Using SimGroups
        • Changing a Level's PostEffects
        • Deep Dive: LevelAsset Companion Files
    • Game Modes
      • Creating a New GameMode
      • Making a Level Use Your GameMode
      • Adding Gameplay Code to Your GameMode
    • AI
      • Navmesh
      • Objects
      • Scripting
    • Inputs
      • Inputs and Keybinds
        • ActionMap
        • Bind Functions
        • ActionMap Stack
    • Localization
    • Editors
      • Changing Editor Settings
      • World Editor
        • Scene Editor
        • ConvexShape Editor
        • Terrain Editor
        • Terrain Painter
        • Material Editor
        • Spline-Based Tools
          • Mesh Road Editor
          • River Editor
          • Decal Road Editor
        • Datablock Editor
        • Particle Editor
        • Decal Editor
        • Forest Editor
        • Navmesh Editor
        • Deep Dive: Creating Your Own Editor
        • Shape Editor
      • GUI Editor
        • Interface Details
  • For Programmers
    • Compiling the Engine
      • Setup Development Environment
        • SDK and Library Installation
        • Git
        • Cmake
        • Creating a Fork on Github
      • Create a Project
        • Creating a Project With CMake
        • Creating a Project With the Project Manager
      • Compiling
        • Compiling in Windows
        • Compiling in Linux
        • Compiling in MacOS
      • Building the Project Manager
    • Introduction
    • Code Style Guidelines
    • Expanding the Engine
      • Creating a New Object Class
      • Exposing Object Classes to Script
        • addProtectedField
      • Adding a New Library to the Engine
    • Major Components of the Engine
      • Core
        • Console
        • Platform
      • Audio
        • SFX
      • Rendering
        • GFX
        • Render Bins
      • Physics
        • Stock T3D Physics
        • Physics Wrapper
          • PhysX
          • Bullet
        • Classes
    • Rendering
    • Math
    • Networking
      • Client and Server Commands
    • Physics
    • Collision
    • Scripting
      • TorqueScript
        • What is TorqueScript?
        • Basic Syntax
        • Variables
        • Types
        • Operators
        • Control Structures
        • Functions
        • Objects
        • Module Interop
          • QueueExec
          • RegisterDatablock
          • CallOnModules
          • ModuleExec
        • API Reference
      • Other Languages
        • C-Interface
    • File Inputs/Outputs(I/O)
    • API Reference
Powered by GitBook
On this page
  • Using a virtual machine
  • Build from the command-line
  • Copy template files
  • Build Using Code::Blocks (with cmakeGui)
  • Build using Qt Creator
  • Compiling with VSCode
Edit on GitHub
Export as PDF
  1. For Programmers
  2. Compiling the Engine
  3. Compiling

Compiling in Linux

PreviousCompiling in WindowsNextCompiling in MacOS

Last updated 1 year ago

Using a virtual machine

If you don't have access to a Linux machine, or you prefer not to install libraries and software in your current Linux machine, building Torque inside a virtual machine is a great way to create binaries that you can redistribute. You can create your own virtual machine environment by following the steps on this page for Linux as usual, or you can use Vagrant to create reproducible VMs that you manage with the command-line. See for more details.

Build from the command-line

Still in the same folder, run either make, ninja, or your build tool of preference.

The build may take some time, so go and frolic in the outdoors or something while you wait. When you return, you should see that the final executable was linked, and is now awaiting you in My\ Projects/LinuxTest/game.

Copy template files

You can run make install to copy the template files from the template you specified into your project's folder.

Note, post 4.0.3 the CMake generation stepp will automatically install the template files for you, so you don't need to run the INSTALL project first. You can instead just compile the application project itself.

Build Using Code::Blocks (with cmakeGui)

Build using Qt Creator

We need to configure qtCreator.

  • Open editor

  • MenuBar -> Tools -> Options

  • Build & Run -> CMAKE

  • Click on Prefered Ninja Generator

  • Close Options.

  • MenuBar -> File -> Open File or Project

  • Go to Torque3D root path

  • Select CMakeList.txt

  • We need to configure project. Select your path for CMAKE cache.

/home/userName/Torque3D/My Projects/LinuxTest/buildFiles/CMAKE
  • Click Configure Project

  • After this we get the normal CMAKE error message

-- Configuring incomplete, errors occurred!
CMake Error at CMakeLists.txt:6 (message):
  Please set TORQUE_APP_NAME first
  • We need to start CMAKE GUI to configure

  • When finished, click Configuration button

  • Return to qtCreator

  • MenuBar -> Build -> Run CMake

  • After this we have qtCreator configured for build

  • If you have some problem, it's very important to delete CMakeLists.txt.user file on Torque3D root path.

  • You need to use INSTALL project for copy Template files. Note: post-4.0.3 the CMake generation will install the template files your you, so you can just use the application project itself.

  • Go to Project view

  • On Build Steps, Make: Ninja -> click Details

  • You see a list of projects you can add to build

  • Add INSTALL project

  • Return to Edit view

  • MenuBar-> Build -> Build All

  • After the first build, is possible you prefer to deactivate Install project to avoid override your files.

Note: it has been reported that in Fedora, you may need to change the default 'Make: ninja' command to ninja-build for both 'Build Steps' and 'Clean Steps'.

Compiling with VSCode

the Vagrant tutorial
https://www.youtube.com/watch?v=ISbuSTgTQKI