SDL3 Oyun Programlama ve Godot Oyun Motoru sayfalarımız yayında...

Ana sayfa > Oyun programlama > Godot game engine > Adding text

Adding text

To create text in the game, follow the steps below.

1. While the "game" Scene and "Game" Node are selected, create a new Node.

2. In the Create New Node window that appears, search for Label in the Search line and select it, and click the Create button.

3. "Label" is placed on the stage. We can change the "Label" content from the box under the "Text" line in the "Inspector" tab.

4. To fix the blurry image, while the "Label" Node is selected, drag and drop the "assets\fonts\PixelOperator8.ttf" file under the "FileSystem" tab to the "Font" line under the "Control" line in the "Theme Overrides" option under the "Font" line under the "Inspector" tab.

5. Change the "Font Size" value under the "Font" line to 8.

6. Change the "Font Col" value under the "Colors" option in "Theme Overrides" and select the font color.

7. Select the "Label" Node and copy it with the Ctrl-C keys. Right-click twice on the scene and select the "Paste Node(s) Here" option. Thus, two nodes named "Label2" and "Label3" are created.

8. Create a normal Node, change its name to "Labels" and move the 3 "Label" Nodes into this Node.

9. "Game" Node will appear as follows.

10. "game" Scene will look like this.

Save all the scenes with Ctrl-S.