this post was submitted on 28 Mar 2026
1 points (100.0% liked)

Game Development

6055 readers
1 users here now

Welcome to the game development community! This is a place to talk about and post anything related to the field of game development.

Community Wiki

founded 2 years ago
MODERATORS
 

I'm working on a project that's scaling up a bit fast in term of files and content. As such I need a way to keep these files organized.

The godot documentation recommends keeping resources and assets close to their scenes. I used to do the opposite, separating assets by type and linking them in my scenes.

Now, what the docs recommend is good but how to avoid duplications when you need to use the same resource at multiple places?

Say you have a gunshot sound, your player can use it, your enemies too.

Option A (the docs way):

/enemies/cowboy/gunshot.ogg
/enemies/cowboy/cowboy.tscn
/enemies/turret/gunshot.ogg
/enemies/turret/turret.tscn
/player/gunshot.ogg
/player/player.ogg

Here I have a redundancy of gunshot.ogg, so if later I want to edit the sound, I have to remember to swap it at 3 different places.

But on the other hand, the scenes are better "packed" for reusability on other projects and it "feels right"

Option B (my way):

/gameobjects/player.tscn
/gameobjects/cowboy.tscn
/gameobjects/turret.tscn
/sounds/gunshot.ogg

Here my naive way reduces redundancy, if I want to update the gunshot sound, I can just replace the one under /sounds/. The project is smaller which is also a (very) good benefit.

However, if I want to make another game, reusing those scenes is a pain because I'm dealing with missing resources and finding who needs what to work.

Is there a middle ground method, some Option C I'm not seeing?

Thank you for reading ^^

you are viewing a single comment's thread
view the rest of the comments
[–] ViscloReader@lemmy.world 0 points 2 weeks ago