playground, back to the guide

open the guide in a new tab ↗

Build a desktop pet in Godot

step 2 of 6: Build the scene

Finally, we’re set up! Let's start making the pet

Let's start by making a 2D scene, this will be the world your pet will live in.

Click 2D scene in Godot to create a 2D scene

then press Command S on macOS or Ctrl+S on Windows and Linux to save, and give your scene a name.

Now that you have the scene, let's add some things to it.

In the Scene panel (top left), click + to add a new node.

  1. type animatedSprite 2D into the search bar.
  2. Select AnimatedSprite2D, and click Create.

Repeat this process to add an Area2D node and a CollisionShape2D node.

Drag the CollisionShape2D node onto the Area2D node so the CollisionShape2D node becomes a child of the Area2D node

Once you’ve done that your scene tree should look like this.

The scene tree: Node2D, with AnimatedSprite2D and Area2D under it, and CollisionShape2D under Area2D.

Let's make the scene transparent!

By default a Godot window has a background, but we want our sprite to sit on the desktop with no background!

to do this we need to adjust the project’s settings.

Click Project > Project Settings…

Godot's Project menu, with Project Settings… at the top.

make sure the Advanced Settings toggle in the top right of Project Settings is on, or some of the settings below won’t show up.

under the Window tab on the left of the Project Settings menu we want to change a couple settings.

set Viewport Width to 200, and Viewport Height to 200. Just enough for your pet!

make sure

  • Borderless
  • Always on Top
  • Transparent

are on

Project Settings at Display, Window: Viewport Width and Viewport Height are 200, and Borderless, Always on Top, and Transparent are on.

Then search for Per Pixel, select Window and enable Per Pixel Transparency

Project Settings searched for per Pixel, with Window selected and Per Pixel Transparency, Allowed, on.

once you’ve done that search for Rendering in the top bar, select Viewport and enable Transparent Background

Project Settings searched for Rendering, with Viewport selected and Transparent Background on.

You’ll see a pop up at the bottom prompting to save & restart. Click the button and wait for Godot to restart

The bar at the bottom of Project Settings: Changed settings will be applied to the editor after restarting, and a Save & Restart button.