Convert Figma logo to code with AI

GarageGames logoTorque3D

MIT Licensed Open Source version of Torque 3D from GarageGames

3,353
1,198
3,353
373

Top Related Projects

90,206

Godot Engine – Multi-platform 2D and 3D game engine

Unity C# reference source code.

A complete 3-D game development suite written in Java.

18,196

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.

Quick Overview

Torque3D is an open-source game engine developed by GarageGames. It provides a comprehensive set of tools and features for creating 3D games and interactive applications, including a powerful scripting language, advanced rendering capabilities, and a flexible asset pipeline.

Pros

  • Fully open-source and free to use
  • Extensive feature set for 3D game development
  • Cross-platform support (Windows, macOS, Linux)
  • Active community and ongoing development

Cons

  • Steeper learning curve compared to some modern game engines
  • Documentation can be outdated or incomplete in some areas
  • Limited mobile platform support
  • Smaller ecosystem compared to more popular game engines

Code Examples

// Creating a simple game object
datablock StaticShapeData(MyObject)
{
   shapeFile = "art/shapes/cube.dae";
   mass = 1;
   friction = 0.6;
   elasticity = 0.3;
};

new StaticShape(MyShape)
{
   datablock = MyObject;
   position = "0 0 0";
   rotation = "0 0 1 0";
};

This example demonstrates how to create a simple static shape in Torque3D using the TorqueScript language.

// Implementing a basic player movement script
function Player::onTrigger(%this, %triggerNum, %val)
{
   if (%triggerNum == 0)  // Move forward
      %this.setMoveSpeed(%val ? 1 : 0);
   else if (%triggerNum == 1)  // Move backward
      %this.setMoveSpeed(%val ? -1 : 0);
   else if (%triggerNum == 2)  // Turn left
      %this.setTurnSpeed(%val ? -1 : 0);
   else if (%triggerNum == 3)  // Turn right
      %this.setTurnSpeed(%val ? 1 : 0);
}

This code snippet shows how to implement basic player movement controls in Torque3D.

// Creating a simple GUI
new GuiControl(MyGui) {
   position = "0 0";
   extent = "800 600";
   minExtent = "8 2";
   horizSizing = "width";
   vertSizing = "height";
   profile = "GuiDefaultProfile";
   visible = "1";
   active = "1";
   tooltipProfile = "GuiToolTipProfile";
   hovertime = "1000";
   isContainer = "1";
   canSave = "1";
   canSaveDynamicFields = "1";
};

new GuiButtonCtrl() {
   profile = "GuiButtonProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   position = "350 280";
   extent = "100 20";
   minExtent = "8 2";
   visible = "1";
   active = "1";
   command = "echo(\"Button Clicked!\");";
   text = "Click Me!";
   groupNum = "-1";
   buttonType = "PushButton";
};

This example demonstrates how to create a simple GUI with a button in Torque3D.

Getting Started

  1. Clone the Torque3D repository:

    git clone https://github.com/GarageGames/Torque3D.git
    
  2. Follow the build instructions in the README.md file for your specific platform.

  3. Once built, open the Torque3D editor and create a new project or explore the included examples.

  4. Start developing your game using TorqueScript and C++ as needed.

For more detailed instructions and documentation, refer to the official Torque3D wiki and forums.

Competitor Comparisons

90,206

Godot Engine – Multi-platform 2D and 3D game engine

Pros of Godot

  • Open-source with a large, active community
  • Supports multiple programming languages (GDScript, C#, C++)
  • Lightweight and efficient, with a small engine size

Cons of Godot

  • Less mature than Torque3D, with fewer AAA-quality games
  • Limited built-in terrain editing tools
  • Steeper learning curve for beginners

Code Comparison

Godot (GDScript):

extends Spatial

func _ready():
    var cube = CSGBox.new()
    add_child(cube)
    cube.translate(Vector3(0, 1, 0))

Torque3D (TorqueScript):

function createCube(%position)
{
   %cube = new StaticShape() {
      dataBlock = "CubeShape";
      position = %position;
   };
   return %cube;
}

Both engines offer object-oriented approaches, but Godot's GDScript syntax is more Python-like, while Torque3D's TorqueScript is closer to C++. Godot's code is generally more concise and readable, but Torque3D's syntax may be more familiar to developers with C++ experience.

Unity C# reference source code.

Pros of UnityCsReference

  • More active development and larger community support
  • Comprehensive documentation and extensive API reference
  • Better integration with modern game development workflows

Cons of UnityCsReference

  • Limited to C# scripting, while Torque3D supports multiple languages
  • More complex licensing structure compared to Torque3D's MIT license
  • Steeper learning curve for beginners due to its extensive feature set

Code Comparison

UnityCsReference (C#):

public class PlayerController : MonoBehaviour
{
    public float moveSpeed = 5f;
    void Update()
    {
        transform.Translate(Input.GetAxis("Horizontal") * moveSpeed * Time.deltaTime, 0, 0);
    }
}

Torque3D (TorqueScript):

function Player::onTick(%this)
{
    %moveX = getAxisValue("MoveX");
    %this.setVelocity(VectorScale(%this.getForwardVector(), %moveX * 5));
}

Both examples demonstrate basic player movement, but UnityCsReference uses C# with Unity's built-in Input system, while Torque3D uses TorqueScript with its own input handling. UnityCsReference's approach is more modern and widely used in game development.

A complete 3-D game development suite written in Java.

Pros of jMonkeyEngine

  • Cross-platform support (Java-based, runs on multiple operating systems)
  • Active community and regular updates
  • Extensive documentation and tutorials available

Cons of jMonkeyEngine

  • Performance may be lower compared to native C++ engines
  • Limited built-in visual editing tools
  • Steeper learning curve for developers not familiar with Java

Code Comparison

jMonkeyEngine:

public class HelloWorld extends SimpleApplication {
    public static void main(String[] args) {
        HelloWorld app = new HelloWorld();
        app.start();
    }
}

Torque3D:

#include "platform/platform.h"
#include "T3D/gameBase/gameBase.h"

class HelloWorld : public GameBase {
   // Game logic here
};

jMonkeyEngine uses Java and extends SimpleApplication, while Torque3D uses C++ and inherits from GameBase. jMonkeyEngine's code is more concise and easier to set up, but Torque3D offers more low-level control and potentially better performance.

Both engines have their strengths, with jMonkeyEngine being more accessible for Java developers and Torque3D providing more advanced features for experienced C++ programmers. The choice between them depends on the specific project requirements and the development team's expertise.

18,196

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.

Pros of cocos2d-x

  • Cross-platform development with support for multiple programming languages (C++, Lua, JavaScript)
  • Lightweight and efficient, suitable for mobile game development
  • Large community and extensive documentation

Cons of cocos2d-x

  • Steeper learning curve for developers new to C++ or game development
  • Limited 3D capabilities compared to Torque3D
  • Less suitable for large-scale, complex 3D games

Code Comparison

cocos2d-x (C++):

auto sprite = Sprite::create("sprite.png");
sprite->setPosition(Vec2(100, 100));
this->addChild(sprite);

Torque3D (TorqueScript):

%obj = new StaticShape() {
   dataBlock = "MyDataBlock";
   position = "100 100 0";
};

Summary

cocos2d-x is a versatile, cross-platform game engine ideal for 2D and simple 3D games, particularly on mobile devices. It offers multiple language support and a large community. However, it may have limitations for complex 3D projects.

Torque3D, on the other hand, is better suited for more advanced 3D game development, with a focus on desktop platforms. It provides a more comprehensive 3D toolset but may have a steeper learning curve and less mobile-oriented features compared to cocos2d-x.

The choice between the two depends on the specific project requirements, target platforms, and the development team's expertise.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

This repository is for archival purposes!

The newer, up to date and actively maintained repository is located over at: https://github.com/TorqueGameEngines/Torque3D

Torque 3D

MIT Licensed Open Source version of Torque 3D from GarageGames

GitHub tag GitHub release Github All Releases

IRC

More Information

Pre-compiled Version

In addition to GitHub we also have a couple of pre-packaged files for you to download if you would prefer to not compile the code yourself. They are available from the downloads page on the wiki.

Related repositories

License

All assets and code are under the license