KOBUGE-Games / project-kumquat

Repo for Kobuge's 1st hackathon game (a tower defense) - name subject to imminent change
GNU General Public License v3.0
48 stars 9 forks source link

Directory structure conventions #17

Closed bojidar-bg closed 8 years ago

bojidar-bg commented 8 years ago

Should we change the directory structure as proposed in the wiki?

Basically the idea is to switch to:

- game/
  - game.tscn
  - game.gd
  - btn_tower.tscn
- level/
  - level.tscn
  - level.gd
  - tileset.png
  - tileset.tres
- towers/
  - base/
    - tower.tscn
    - tower.gd
    - range_indicator.png
  - tower1/
    - tower1.tscn
    - tower1.png

Currently we use a structure like:

- graphics/
  - tileset.png
  - range_indicator.png
  - towers/
    - tower1.png
- resources/
  - tileset.tres
- scripts/
  - game.gd
  - level.gd
  - tower.gd
- scenes/
  - game.tscn
  - btn_tower.tscn
  - level.tscn
  - towers/
    - tower.tscn
    - tower1.tscn
Calinou commented 8 years ago

I suggest putting all game data in a data/ folder, to make the view of the root directory less cluttered.

This means only README.md, LICENSE.txt, .gitignore, engine.cfg, icon.png and icon.png.flags should be in the project root, along with the data/ folder.

akien-mga commented 8 years ago

Personally I find that sorting things by type is sufficient for a small project, but I'm not against changing to a game-context based sorting. I'd propose something like:

- enemies/
- levels/ (we're likely to have more than one level in the end)
- main/ ("game" doesn't mean much in the end, I guess "main" reminds the C++ "code-reading starts here" convention).
- towers/

The good point with a sorting by asset-type is that you don't have to think too much about what should go where :-D

I'm not for a data folder, it's meaningful when you want to oppose it to a src folder and you want to have it include only noarch data for easy system-wide installed, but since in a Godot project we would have to put everything into data, better not have it in the first place :) Having 4-5 folders in the root directory doesn't make it cluttered IMO.

bojidar-bg commented 8 years ago

Ok, as there is no more discussion I would suggest to follow @akien-mga's plan:

- enemies/
  - enemy.xscn
  - enemy_skeleton/ (not enemy1 or enemy_one)
    - enemy_skeleton.png
    - enemy_skeleton.xscn
  - ....
- towers/
  - .... (like above)
- main/
  - main_menu.scn
  - game.scn
  - hud.scn
  - ....
- levels/
  - tilesets/
    - tileset_grass.tscn
    - tileset_grass.tres
  - level_base.xscn
  - level_peaceful_valley.xscn
  - ....
- README.md
- ....
akien-mga commented 8 years ago

Fine by me :)