Convert Figma logo to code with AI

godotengine logogodot

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

88,735
20,120
88,735
13,421

Top Related Projects

MIT Licensed Open Source version of Torque 3D from GarageGames

18,111

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.

Unity C# reference source code.

11,280

One framework for creating powerful cross-platform games.

Quick Overview

Godot is a free and open-source game engine that enables developers to create 2D and 3D games. It offers a comprehensive set of tools and a user-friendly interface, making game development accessible to both beginners and experienced developers.

Pros

  • Cross-platform support for multiple desktop, mobile, and web platforms
  • Feature-rich with built-in tools for animation, physics, scripting, and more
  • Active community and extensive documentation
  • Lightweight and fast performance compared to some other game engines

Cons

  • Smaller ecosystem compared to more established game engines like Unity or Unreal
  • Limited built-in visual scripting capabilities
  • Learning curve for developers coming from other game engines
  • Fewer AAA-quality games developed with Godot, potentially limiting job opportunities

Code Examples

  1. Creating a simple 2D scene:
extends Node2D

func _ready():
    var sprite = Sprite.new()
    sprite.texture = load("res://icon.png")
    add_child(sprite)
  1. Implementing basic player movement:
extends KinematicBody2D

export var speed = 200

func _physics_process(delta):
    var velocity = Vector2.ZERO
    if Input.is_action_pressed("ui_right"):
        velocity.x += 1
    if Input.is_action_pressed("ui_left"):
        velocity.x -= 1
    if Input.is_action_pressed("ui_down"):
        velocity.y += 1
    if Input.is_action_pressed("ui_up"):
        velocity.y -= 1
    velocity = velocity.normalized() * speed
    move_and_slide(velocity)
  1. Creating a simple UI button:
extends Control

func _ready():
    var button = Button.new()
    button.text = "Click me!"
    button.connect("pressed", self, "_on_button_pressed")
    add_child(button)

func _on_button_pressed():
    print("Button clicked!")

Getting Started

  1. Download and install Godot from the official website: https://godotengine.org/download
  2. Launch Godot and create a new project
  3. Create a new scene (2D or 3D) and add nodes to build your game world
  4. Attach scripts to nodes to add functionality
  5. Use the built-in editor to write GDScript or connect to external IDEs for other supported languages
  6. Test your game within the Godot editor
  7. Export your game for your target platform(s) using the export templates

For more detailed instructions and tutorials, refer to the official Godot documentation: https://docs.godotengine.org/en/stable/getting_started/introduction/index.html

Competitor Comparisons

MIT Licensed Open Source version of Torque 3D from GarageGames

Pros of Torque3D

  • More advanced 3D rendering capabilities out-of-the-box
  • Extensive terrain editing tools
  • Better support for large-scale multiplayer games

Cons of Torque3D

  • Steeper learning curve compared to Godot
  • Less active community and fewer resources
  • Limited 2D game development capabilities

Code Comparison

Torque3D (C++):

SceneObject* obj = new SceneObject();
obj->setPosition(Point3F(0, 0, 0));
obj->setScale(VectorF(1, 1, 1));
obj->setDataField(StringTable->insert("meshFile"), NULL, "art/shapes/cube.dae");
gServerContainer.addObject(obj);

Godot (GDScript):

var obj = MeshInstance.new()
obj.translation = Vector3(0, 0, 0)
obj.scale = Vector3(1, 1, 1)
obj.mesh = load("res://models/cube.mesh")
add_child(obj)

Both engines allow for creating and manipulating 3D objects, but Godot's syntax is generally more concise and easier to read. Torque3D offers more low-level control, which can be beneficial for complex projects but may require more code for simple tasks.

18,111

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

  • Better performance for complex 2D games
  • More flexible and customizable
  • Stronger support for mobile platforms

Cons of cocos2d-x

  • Steeper learning curve
  • Less active community and development
  • More complex setup and configuration

Code Comparison

Godot (GDScript):

extends Sprite

func _ready():
    position = Vector2(100, 100)
    scale = Vector2(2, 2)

cocos2d-x (C++):

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

Both engines offer powerful 2D game development capabilities, but they differ in their approach and target audience. Godot provides a more user-friendly environment with its custom GDScript language and integrated editor, making it easier for beginners to get started. cocos2d-x, on the other hand, offers more low-level control and better performance for complex 2D games, but requires more programming expertise.

Godot has gained significant popularity in recent years due to its open-source nature, active community, and continuous development. It also offers 3D capabilities, making it a more versatile engine. cocos2d-x, while still widely used, has seen a decline in community engagement and updates.

Ultimately, the choice between these engines depends on the specific needs of the project and the developer's experience level.

Unity C# reference source code.

Pros of UnityCsReference

  • More extensive documentation and community resources
  • Wider industry adoption and job market opportunities
  • Stronger support for 3D game development

Cons of UnityCsReference

  • Closed-source core engine, limiting customization options
  • Licensing fees for commercial projects above a certain revenue threshold
  • Steeper learning curve for beginners

Code Comparison

Godot (GDScript):

extends Node2D

func _ready():
    print("Hello, Godot!")

func _process(delta):
    position += Vector2(1, 0) * delta

Unity (C#):

using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        Debug.Log("Hello, Unity!");
    }

    void Update()
    {
        transform.position += Vector3.right * Time.deltaTime;
    }
}

Both examples demonstrate basic setup, printing to console, and moving an object. Godot uses GDScript, which is more Python-like, while Unity uses C#. Godot's syntax is generally more concise, but Unity's C# offers more advanced language features and better performance for complex projects.

11,280

One framework for creating powerful cross-platform games.

Pros of MonoGame

  • Closer to native C# development, familiar for .NET developers
  • Better performance for 2D games and simpler 3D projects
  • Smaller engine size, potentially faster load times and smaller builds

Cons of MonoGame

  • Less comprehensive toolset compared to Godot's integrated editor
  • Steeper learning curve for beginners and non-programmers
  • Limited built-in support for complex 3D graphics and physics

Code Comparison

MonoGame:

public class Game1 : Game
{
    protected override void Update(GameTime gameTime)
    {
        // Game logic here
    }
}

Godot:

extends Node

func _process(delta):
    # Game logic here

MonoGame uses a more traditional object-oriented approach with C#, while Godot offers a simpler, more accessible scripting language (GDScript) that's easier for beginners. However, Godot also supports C# scripting, providing flexibility for developers who prefer it.

Both engines are open-source and cross-platform, but Godot offers a more comprehensive, all-in-one solution with its integrated editor and asset pipeline. MonoGame, on the other hand, provides a leaner framework that gives developers more control over their development environment and workflow.

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

Godot Engine

Godot Engine logo

2D and 3D cross-platform game engine

Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported with one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms and consoles.

Free, open source and community-driven

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Godot Foundation not-for-profit.

Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.

Screenshot of a 3D scene in the Godot Engine editor

Getting the engine

Binary downloads

Official binaries for the Godot editor and the export templates can be found on the Godot website.

Compiling from source

See the official docs for compilation instructions for every supported platform.

Community and contributing

Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.

The best way to get in touch with the core engine developers is to join the Godot Contributors Chat.

To get started contributing to the project, see the contributing guide. This document also includes guidelines for reporting bugs.

Documentation and demos

The official documentation is hosted on Read the Docs. It is maintained by the Godot community in its own GitHub repository.

The class reference is also accessible from the Godot editor.

We also maintain official demos in their own GitHub repository as well as a list of awesome Godot community resources.

There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more information.

Code Triagers Badge Translate on Weblate TODOs