2023-01-12 20:49:14 +01:00
|
|
|
|
2022-09-10 12:15:58 +02:00
|
|
|
|
|
|
|
Setting up the project
|
|
|
|
======================
|
|
|
|
|
|
|
|
In this short first part, we'll set up and organize the project.
|
|
|
|
|
|
|
|
Launch Godot and create a new project.
|
|
|
|
|
2023-01-12 20:16:00 +01:00
|
|
|

|
2022-09-10 12:15:58 +02:00
|
|
|
|
2023-01-12 18:31:02 +01:00
|
|
|
GDScript
|
2022-09-10 12:15:58 +02:00
|
|
|
|
2023-01-12 18:31:02 +01:00
|
|
|
```
|
2023-01-12 20:39:50 +01:00
|
|
|
Download :download:`dodge_assets.zip <files/dodge_assets.zip )`.
|
2022-09-10 12:15:58 +02:00
|
|
|
The archive contains the images and sounds you'll be using
|
2023-01-12 19:43:03 +01:00
|
|
|
to make the game. Extract the archive and move the `art/`
|
|
|
|
and `fonts/` directories to your project's directory.
|
2023-01-12 18:31:02 +01:00
|
|
|
```
|
2022-09-10 12:15:58 +02:00
|
|
|
|
|
|
|
Your project folder should look like this.
|
|
|
|
|
2023-01-12 20:16:00 +01:00
|
|
|

|
2022-09-10 12:15:58 +02:00
|
|
|
|
|
|
|
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 and in the left column, open the *Display -> Window* tab. There, set
|
2023-01-12 19:43:03 +01:00
|
|
|
"Width" to `480` and "Height" to `720`.
|
2022-09-10 12:15:58 +02:00
|
|
|
|
2023-01-12 20:16:00 +01:00
|
|
|

|
2022-09-10 12:15:58 +02:00
|
|
|
|
|
|
|
Also, scroll down to the bottom of the section and, under the "Stretch" options,
|
2023-01-12 19:43:03 +01:00
|
|
|
set `Mode` to "2d" and `Aspect` to "keep". This ensures that the game scales
|
2022-09-10 12:15:58 +02:00
|
|
|
consistently on different sized screens.
|
|
|
|
|
2023-01-12 20:16:00 +01:00
|
|
|

|
2022-09-10 12:15:58 +02:00
|
|
|
|
|
|
|
Organizing the project
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2023-01-12 19:43:03 +01:00
|
|
|
In this project, we will make 3 independent scenes: `Player`, `Mob`, and
|
|
|
|
`HUD`, which we will combine into the game's `Main` scene.
|
2022-09-10 12:15:58 +02:00
|
|
|
|
|
|
|
In a larger project, it might be useful to create folders to hold the various
|
|
|
|
scenes and their scripts, but for this relatively small game, you can save your
|
2023-01-12 19:43:03 +01:00
|
|
|
scenes and scripts in the project's root folder, identified by `res://`. You
|
2022-09-10 12:15:58 +02:00
|
|
|
can see your project folders in the FileSystem dock in the lower left corner:
|
|
|
|
|
2023-01-12 20:16:00 +01:00
|
|
|

|
2022-09-10 12:15:58 +02:00
|
|
|
|
|
|
|
With the project in place, we're ready to design the player scene in the next lesson.
|