compsci_godot_albert/_subsections/sec04/lesson-01.org

1.4 KiB

Section 04 - Lesson 01 | Project Setup & Aspect

Notes

setting up

  • root node: plain Node2D
  • add as Sprite2D for background
  • change aspect ration to 480*854 Portrait

    • this is the recommended ratio for mobile
  • copy assets to the FileSystem pane under res://
/notes/compsci_godot_albert/media/commit/a29c3eb8f5f329e131c21937dcbe67a2f9a77e1d/_share/media/img/albert/section04/lesson-01/fig01.png

making the background

  • you add a Sprite2D node to the Node2D
  • drag the image you want from res:// to the texture property in the Sprite2D inspector
/notes/compsci_godot_albert/media/commit/a29c3eb8f5f329e131c21937dcbe67a2f9a77e1d/_share/media/img/albert/section04/lesson-01/fig02.png /notes/compsci_godot_albert/media/commit/a29c3eb8f5f329e131c21937dcbe67a2f9a77e1d/_share/media/img/albert/section04/lesson-01/fig03.png

set the current default run scene

there are two ways to do this

  1. hit "run" and select the current scene
  2. via Project Settings

    1. go to Project->Project Settings
    2. go to Application->Run->Main Scene
    3. pick the scene you want to put in there

      /notes/compsci_godot_albert/media/commit/a29c3eb8f5f329e131c21937dcbe67a2f9a77e1d/_share/media/img/albert/section04/lesson-01/fig04.png