Main Repo for the OpenVic Project
For detailed instructions, view the Contributor Quickstart Guide here
Warning
If you are using Arch Linux, do not use the Arch repo package, it is known to break under some GDExtensions, use the official release file.
See System Requirements.
- Clone the OpenVic Repo to a suitable folder using the git command
git clone https://github.com/OpenVicProject/OpenVic.git
- Update the submodules by executing the git command
git submodule update --init --recursive
Note that using a zip download instead of cloning means a lot of work in manually managing submodules individually. It is strongly recommended to use git to obtain the source code.
See Cloning.
- Install Godot 4.3 and scons for your system.
- Run the command
git submodule update --init --recursive
to retrieve all related submodules. - Run
scons
in the project root, you should see a libopenvic file ingame/bin/openvic
. - Open with Godot 4, click import and navigate to the
game
directory. - Press "Import & Edit", wait for the Editor to finish re-importing assets, and then close the Editor without saving and reopen the project.
- Once loaded, click the play button at the top right, and you should see and hear the game application open on the main menu.
- Build the extension with
scons
orscons target=template_debug
. (orscons target=template_release
for release) - Open
game/project.godot
with Godot 4. - Click
Project
at the top left, clickExport
. - If you do not have the templates, you must download the templates, there is highlighted white text at the bottom of the Export subwindow that opens up the template manager for you to download.
- Click
Export All
:- If you built with the default or debug target you must export with
Debug
. - If you built with the release target you must export
Release
.
- If you built with the default or debug target you must export with
- Files will be found in platform specific directories in
game/export
:- On Windows run
game/export/Windows/OpenVic.exe
. - On Linux x86_64 run
game/export/Linux-x86_64/OpenVic.sh
.
- On Windows run
- If in a clean build, build the extension with
scons
. - Build with
scons dev_build=yes
. - Setup your IDE so your Command/Host/Launching App is your Godot 4 binary and the Working Directory is the
game
directory. - Start the debugger.
See Debugging.
Every time you add something to the GDExtension you need to add to the class reference documentation, to do such:
- Build with
scons
. - Run your Godot 4 binary with
--doctool --headless ../extension --gdextension-docs
in thegame
directory. - Write documentation in the style of Godot, see Godot's Writing Documentation: Class Reference Guides.
- Build with
scons
.
If you change anything that causes new behavior in the GDExtension you should also change the corresponding class reference documentation.