doc-slot-core-manual/docs/01-setup-the-project/04-create-game-folder-structure.md
2025-05-05 13:53:24 +07:00

52 lines
1.5 KiB
Markdown

---
sidebar_position: 4
---
# Create Game Folder Structure
Make a folder structure for all the game assets.
Inside the `assets` folder, we already have a `core-assets` folder which contains all assets of the template submodule.
We need to have a `game-assets` folder to contain the assets for our game.
Create the following folder structure:
![Game Assets Folder](./img/game-assets.png)
Next we're gonna use our first template assets - the template cocos scenes.
These scenes are already setup and ready to use.
Copy all Cocos scene assets from `assets/core-assets/hyper-core/scenes` to ` assets/game-assets/scenes`.
Rename those scenes:
- `template-loading` -> `loading`
- `template-main-game` -> `main-game`
- `template-preload` -> `preload`
- `template-preview` -> `preview`
![Template Scene](./img/template-scenes.png)
Inside `assets/game-assets/scripts/`, create a folder called `custom-scaler` then add a script `custom-scale-data.js`.
![Custom Scale](./img/custom-scale.png)
The setup is complete. You should create a commit and open Pull Request.
Run these following command:
```bash
git checkout -b feature/setup-folder-structure
git add --a
git commit -m "Setup Folder Structure"
git push --set-upstream origin feature/setup-folder-structure
```
:::warning
Notice that you can only commit `game-asset`, `scripts` and `scenes`.
Git automatically ignores empty folders, so don't be alarmed if they don't appear in your commits.
No worries—these folders will soon be filled with plenty of assets!
:::