Code Monkey home page Code Monkey logo

cppparachute's Introduction

CppParachute

C++ GDNative Integration with GODOT Engine

Prerequisites

Node.js
Visual Studio Build Tools for C++ 2019/2022 (within Visual Studio Installer)
C++/CLI support for v143 build tools (x86)
C++ Modules for v143 build tools
MSVC v142 - VS 2019 C++
Notepad++
GODOT Engine v3.4.3 (Standard version, 64-bit)
Scons
godot-cpp

The Specific Commands

  1. CMD: (Run as Administrator) x86 Native Tools Command Prompt for VS 2022
  2. mkdir gdnative_cpp_example 
    cd gdnative_cpp_example
  3. git clone --recursive -b 3.x https://github.com/godotengine/godot-cpp 
  4. cd godot-cpp 
    scons platform=windows generate_bindings=yes -j4

--- Now you're ready to develop in C++ ---

All commands are done within 'x86 Native Tools Command Prompt for VS 2022'

NOTES:

I had a lot of confusion during this, due to the vast lack of resources/info I could find online regarding GDNative C++.
This was one of the most frustrating workflows I've had to deal with, especially if you've never done this, I will save you the migraine:

  • The CMD tool you're using, has a huge impact on the project setup. I suggest using a command prompt with internal references to CL.exe, hence why I'm using the Visual Studio CMD
  • In the godot-cpp repo, the 'demo' folder is renamed to 'test'. It took some time out of development to figure out, literally. It is functionally the same.
  • DON'T MAKE A NEW GODOT PROJECT. Import the test/project.godot file.
  • The SConstruct file in the root folder (godot-cpp) is only used for the setup, and the test/SConstruct is used to actually compile your code
  • The overall structure of how the project should look, is barely specified. But the godot-cpp is the root, and godot-headers holds all the references to other libraries.

Sources

https://github.com/godotengine/gdnative-demos/tree/master/cpp/dodge_the_creeps
https://docs.godotengine.org/en/3.4/tutorials/scripting/gdnative/gdnative_cpp_example.html
https://docs.godotengine.org/en/3.4/tutorials/scripting/gdnative/gdnative_c_example.html
https://github.com/BastiaanOlij/gdnative_cpp_example
https://www.youtube.com/watch?v=XPcSfXsoArQ
https://www.youtube.com/watch?v=gTHDr5Cu6lk

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.