Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 7

Getting Started: Your First Godot Project

Recommended resources

Welcome! In our last lesson, we explored how to use variables to store and manage data like player health or a character's name. We've been working with individual scripts and scenes, but we haven't yet set up the master container for our entire game. Every game in Godot lives inside a project, which holds all its scenes, scripts, art, and sound together in one place.

Today, we'll take a step back from the code to focus on this essential foundation. You will learn how to create, save, and run a complete Godot project. This involves using the Project Manager to start a new game, understanding how to save your work in files called "scenes," and configuring the engine so it knows which scene to load when you press "Play." This is a crucial, one-time setup for the exciting journey ahead.

Creating Your First Godot Project

Everything in Godot starts with the Project Manager. If you have a scene open, you can get back to it by going to Project > Quit to Project List in the top menu. This window is your command center for creating new projects or opening existing ones.

This is the Godot Project Manager. We'll start by clicking the 'New Project' button.

Let's create the project that will become your Link's Awakening-inspired adventure.

  1. Click the New Project button. This opens the "Create New Project" dialog.
  2. Follow the steps outlined in the video below to fill out the project details. As you watch, I'll provide some specific recommendations for our game.

Your First 2D GAME From Zero in Godot 4! (Complete Beginner Tutorial)

This video by Kaan Alpar provides a clear, step-by-step walkthrough of the project creation process.

Watch the segment from the beginning to see how to navigate the project creation window. Focus on the explanation of the Project Name and Project Path fields.

Here's how to fill in the fields for our specific goal:

The settings we'll use to create our new project.
  • Project Name: Give your game a name. Something like Top-Down-Adventure or Zelda-Like-Game works well. Godot will automatically create a folder with this name.

  • Project Path: This is where the project folder will be saved on your computer. Click Browse and choose a convenient location, like your Documents or a dedicated "Godot Projects" folder. Make sure the Create Folder button is active so Godot handles the folder creation for you.

  • Renderer: This is an important choice. It determines how Godot draws your game on the screen.

    • Forward+ is for modern, high-end 3D graphics.
    • Mobile is optimized for mobile devices.
    • Compatibility is designed for maximum hardware support and is ideal for simpler 2D games and pixel art.

    For your goal of creating a Game Boy-style 2D game, the Compatibility renderer is the perfect choice. It's stable, efficient, and ensures your pixel art will look crisp without requiring advanced graphics hardware.

Once you've set these fields, click Create & Edit. The Godot editor will open with your new, empty project.


Saving Your Work: Scenes

Your project is now created, but it's like an empty book. The "pages" of a Godot game are called scenes. A scene is a collection of game objects (called nodes) that you arrange together—for example, a player scene might contain a sprite and a collision area, while a level scene might contain the tilemap and enemies.

Before we can run our game, we need to create and save at least one scene to serve as the main entry point.

Let's Learn Godot 4 by Making an RPG - Part 1 - DEV Community

This article from DEV Community clearly explains how to create folders and save your first scene. We will follow a similar process.

Please read the section under the "PROJECT SETUP" heading. Focus on the instructions for creating folders and saving the main scene. We won't be adding assets just yet, but pay close attention to the concepts of creating Scenes folder and saving a Node2D scene as Main.tscn.

Let's apply those steps now:

  1. In the FileSystem dock (usually bottom-left), right-click on the res:// folder and select New Folder.... Name it scenes. This will help keep our project organized.
  2. In the Scene dock (usually top-left), click the 2D Scene button. This creates a new scene with a Node2D as its starting point. Node2D is the most basic building block for any 2D game object, making it a perfect root for our main scene.
  3. You'll see an "Unsaved" tab in the main viewport. Save your scene by pressing Ctrl+S (or Cmd+S on macOS).
  4. A save dialog will appear. Navigate into the scenes folder you just created, name the file main.tscn, and click Save.

You have now created and saved your first scene! You'll see main.tscn appear inside the scenes folder in the FileSystem dock.


Running the Project

With a saved scene, we can finally run our project. There are two "play" buttons at the top-right of the editor:

  • Play Scene (F6): Runs only the currently active scene.
  • Play Project (F5): Runs the entire game from its designated starting point.

When you run a project for the first time, Godot doesn't know where to begin. You have to tell it which scene is the "main scene."

Nodes and Scenes — Godot Engine (stable) documentation in English

The official Godot documentation explains this step perfectly.

Read the section titled Setting the main scene. This explains why we need to select a main scene and how to do it.

Let's do it. Press the Play Project button (or F5). A dialog will pop up asking you to select the main scene. Click Select Current to choose the main.tscn you have open.

Your project will now run, and a window will appear! It will be empty and gray, but this is a huge milestone. You have successfully created, saved, and run a Godot project.


A Quick Polish: Setting the Game Boy Resolution

To make this feel more like your project, let's make a small adjustment that aligns with your goal. A real Game Boy has a screen resolution of 160x144 pixels. We can tell Godot to use this resolution for our game window.

The following video shows how to adjust window settings.

How to make an action RPG in Godot 4 #1: Setup and our first scene | tutorial | zelda-like

This video by MakerTech demonstrates how to configure project settings for the game window.

Watch the segment from setting viewport size to see how to change the window properties.

Follow these steps to set up a retro resolution:

  1. Go to Project > Project Settings... at the top of the editor.
  2. In the left-hand menu, find the Display section and click on Window.
  3. Under Size, set Viewport Width to 160 and Viewport Height to 144.
  4. Under Stretch, set Mode to Canvas Items and Aspect to keep. This ensures your pixel art scales perfectly without becoming blurry, preserving that classic retro look.

Now, press F5 to run your project again. You'll see a much smaller window that perfectly matches the Game Boy's screen dimensions.


Conclusion

Congratulations! You've successfully navigated one of the most important first steps in game development: setting up a proper project structure. While it might not feel as dynamic as writing code, getting this foundation right is essential for everything that follows.

Here are the key takeaways:

  • A Godot Project is the main container for all your game's files, created using the Project Manager.
  • For 2D pixel art games, the Compatibility renderer is an excellent and reliable choice.
  • Games are built from scenes (.tscn files), which are collections of nodes.
  • You must save a scene before you can run it. Keeping scenes organized in a dedicated folder is good practice.
  • To run your game, you need to set a Main Scene via the F5 (Play Project) prompt or in the Project Settings. This tells Godot where your game starts.

Now that we have a solid project to work in, we are ready to start building our player character. In the next lesson, we will create a dedicated player scene using a CharacterBody2D node, the foundation for controlling a character with physics and player input.