A simple template for creating a Godot game in C++ using GDExtension.
- Install Visual Studio with Visual C++
- Install Python 3 from https://www.python.org/. Make sure to add python executables to path.
- Install scons via pip
$> pip install scons
- Install godot 4.2 as godot.exe in system PATH. E.g. when building from source:
$> git clone -b 4.2 https://github.com/godotengine/godot.git "C:\godot"
$> cd "C:\godot"
$> scons platform=windows target=editor
$> cp "bin\godot.windows.editor.x86_64.exe" "bin\godot.exe"
# Now add C:\godot\bin to path to continue
- In this repo update all submodules:
$> git submodule update --init --recursive
- Build godot-cpp wrapper
$> cd godot-cpp
$> scons platform=windows
$> cd ..
- Open folder in VSCode with C++ Extension installed. Use the "Run" targets "Debug: Editor (Windows)" and "Debug: Game (Windows)" to build the code and run either the Editor or Game directly
- Install required software packages (see https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_linuxbsd.html)
- Install godot 4.2 into /usr/local/bin. E.g. when building from source:
$> git clone -b 4.2 https://github.com/godotengine/godot.git /opt/godot
# Make sure you have write rights to access /opt/godot
$> cd /opt/godot
$> scons platform=linuxbsd target=editor
$> sudo ln -s /opt/godot/bin/godot.linuxbsd.editor.x86_64 /usr/local/bin/godot
- In this repo update all submodules:
$> git submodule update --init --recursive
- Build godot-cpp wrapper
$> cd godot-cpp
$> scons platform=linux
$> cd ..
- Open folder in VSCode with C++ Extension installed. Use the "Run" targets "Debug: Editor" and "Debug: Game" to build the code and run either the Editor or Game directly