-
Notifications
You must be signed in to change notification settings - Fork 4
Exporting the project
Note
This guide can also be used for other multiplayer projects using a dedicated server approach.
This Godot project contains both server and client components in the same codebase. However, when exporting, you'll typically want to exclude the server side from the client build and vice versa. This guide explains how to organize and export the project properly for both the server and the client.
The project is structured to facilitate easy separation of the client and server. Below is the folder organization:
-
assets/
Contains graphical, audio, and other non-Godot-related files that are shared by both the client and server. -
client/
Contains all the client-specific resources and scripts. -
common/
Contains shared resources, scripts, and logic between the server and the client. -
server/
Contains all the server-specific resources and scripts.
To export the server side, you only need to include the following folders:
assets/
common/
server/
When exporting, ensure you select "Export as dedicated server". This option strips unnecessary graphical components, making the server build more lightweight and efficient.
For the client side, export the following folders:
assets/
common/
client/
This setup ensures that only the client-related code and resources are included in the client build.
-
Automation: If you find yourself exporting the client and server builds frequently, consider setting up an automation script to streamline the process.
-
Testing: Ensure that both the client and server builds are thoroughly tested in their respective environments before deployment.
By following this organization and export process, you can efficiently manage and deploy your Godot project for both server and client with minimal overhead.