What's the best file structure for Godot projects?

preview_player
Показать описание
Here, I answer your quick questions about Godot and game development in simple videos.
If you have a question that we can answer in 5 minutes max, ask away!
Рекомендации по теме
Комментарии
Автор

I was using; assets, scripts, scenes, levels etc. type of file structure before. I learned that file structure from Unity tutorials years before and it become a habit. I was making subcategories like assets>player>sprites but it got more and more complicated to deal with :D I saw your file structure at one of your demo (gun tutorial) and find it really good and tried to implement. Its really way easier to do stuff with this structure. This video still gives ideas tho. I name my common file as 'other' but 'common' is more understandable.

My question is how to organize UI elements in godot. Video about common confusions and some information about important stuff would be really good.

eakyrtk
Автор

My number one tip for file organisation would be to always use lower case file and folder names, ESPECIALLY if you develop on Windows, as it is case insensitive and will not produce errors if you accidentally try to open a path with incorrect casing.
All other operating systems are case sensitive and I have seen several addons from the Godot Asset Library fail to load on non-Windows OSes and the solution was to rename the files or fix the strings in the scripts.

JakobKobberholm
Автор

I'm learning how to use Godot and both of your channels are being very helpful!

vinicius
Автор

My main problem with organizing things is the UI elements.

rlwarner
Автор

I would like to know how I should organise my scenes! should I have one main scene and instance different levels, or should I swap between scenes on a level change? How would I communicate with objects at different stages of the scene tree?

kacperNFS
Автор

for me personally I like having an Assets/Scenes/Scripts/etc. folders
and my layout for a player is usually
Scenes/Player/Player.tscn
Scripts/Player/Player.gd
Assets/Player/Player.png
yes I use more folders but everything is in an easily found location and folders are a bit cleaner, also if I have someone else working on the project this is an easier system to explain, or at least it feels easier to explain.

gengabe
Автор

I started working on a game which uses 2d sprites within a 3d world and I'm struggling understanding how the depth sorting works in this case. I know that what is lower on the vertical axis will appear below but since all my sprites are looking at the camera at a 45deg angle (camera being lifted up and looking down 45deg) then sometimes my player is on top of objects when technically it shouldn't. Can you enlighten me? Thanks! 🛸

brysonmercury
Автор

I find its tough to know what will be shared and what is isolated from the start. Instead I prefer having an Assets & Scenes folders, to separate sprites/shaders/fonts/etc... from code.
We often reuse assets in many different scenes (e.g. fonts & shaders are used in many different scenes), much safer to keep things separate especially on larger projects.

jacksontriffon
Автор

I made a game on Godot 3.5 version
And i made a 2D game
Where i created a plane on Area 2D node And i created a gameplay button to control my plane in game for PC by using keyboard.
But i want to be in control of my plane in game on Touchscreen .
How can I do this !?

jeemains
Автор

I hear a lot about small scope and large scope games do you have any genre examples for the former in terms of small scope game projects.

VoltitanDev
Автор

Does the main scene have to be outside? And for level scenes, would separate each level to a new folder?

jethdaflip
Автор

Question: how can I assign a tile in a tilemap to a group?

Cellist
Автор

Wonder if you can review next Q&A. Workflow to deploy game to itch.io as web application.

ukrsolid
Автор

I made trees and made health for them
But when i get out of scene their health restarts
I can't make a global variable for trees because every tree would have the same health
How do i do it?

adamprogramming
Автор

I actually name the "common" folder as "component" instead. I guess in this case it's how one would make sense to a human. Like how I put any tscn that populates the world, I put their folder as a subfolder for the world folder.

DevDev-dmst
Автор

𝐒𝐢𝐫 𝐦𝐲 𝐪𝐮𝐞𝐬𝐭𝐢𝐨𝐧
𝐖𝐡𝐢𝐜𝐡 𝐢𝐬 𝐛𝐞𝐭𝐭𝐞𝐫
𝟏. 𝐌𝐚𝐤𝐞 𝐚 𝐠𝐚𝐦𝐞 𝐢𝐧 𝐠𝐨𝐝𝐨𝐭 𝐮𝐬𝐢𝐧𝐠 𝐜++ 𝟐.𝐦𝐚𝐤𝐞 𝐚 𝐠𝐚𝐦𝐞 𝐢𝐧 𝐠𝐨𝐝𝐨𝐭 𝐮𝐬𝐢𝐧𝐠 𝐠𝐝 𝐬𝐜𝐫𝐢𝐩𝐭​

bolnikrgaming