Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

Налаштування проекту

У цій короткій першій частині ми створимо та організуємо проект.

Запустіть Godot і створіть новий проект.

../../_images/new-project-button.webp

When creating the new project, you only need to choose a valid Project Path. You can leave the other default settings alone.

Download dodge_the_creeps_2d_assets.zip. The archive contains the images and sounds you'll be using to make the game. Extract the archive and move the art/ and fonts/ directories to your project's directory.

Папка вашого проекту має виглядати так.

../../_images/folder-content.webp

This game is designed for portrait mode, so we need to adjust the size of the game window. Click on Project -> Project Settings to open the project settings window, in the left column open the Display -> Window tab. There, set "Viewport Width" to 480 and "Viewport Height" to 720.

../../_images/setting-project-width-and-height.webp

Also, under the Stretch options, set Mode to canvas_items and Aspect to keep. This ensures that the game scales consistently on different sized screens.

../../_images/setting-stretch-mode.webp

Організація проекта

У цьому проекті ми зробимо 3 незалежні сцени: Player, Mob, та HUD, і поєднаємо їх в ігровій сцені Main.

У ширшому проекті було б корисно зробити папки для зберігання різних сцен і їх скриптів, але для цієї, відносно невеликий гри, ви можете зберігати свої сцени і скрипти в кореневій папці res: //. Ви можете бачити папки проекта на панелі Файлова Система в нижньому лівому кутку:

../../_images/filesystem_dock.webp

Тепер ми готові розробити сцену гравця на наступному уроці.