finished L03 Paddle scene
This commit is contained in:
parent
54c38248a5
commit
decb448691
2 changed files with 54 additions and 0 deletions
|
|
@ -8,3 +8,56 @@
|
|||
- [[https://www.udemy.com/course/jumpstart-to-2d-game-development-godot-4-for-beginners/learn/lecture/45070459#overview][S03:L11.03 - Paddle Scene]]
|
||||
|
||||
* Notes
|
||||
|
||||
** scenes
|
||||
there are three basic scenes we are going to create
|
||||
|
||||
1. Gem Scene
|
||||
- Sprite2D
|
||||
- CollisionShape2D
|
||||
2. Paddle Scene
|
||||
- Sprite2D
|
||||
- CollisionShape2D
|
||||
3. Game Scene
|
||||
- Sprite2D
|
||||
- Paddle Scene
|
||||
- Timer
|
||||
- ScoreLabel
|
||||
- AudioStreamPLayer2D
|
||||
- AudioStreamPlayer
|
||||
|
||||
*** creating a new scene
|
||||
1. go to the top of the center pane, and click on the plus.
|
||||
- this creates an empty unsaved scene
|
||||
- you must create a new root node.
|
||||
- click the '+' symbol in the upper left scene pane
|
||||
- search for Area2D: "a region of 2D space that detects other CollesionObject2Ds enteriinig or exiting it"
|
||||
2. Menu->Scene->New Scene
|
||||
- select a root node, ie 2DScene - which will set your root node as a Node2D
|
||||
- or create one via the "+"
|
||||
|
||||
*** using a Area2D root node
|
||||
- you must add a shape so the root node can interact with other objects and detect collisions or overlaps
|
||||
- CollisionShape2D
|
||||
- CollisionPolygon2D
|
||||
|
||||
*** add collisoinshape2D
|
||||
- "+" -> CollisionShape2D
|
||||
- add a shape
|
||||
- CollsionsShape2D node -> Inspector -> CollisionShape2D -> Shape -> <choose from dropdown>
|
||||
|
||||
*** add sprite2D
|
||||
- the shape is only for background processing
|
||||
- "+" -> Sprite2D
|
||||
- drag and drop an image into Inspector->Sprite2D->Texture
|
||||
|
||||
*** refitting the collision shape
|
||||
- currently the collision shape is being drawn first, then the sprite on top of it
|
||||
- reorder so that the sprite gets drawn first, then the colision shape
|
||||
- resize the collision shape, use transform if you need to
|
||||
|
||||
|
||||
*** add paddle to game scene
|
||||
- go to the game scene
|
||||
- click the chain button in the upper left scene pain, the chain button is to the right of the "+"
|
||||
- select which scene you want to add
|
||||
|
|
|
|||
1
toc.org
1
toc.org
|
|
@ -13,3 +13,4 @@ https://www.udemy.com/course/jumpstart-to-2d-game-development-godot-4-for-beginn
|
|||
** Section 3 - An intro to Godot with Gem Catcher
|
||||
*** [[./_subsections/sec03/lesson-02.org][Lesson 02 | Game Scene]]
|
||||
*** [[./_subsections/sec03/lesson-03.org][Lesson 03 | Paddle Scene]]
|
||||
*** [[./_subsections/sec03/lesson-04.org][Lesson 04 | Gem Scene]]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue