You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RPG Game: A traditional jRPG with multiple weapons, creatures, and special abilities. All abilities and powers are stored in CSV files, which contain the main stats, equipment, and behaviors for each creature and item.
Shoot 'Em Up: A fast-paced arcade-style game inspired by titles like Sonic Wings or Gradius. The game features numerous enemy types, variations, and level wave definitions, all described in separate CSV files.
Both projects rely heavily on external files for game data, which must be parsed and converted into usable in-game Resource objects.
Describe the problem or limitation you are having in your project
I need to parse multiple external files, such as CSV, markdown, or other formats, into Resource objects that are usable in-game. Doing this parsing at runtime consumes significant time and resources, even though the parsing only needs to occur once for static data. It would be more efficient to perform this conversion at build time so the final game can include pre-parsed data, minimizing runtime overhead and improving load times.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose introducing Build Time Scripts to the Godot Engine. These scripts would execute during the project's build process (akin to how _Singletons/Autoloads function at runtime). Build Time Scripts would allow developers to parse local files—such as CSV files—into Resource objects during the build process. The resulting Resource files could then be included directly in the game package, avoiding runtime parsing altogether.
For example:
During the build process, the Build Time Script parses CSV data for enemies, weapons, and levels.
It converts this data into Godot's Resource class (or other)
The game package then includes the pre-parsed Resource files, which can be loaded directly at runtime without further processing.
This feature would streamline workflows, improve runtime performance, and ensure a cleaner separation between data preparation and gameplay.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The feature would introduce a new category in the Project Settings, similar to how Autoloads are configured. Developers would specify GDScript files that should run at build time. These scripts would have access to the file system and Godot's Resource APIs, allowing them to manipulate files, parse data, and generate new Resource files.
Example workflow:
Add a Build Time Script in the Project Settings under a new "Build Time Scripts" section.
The script implements logic to parse external files and create resources:
The _init() function is called during the project build, generating the required Resource files.
If this enhancement will not be used often, can it be worked around with a few lines of script?
While this feature can be partially worked around using external tools or custom-build pipelines (such as bash scripts, which is my current case), doing so is cumbersome and lacks integration with Godot's existing workflows. It also requires developers to rely on external dependencies, reducing portability and maintainability. Embedding this capability into Godot would make it more accessible and efficient for all users.
There is also the option to create a plugin with a single checkbox to run these, but I often came to the realization that I forgot to press this checkbox to run the script and/or can't do this at the bash script that automated the exporting for all the platforms.
Is there a reason why this should be core and not an add-on in the asset library?
It's possible, but this would require a deep integration with the engine, and this steps could improve the workflow for the game generation.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
Multiple projects, including:
RPG Game: A traditional jRPG with multiple weapons, creatures, and special abilities. All abilities and powers are stored in
CSV
files, which contain the main stats, equipment, and behaviors for each creature and item.Shoot 'Em Up: A fast-paced arcade-style game inspired by titles like Sonic Wings or Gradius. The game features numerous enemy types, variations, and level wave definitions, all described in separate
CSV
files.Both projects rely heavily on external files for game data, which must be parsed and converted into usable in-game
Resource
objects.Describe the problem or limitation you are having in your project
I need to parse multiple external files, such as
CSV
,markdown
, or other formats, intoResource
objects that are usable in-game. Doing this parsing at runtime consumes significant time and resources, even though the parsing only needs to occur once for static data. It would be more efficient to perform this conversion at build time so the final game can include pre-parsed data, minimizing runtime overhead and improving load times.Describe the feature / enhancement and how it helps to overcome the problem or limitation
I propose introducing Build Time Scripts to the Godot Engine. These scripts would execute during the project's build process (akin to how _Singletons/Autoloads function at runtime). Build Time Scripts would allow developers to parse local files—such as
CSV
files—intoResource
objects during the build process. The resulting Resource files could then be included directly in the game package, avoiding runtime parsing altogether.For example:
CSV
data for enemies, weapons, and levels.Resource
class (or other)This feature would streamline workflows, improve runtime performance, and ensure a cleaner separation between data preparation and gameplay.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The feature would introduce a new category in the Project Settings, similar to how Autoloads are configured. Developers would specify GDScript files that should run at build time. These scripts would have access to the file system and Godot's Resource APIs, allowing them to manipulate files, parse data, and generate new Resource files.
Example workflow:
_init()
function is called during the project build, generating the required Resource files.If this enhancement will not be used often, can it be worked around with a few lines of script?
While this feature can be partially worked around using external tools or custom-build pipelines (such as
bash
scripts, which is my current case), doing so is cumbersome and lacks integration with Godot's existing workflows. It also requires developers to rely on external dependencies, reducing portability and maintainability. Embedding this capability into Godot would make it more accessible and efficient for all users.There is also the option to create a plugin with a single
checkbox
to run these, but I often came to the realization that I forgot to press this checkbox to run the script and/or can't do this at thebash
script that automated the exporting for all the platforms.Is there a reason why this should be core and not an add-on in the asset library?
It's possible, but this would require a deep integration with the engine, and this steps could improve the workflow for the game generation.
The text was updated successfully, but these errors were encountered: