compsci_godot_albert/_subsections/sec04/lesson-01.org

56 lines
1.7 KiB
Org Mode
Raw Normal View History

2024-12-28 23:40:05 +02:00
#+title: Section 04 - Lesson 01 | Project Setup & Aspect
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../../_share/media/css/godot.css" />
* Links
- [[../../toc.org][TOC - Godot Notes]]
- [[https://www.udemy.com/course/jumpstart-to-2d-game-development-godot-4-for-beginners/learn/lecture/45069795#overview][S04:L45.01 - Project Setup & Aspect Ratios]]
* Notes
2025-01-07 19:46:30 +02:00
** 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://
#+attr_html: :width 300px
[[./../../_share/media/img/albert/section04/lesson-01/fig01.png]]
2025-01-07 20:02:43 +02:00
** 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
#+attr_html: :width 500px
[[./../../_share/media/img/albert/section04/lesson-01/fig02.png]]
#+attr_html: :width 500px
[[./../../_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
#+attr_html: :width 700px
[[./../../_share/media/img/albert/section04/lesson-01/fig04.png]]
2025-01-09 06:46:14 +02:00
** set up aspect ratio
*** set the values
- Project->Project Settings
- Display->Window
- In 'Size'
- set width 480
- set height to 854
*** viewport changes
- the white line representing the viewport changes shape
- move the background image appropriately with the view tool
#+attr_html: :width 600px
[[./../../_share/media/img/albert/section04/lesson-01/fig05.png]]