Git Product home page Git Product logo

godot-cpp-template's Introduction

godot-cpp template

This repository serves as a quickstart template for GDExtension development with Godot 4.0+.

Contents

  • An empty Godot project (demo/)
  • godot-cpp as a submodule (godot-cpp/)
  • GitHub Issues template (.github/ISSUE_TEMPLATE.yml)
  • GitHub CI/CD to publish your library packages when creating a release (.github/workflows/builds.yml)
  • preconfigured source files for C++ development of the GDExtension (src/)

Usage

To use this template, log in to github and click the green "Use this template" button at the top of the repository page. This will let you create a copy of this repository with a clean git history. Make sure you clone the correct branch as these are configured for development of their respective Godot development branches and differ from each other. Refer to the docs to see what changed between the versions.

For getting started after cloning your own copy to your local machine, you should:

  • initialize the godot-cpp git submodule via git submodule update --init
  • change the name of your library
    • change the name of the compiled library file inside the SConstruct file by modifying the libname string.
    • change the pathnames of the to be loaded library name inside the demo/bin/example.gdextension file. By replacing libgdexample to the name specified in your SConstruct file.
    • change the name of the demo/bin/example.gdextension file
  • change the entry_symbol string inside your demo/bin/your-extension.gdextension file to be configured for your GDExtension name. This should be the same as the GDExtensionBool GDE_EXPORT external C function. As the name suggests, this sets the entry function for your GDExtension to be loaded by the Godot editors C API.
  • register the classes you want Godot to interact with inside the register_types.cpp file in the initialization method (here initialize_gdextension_types) in the syntax ClassDB::register_class<CLASS-NAME>();.

godot-cpp-template's People

Contributors

geminisquishgames avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.