CodeBlanks Logo Icon CodeBlanks

A new project

Learn to start a new project in Godot and its directory layout.

Creating a new project

In the Godot Project Manager you press New Project, give the project a name and choose an empty directory (folder). Godot puts a project.godot file at the root of that directory; every project setting is stored in this file. You can later change the project name via Project > Project Settings.

func _ready():
    print(ProjectSettings.get_setting("application/config/name"))

The ProjectSettings object lets you read the project settings straight from your code.

The project directory and res://

The whole project lives inside the directory you chose, and Godot writes this root path as res://. A common habit is to keep scene files in a scenes/ folder and scripts in a scripts/ folder. When you save a scene its file name ends with the .tscn extension, which is the extension of a Godot scene file.

func _ready():
    var yol = "res://scenes/ana_sahne.tscn"
    print(yol)

This code prints the res://scenes/ana_sahne.tscn path.

Practice Project info

Inside _ready, define the variable proje_adi with the value "Uzay Macerası" and the variable kok_dizin with "res://". Then print these two values on two separate lines with the labels Proje: and Dizin: .

Starter code

Player.cs
func _ready():
    # 1) proje_adi değişkenini "Uzay Macerası" olarak tanımla
    # 2) kok_dizin değişkenini "res://" olarak tanımla
    # 3) "Proje: " etiketiyle proje_adi değerini yazdır
    # 4) "Dizin: " etiketiyle kok_dizin değerini yazdır
    pass

Sample solution

Player.cs
func _ready():
    var proje_adi = "Uzay Macerası"
    var kok_dizin = "res://"
    print("Proje: " + proje_adi)
    print("Dizin: " + kok_dizin)

Expected output

Proje: Uzay Macerası
Dizin: res://

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 When you create a new Godot project, which file appears in the project root automatically?

  • The file of the first scene: ana_sahne.tscn
  • A general settings file: config.ini
  • The project settings file: project.godot Correct answer
  • The runnable game file: game.exe

Explanation: A new project opens with the project.godot file at its root. Scene files do not appear until you create them.

2 The project root prefix

Question
var sahne_yolu = "____scenes/ana_sahne.tscn"
Answer
var sahne_yolu = "res://scenes/ana_sahne.tscn"

Explanation: The project root is written as res:// in Godot; scene and script files are addressed with this prefix.

3 Project pieces

Term Meaning
project.godot File storing project settings
res:// Project root directory
scenes/ klasörü Folder holding scene files
Project Settings Window to change project name

All lessons in Beginner