From 40c6a00c6a3905ccd3a43962f15da5a69610b536 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sat, 21 May 2022 19:23:43 -0600 Subject: add godot project structure entry --- art/dst/rss.xml | 4 +- blog/dst/g/godot_project_structure.html | 252 ++++++++++++++++++++++++++++++++ blog/dst/index.html | 1 + blog/dst/rss.xml | 125 +++++++++++++++- blog/dst/sitemap.xml | 6 + blog/dst/tag/@english.html | 1 + blog/dst/tag/@gamedev.html | 1 + blog/dst/tag/@short.html | 1 + blog/src/.files | 1 + blog/src/g/godot_project_structure.md | 82 +++++++++++ 10 files changed, 470 insertions(+), 4 deletions(-) create mode 100644 blog/dst/g/godot_project_structure.html create mode 100644 blog/src/g/godot_project_structure.md diff --git a/art/dst/rss.xml b/art/dst/rss.xml index 2213e30..9266bf5 100644 --- a/art/dst/rss.xml +++ b/art/dst/rss.xml @@ -13,8 +13,8 @@ Copyright 2021 David Luévano Alvarado david@luevano.xyz (David Luévano Alvarado) david@luevano.xyz (David Luévano Alvarado) - Sun, 22 May 2022 00:27:09 GMT - Sun, 22 May 2022 00:27:09 GMT + Sun, 22 May 2022 01:23:08 GMT + Sun, 22 May 2022 01:23:08 GMT pyssg v0.7.2 https://validator.w3.org/feed/docs/rss2.html 30 diff --git a/blog/dst/g/godot_project_structure.html b/blog/dst/g/godot_project_structure.html new file mode 100644 index 0000000..7e3f0b5 --- /dev/null +++ b/blog/dst/g/godot_project_structure.html @@ -0,0 +1,252 @@ + + + + + + + General Godot project structure -- Luévano's Blog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+

General Godot project structure

+ +

One of my first issues when starting a project is how to structure everything. So I had to spend some time researching best practices and go with what I like the most.

+

The first place to look for is of course the official Godot documentation on Project organization; along with project structure discussion, also comes with best practices for code style and what-not. I don’t like this project/directory structure that much, just because it tells you to bundle everything under the same directory but it’s a really good starting point, for example it tells you to use:

+ +

Where I would prefer to have more modularity, for example:

+ +

It might look like it’s more work, but I prefer it like this. I wish this site was still available, as I got most of my ideas from there, but apparently the owner is not maintaining his site anymore; but there is this excelent comment on reddit which shows a project/sirectory structure more in line with what I’m currently using (and similr to the site that is down that I liked that much). I just do somethings a bit different, and end up with:

+ +

And so on, I hope the idea is clear. Basically you need to abstract some entity/object that you’re going to use into its more basic form and use subdirectories for each level of abstraction (a player is an actor and thus we use actor/player; a box is part of the world, and is a level so we can use levels/common/decor/box or something like that). Once you have the most basic abstraction done, anything that belongs to that abstraction will have all of its assets/sounds/shaders/etc in it’s directory.

+ + + + +
+ +
+ + + + \ No newline at end of file diff --git a/blog/dst/index.html b/blog/dst/index.html index 228e2bc..320fe6b 100644 --- a/blog/dst/index.html +++ b/blog/dst/index.html @@ -95,6 +95,7 @@

Articles