Setting up the project
To create a new project, start by opening Project Settings so that you can configure the defaults that you’ll need.
The art assets for this game use a pixel art style, which means they look best when the images are not smoothed, which is Godot’s default setting for texture filtering:
Figure 4.2: Texture filtering
While it’s possible to set this on each Sprite2D
, it’s more convenient to specify the default setting. Click the Advanced toggle in the top right and find the Rendering/Textures section on the left. In the settings list, scroll to the bottom and find the Canvas Textures/Default Texture Filter setting. Change it from Linear to Nearest.
Then, under Display/Window, change Stretch/Mode to canvas items and Aspect to expand. These settings will allow the user to resize the game window while preserving the image’s quality. Once the project is complete, you’ll be able to see the effects...