Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.
Issue with Velocity and Delta - L2:P1NPCChrisI had an issue with this practice in that the second test was failing: **"Bullet Moves Based on Velocity And Delta"**
I had everything correct, but was using a velocity of Vector2(480, -480). This second test was returning as a fail, but after I checked here I tried again with Vector2(500, -500) and it passed. I'm not sure if that is intended, but if so it would help to make the text more clear about *why* the failure is recurring. My assumption was that it was something to do with velocity * delta due to the message, but that was not the case. Thanks for the course!135Feb. 05, 2024
L3.P1 questionmiiaIn the practice, L3.P1, I solved it on my first try by changing `velocity := Vector2(0,0)` to `Vector2(1,1)`.
....But I don't know why this worked, haha. The bullet did not actually move. I'm not entirely sure what this module was asking me to do, either. We don't want `direction = Vector2(0, 0)`, and I see why this solution changed that value. But I just don't feel confident that was the intended solution. Maybe it was?
Additionally, I think I was confused because one of the PASSED requirements was "Ship Moves With Pressed Direction Keys" and we have not implemented that yet.34Feb. 04, 2024
doesnt have a LESSONS folder to save on.Olivep3awould it be ok to just make one or were there other things in that folder?152Feb. 25, 2024
I don't know if I'm missing something or it's a bugAlcedoHi, I don't know if I'm miss reading the task or I have found a bug for the practice L2.P1.
If I put a number different from `-500` for the y value of the var `velocity` (e.g. `-450`), when I run the practice it tells me that I didn't pass the second condition (Bullet Moves Based On Velocity And Delta).12Feb. 04, 2024
Something that I madedofudengamesI made a item that does damage to the the player, and created code that says if you have 10 gems heal 50 health, and if you get 0 health or less you die.I also created code that says if you have more than 100 health than set your health to 100
If you want to do this too and want the code, please reply!
41Oct. 28, 2024
Typo in sentence.tehdinozorzYes, the ship moved down! You might have learned in math class esthat positive y coordinates are up. But in 2D games, the y-axis usually points down.11Feb. 04, 2024
Why velocity.angle() isn't multiplied by delta?CheI don't know if I'm understanding the usage of delta but don't we use delta anytime we are dealing with an entity or object that moves? or are there some circumstances that we don't multiply by delta.10Nov. 08, 2024
No Error, but no "Lessons" folder, nor is the plugin working correctlyhandsome-antExactly the title. I got through the lesson just saving the ship to the "lessons_reference" folder, but then when it came time to enable the plugin, the plugin was not found.
Thus far I have redownloaded the files and unzipped them (using 7-zip) and replaced them entirely. Every time I load into Godot, no error, but also no plugin.30Oct. 25, 2024
Error in ui_test_panel.gd in L2.P1orderly-woodcockWhen i run the practice with the following code
```gdscript
extends Sprite2D
# Change the bullet's velocity to move towards the top right.
var velocity := Vector2(500, -500)
# Complete the process function to make the bullet move based on the velocity
# vector. Also, rotate the bullet to match the velocity vector's angle.
func _process(delta: float) -> void:
position += velocity*delta
rotation = velocity.angle()
```
I get an error from "ui_test_panel.gd" at line 113 that states:
Invalid access to property or key 'list' on a base object of type 'null instance'.
I am runnning on windows with the godot installation provided in the files60Oct. 15, 2024
Jittering problempr4mosHello! First of all, I would like to thank the GDQuest team for giving me the opportunity to know about such a well-made, professional and wonderful course! It is simply perfect! Now I can understand some details that several books and videos have not covered.
I have a problem that is not exactly related to the lessons. When I run (F6) the code for the ship in motion, I notice small tremors (jittering or stuttering) in some parts of the trajectory. I discovered that the problem disappears with the option **Project > Project Settings > Display > Window > VSync > Disabled**. The movement becomes as fluid as the GDQuest video, but I know that turning off VSync can cause future problems for the end users of a game.
Is there any other solution? What could be causing this problem? I do not believe that the cause is on my workstation but rather on some incorrect configuration or bug in Godot.
Thank you for your attention and response.20Sep. 30, 2024
Value of type Vector2majestic-turtleIf the position property is a Vector2 value, why do I have the write « position += Vector(8, -8) instead of just « position += (8, -8) ?10Sep. 20, 2024
Question - PropertiesspxcyOn Experimenting with moving the ship, we learn that Sprite2D has the position property. How do we verify this? I am looking at the documentation and don't see "position" under the listed properties. I see centered, flip_h, flip_v, etc. 10Sep. 14, 2024
how to make space's move ?variable-skunksorry i didn't understand about [https://school.gdquest.com/courses/learn_2d_gamedev_godot_4/to_space_and_beyond/autopilot#moving-the-ship-diagonally](https://school.gdquest.com/courses/learn_2d_gamedev_godot_4/to_space_and_beyond/autopilot#moving-the-ship-diagonally)30Sep. 04, 2024
L3.P1 Test setup failedJHawkeWhen I click on run for this lesson the text on right is saying test setup failed and the sprite on the right is not moving at all while my code one on the left is. But as the test is not running my code is not being verified and then lesson is stuck. 10Aug. 18, 2024
I'm dumbniyisPlease mention somewhere in the instructions that when you hit "Run" the left side of the screen is YOUR CODE, and the right side is DEMO, I'm so dumb, that took me forever to figure out. I was like "why is it failing, the screen is showing me that the bullet is doing exactly what they said it should... ohhh..."20Aug. 11, 2024
anglenegative-bisonHi, I've got a problem with the angle method, it doesn't work in the script30Jul. 30, 2024
Godot crashes when I enable "GDQuest Practices"VovaI encountered the same issue with "M02.getting_to_know_godot". Now I have it with "M04.to_space_and_beyond_workbook". I understand this plugin solution is innovative, but I'd rather read stuff on a web page that doesn't crash.
I use M1 MacBook Pro which seems to be unsupported at the moment. If you don't have a quick fix, please refund the purchase of this course.20Jul. 23, 2024
Is there a way to reset the progress of the online modules?leafHey guys, I'm back at it. Starting over with M4 and was curious if there was a way to completely reset my progress with the online modules? I.E. questions and answers, lesson practices, etc. (I re-downloaded a fresh copy of the workbook projects)50Jul. 21, 2024
Lesson Numbering Oversightgraceful-clamHi Godot Team :)
In the spirit of teamwork - I noticed a formatting error in the module numberings.
M2, M4, M5, M6, M**0**7, M**0**8.
In the local project panel, when I went to sort the files naming conventions - M07 & M08 end up on top since the "0" is present.
This may be intentional, and I have not gotten far enough in the course yet. However if not, I would like to put forward the suggestion of adding a 0 in M2, M4, M5, M6 to future proof any additions in the double digits for the content, and ease of sorting for other students.
Respectfully,10Jul. 20, 2024
Why does delta have a type of float?profuse-otterMy intuition tells me that an int (as ms or ns since the last frame) would be more precise. Is it just a convenience?10Jul. 08, 2024
Plugins is not showing upLegnedaryClawWhen I follow the instruction to the plugins it does now show up. I am not sure if this is a folder issue.30Jul. 07, 2024
Am I supposed to enable/disable the plugin?perlanceHello!
Before the practice my code differs from what it's supposed to be after the practice, this results in "Run current scene"(F6) giving a fail, am I supposed to disable the plugin and only enable it once I reach the practice part?20Jun. 16, 2024
Question about incrementationHazlarI don't understand the difference between:
case 1:
```gdscript
var velocity := Vector2(300, -300)
func _process(delta: float) -> void:
position += velocity * delta
rotation = velocity.angle()
```
and (+= velocity)
case 2:
```gdscript
func _process(delta: float) -> void:
position = velocity * delta
rotation = velocity.angle()
```
In case 1, if position = 0 :
Frame 1: position = 300,-300
Frame 2: position = 0 ,0? or 300 ,-300?
Because in both cases the ship moves in the same direction. But in this case the exercise is considered unsuccessful.
Thanks !! 10Jun. 08, 2024
DeltaMainzelHi there just wondering how many frames delta actually allows to use or is it fixed to 60 fps? (sry for bad english)10Jun. 04, 2024
Practice is strictKalmaroSo I kept failing this and wasn't sure why, since I copy pasted code I made for the lesson and modified this. Then I realized that I was multiplying the velocity by delta... and then by another number because I was experimenting with speed.
I still got the correct direction, but the practice said I wasn't using delta, when I was.10Jun. 01, 2024
Why doesn't my code pass every check?choodle```gdscript
extends Sprite2D
# Change the bullet's velocity to move towards the top right.
var velocity := Vector2(500, -500)
# Complete the process function to make the bullet move based on the velocity
# vector. Also, rotate the bullet to match the velocity vector's angle.
func _process(delta: float) -> void:
rotation = velocity.angle()
position = velocity * delta
```20May. 27, 2024
413 Errors - My Bullet works but why the errors??? snowm8nMacBook Pro M1 Max - MacOS Ventura Version 13.5.1 (22G90)
Godot v.4.2.stable.official
**I get one yellow error:**
W 0:00:00:0044 MaterialStorage: Project setting "rendering/limits/global_shader_variables/buffer_size" exceeds maximum uniform buffer size of: 16384
<C++ Source> drivers/gles3/storage/material_storage.cpp:1114 @ MaterialStorage()
**And I get 412 red errors similar to this, calling out all the inputs (left, up, down..):**
E 0:00:00:0476 input_feedback_ui.gd:58 @ _input(): The InputMap action "move_right" doesn't exist. Did you mean "ui_right"?
<C++ Error> Condition "!E" is true. Returning: false
<C++ Source> core/input/input_map.cpp:233 @ event_get_action_status()
<Stack Trace> input_feedback_ui.gd:58 @ _input()70May. 22, 2024
Plugin not workingpuzzled-magpieHey,
When I enable the practices plugin I get 106 error messages and the practice panel appears empty. Restarting did not solve it.
*res://addons/gdquest_practice_framework/practice_solutions/metadata.gd:30 - Parse Error: Preload file "res://addons/gdquest_practice_framework/practice_solutions/L5.P1.steering/steering.tscn" does not exist.*
Stuff like that. Am I just missing a ton of files? I didn't touch any of the unzipped files.
Thanks50May. 13, 2024
Put the added and removed line indicators in the code gutterWalruswareThe code view with the +/- indicators for changed code is really helpful, but with the icons being at the line start it pushes all the following code across out of allignment. This is going to become very confusing to follow eespecially as tabs become more important and being able to see how code is nested will be vital for understanding the code.
Here you can see that the rotation line should allign with the position line above it but instead it is poushed over by the + which makes it look indented.
`var velocity := Vector2(480, -480)`
`func _process(delta: float) -> void:`
`position += velocity * delta`
`+ rotation = velocity.angle()`
Please consider putting the line added and line removed icons in the gutter so that they don't misalign the lines of true code. 10May. 13, 2024
Running Scene doesn't workJakkuHey there, new to GDQuest! Trying to troubleshoot an issue w/ running the scene: every time I attempt to run it, I only get a blank grey screen and end up having to end process (due to it not loading in time).
This may be a version issue: I also have version 4.2.2, and running scenes in that version works perfectly fine. I get the godot icon and everything, but not when running scenes in 4.2.1 (or at least the version w/ the workbooks and solutions projects). Any suggestions?20May. 12, 2024
L2.P1complex-hornetThe solution bullet that plays every time the code is run was initially confusing. This behavior isn't explained so when I first started changing the velocity vector before implementing the _process code I couldn't figure out why the changes weren't taking effect.10May. 09, 2024
Getting a lot of errorsjuicyI am unsure why, but I'm getting a bunch of errors when I open up the project.
`unable to write to file ... m04.to_space_and_beyond_workbook/.godot/shader_cache/ ... file in use, locked or lacking permissions`
That's a pop up when I open the editor, the next is what my console says:
`Godot Engine v4.2.1.stable.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors.`
`modules/gltf/register_types.cpp:63 - Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.`
`--- Debug adapter server started ---`
`--- GDScript language server started on port 6005 ---`
`Safe save failed. This may be a permissions problem, but also may happen because you are running a paranoid antivirus. If this is the case, please switch to Windows Defender or disable the 'safe save' option in editor settings. This makes it work, but increases the risk of file corruption in a crash.`
`Safe save failed. This may be a permissions problem, but also may happen because you are running a paranoid antivirus. If this is the case, please switch to Windows Defender or disable the 'safe save' option in editor settings. This makes it work, but increases the risk of file corruption in a crash.`
`Safe save failed. This may be a permissions problem, but also may happen because you are running a paranoid antivirus. If this is the case, please switch to Windows Defender or disable the 'safe save' option in editor settings. This makes it work, but increases the risk of file corruption in a crash.`
`Safe save failed. This may be a permissions problem, but also may happen because you are running a paranoid antivirus. If this is the case, please switch to Windows Defender or disable the 'safe save' option in editor settings. This makes it work, but increases the risk of file corruption in a crash.`
`Attempting to parent and popup a dialog that already has a parent.`
`Attempting to parent and popup a dialog that already has a parent.`
`Attempting to parent and popup a dialog that already has a parent.`
`Safe save failed. This may be a permissions problem, but also may happen because you are running a paranoid antivirus. If this is the case, please switch to Windows Defender or disable the 'safe save' option in editor settings. This makes it work, but increases the risk of file corruption in a crash.`
`Attempting to parent and popup a dialog that already has a parent.`
9 errors and 1 warning.
I am unsure if this is getting in the way of my progress. The plugin does show and it does give me the instructions so no issues so far, but the erros can be a bit daunting, especially because before the plugin wouldn't work, I unzipped the project once more and that helped, but still facing those errors described above. 10May. 08, 2024
Type inference vs Static typingjumbo-crab-deluxeI have recently read that static typing improves performance in Godot 4. But how does using ":=" behave?20Mar. 31, 2024
+ and - diff view indicators not being recognized properlyIzneedWhen trying to follow along and use the (+) or (-) diff view indicators, the program is behaving like they're an actual part of the line of the code. Is there something I'm missing?20Mar. 14, 2024
Type Hints not showing upBriklossFollowed the instructions for the type hints as described and box is showing as checked, and they still are not showing up. What am I missing?
Tried restarting Godot and no change20Mar. 06, 2024
Issues with GDQuest plugin?megkendevHi there! I'm using Windows, in case this is important (since I saw some others using Mac having a similar issue). I'm getting a bunch of errors when enabling the GDQuest plugin, listed below:
>
> Attempt to open script 'res://addons/gdquest_practice_framework/tester/input_panel_container/input_panel_container.gd' resulted in error 'File not found'.
> Failed loading resource: res://addons/gdquest_practice_framework/tester/input_panel_container/input_panel_container.gd. Make sure resources have been imported by opening the project in the editor at least once.
> scene/resources/resource_format_text.cpp:284 - res://addons/gdquest_practice_framework/tester/input_panel_container/input_panel_container.tscn:243 - Parse Error:
> Failed loading resource: res://addons/gdquest_practice_framework/tester/input_panel_container/input_panel_container.tscn. Make sure resources have been imported by opening the project in the editor at least once.
> scene/resources/resource_format_text.cpp:284 - res://addons/gdquest_practice_framework/tester/ui_test_panel.tscn:230 - Parse Error:
> Failed loading resource: res://addons/gdquest_practice_framework/tester/ui_test_panel.tscn. Make sure resources have been imported by opening the project in the editor at least once.
> Failed to instantiate scene state of "res://addons/gdquest_practice_framework/tester/ui_test_panel.tscn", node count is 0. Make sure the PackedScene resource is valid.
> Failed to create an autoload, path is not pointing to a scene or a script: res://addons/gdquest_practice_framework/tester/ui_test_panel.tscn.
> editor/editor_autoload_settings.cpp:550 - Condition "!info->node" is true. Continuing.
Attempting to run the bullet.tscn scene also crashes the debug window, providing the following errors:
> E 0:00:00:0864 load_source_code: Attempt to open script 'res://addons/gdquest_practice_framework/tester/input_panel_container/input_panel_container.gd' resulted in error 'File not found'.
> <C++ Error> Condition "err" is true. Returning: err
> <C++ Source> modules/gdscript/gdscript.cpp:1025 @ load_source_code()
> E 0:00:00:0865 _load: Failed loading resource: res://addons/gdquest_practice_framework/tester/input_panel_container/input_panel_container.gd. Make sure resources have been imported by opening the project in the editor at least once.
> <C++ Error> Condition "found" is true. Returning: Ref<Resource>()
> <C++ Source> core/io/resource_loader.cpp:274 @ _load()
> E 0:00:00:0867 _parse_ext_resource: res://addons/gdquest_practice_framework/tester/input_panel_container/input_panel_container.tscn:243 - Parse Error: [ext_resource] referenced non-existent resource at: res://addons/gdquest_practice_framework/tester/input_panel_container/input_panel_container.gd
> <C++ Source> scene/resources/resource_format_text.cpp:163 @ _parse_ext_resource()
Just wanted to give a heads up about this. Thanks!10Mar. 06, 2024
Code example shows indented, gives errordatiswousThe following code example under "[Turning the ship according to the vector](https://school.gdquest.com/courses/learn_2d_gamedev_godot_4/to_space_and_beyond/autopilot#turning-the-ship-according-to-the-vector)" shows indented in the browser, which gives an error when run.
```gdscript
var velocity := Vector2(480, -480)
func _process(delta: float) -> void:
position += velocity * delta
+ rotation = velocity.angle()
```40Mar. 06, 2024
_process functiondatiswousWhat I understood is that the _process function is a special function inside Godot.
So I don't understand why you devine it. It would be logical to call it, because it already excists, but defining an already excisting function makes no sence to me.
Is this documented somewhere?10Mar. 06, 2024
Some small errors on this pageCornflakes- When you refer to a drop-down menu, I think that really is a context menu.
- There is a word missing here (Did you miss the word 'takes'?) -> "The engine automatically opens the newly created script file and you to the Script editor."
- There is another word missing in the info box "Why is there a colon [...]" (Did you mean 'the' variable type?) -> "Similarly, we can explicitly tell the computer what variable type is when we define it."10Mar. 06, 2024
When to define a functionStonemonkeyWe use `func *process():`* but I thought `_process()` is inherited from Node.
TLDR: If _process(): already exists(is inherited from Node), why do we define it?
I thought we use the *`func fuction_name():*` to define fuctions that don't exist yet, and after that we can call on them without using func.
The `move_forward()` fuction in the Learn GDScript from Zero app, which was a function provided and I assume defined "behind the scenes". We used that inside of a function that we defined.
Or does every individual script need the functions to be defined first per usage in the script.50Mar. 05, 2024
Documentation helpTucanBigAs stated inside this lesson , angle and position are member variables. Where can I find all the member variables a node has? I am using this link for Vector2 but don't seem to see the member variables. [https://docs.godotengine.org/en/stable/classes/class_vector2.html#class-vector2](https://docs.godotengine.org/en/stable/classes/class_vector2.html#class-vector2)
Thank you.10Mar. 02, 2024
Missing lessons folder on LinuxRuben TeijeiroI'm following the course on Linux and it seems the lessons folder is missing. Just a minor detail but I think it's good to let you know. Great work!20Mar. 01, 2024
Why not use _physics_process?learningduckWhy use *process, which introduce variance with frame rendering speed instead of physics*_process that is executed independent of frame rendering?10Feb. 27, 2024
Rotating clockwise is positive ~ crazyMonarchcontrary to how the normal radians (pi/2) which is 90degree is anti-clock rotation of circle. so positive (pi/2) is actually rotating 90 degree in clockwise but in real math's its counterclockwise. the 2d space in this engine seems to be complete opposite. Like how positive y is downward, seems a little different.10Feb. 25, 2024
L3.P1 bug: Passed practice with no changeshermesJust as described: pressed the "run" button without touching the code at all and it let me pass. Moreover, it lists requirements on the side (when the code is being run) that I dont know about like coding player input. Furthermore, it shows the bullet sprite on screen instead of a character. Plz help10Feb. 21, 2024
Godot crashingGuz GontijoAfter enabling the plugin, everytime I try to open bullet.tscn godot will crash. Runing godot 4.2.1 on a macbook sonoma 14.3.110Feb. 20, 2024
L3.P1 I didn't do anything but I passed the test...lucky-locustI'm trying to figure out what I have to do... i'll update you in a second, I don't understand if it's a bug or i'm missing something40Feb. 19, 2024
New Script File UpdatetesfalconWhen I attached the new script to the ship, it automatically added both the ready() and the _process() functions as empty stub outs in addition to the extends line. FYI10Feb. 16, 2024
Godot claiming it's unable to load GDQuest Practices pluginretonymWhen trying to enable the GDQuest Practices plugin, getting an error:
"Unable to load addon script from path: 'res://addons/gdquest_practice_framework/gdquest_practice_framework.gd'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/gdquest_practice_framework/plugin.cfg' to prevent further errors."
ETA: also in the output window, seeing
" res://addons/gdquest_practice_framework/gdquest_practice_framework.gd:14 - Parse Error: Cannot call non-static function "get_base_control()" on the class "EditorInterface" directly. Make an instance instead."
odd because i was able to use the plugin for the 02.getting_to_know_godot project just fine... i'll keep digging into this and will post solution if found!30Feb. 16, 2024
Godot crashes everytime I try to run the bullet sceneMostujskojiIf I try to run bullet.tscn in the practices -> 01.bullet folder it crashes Godot. I've also tried clicking on L2.P1 The bullet in the GDQuest plugin and that also crashes Godot. I'm using the Godot Engine v4.2.1.stable.official20Feb. 12, 2024
Plugin no longer explains the practises?NoneApplicableGamesI'm not sure if this is by design or an oversight, but the previous version of the plugin (from learn to code from zero with godot 3) provided an explanation of the practise upon expanding the dialogue in the editor. The new version doesn't do this and I don't like the inconvenience of having to go between my browser and the godot editor. Do you think you could potentially fold the details of each exercise back into the editor plugin?10Feb. 11, 2024
Issues recreating lesson code NinjoshHello.
I tried to use the code:
extends Sprite 2D
var velocity = Vector2(480, -480)
func _process(delta: float) -> void:
position += velocity * delta
rotation = velocity.angle()
but I am unable to see the ship. It seems that when velocity = Vector2(500, 0) I am able to see the ship and the ship moves and faces right. This is correct for Vector2(500, -100) as well but the ship is not in the middle anymore moving right but starts higher up. Vector2(500, -200) has the ship almost off the screen. I am a bit confused why this is happening?
Thanks for the lessons. 20Feb. 09, 2024
Main scene explanationRuben TeijeiroShortcuts on Mac OSX are different than the ones explained in the course. Maybe mention it somehow as I ended up running the whole project instead the current scene by mistake.
BTW, tried to change the title of my question but it's not working, that's why it's kinda unrelated.10Feb. 08, 2024
Why not use a CharacterBody2D node?actual-goldfishJust wondering what the difference is because most tutorials I've seen use a characterbody2d and not a Sprite2D node.40Feb. 07, 2024
Bug? Seems the M4. To Space and Beyond (Workbook) project won't open JazzWhen I try to open the M4 workbook project, Godot seems like it's going to start, but then closes and does not open the project. There is no error message presented when this happens. This did not occur for the Godot Tour.30Feb. 05, 2024
Typo in Bullet Practice filepathTJIt says to open the file `res://practice_solutions/...`, this should probably be `res://practices/...`10Feb. 04, 2024
Complete CodeAdamsapHi there this is not a question but is a heads up. in your drop down for complete code for ship.gd. your velocity is incorrect. your line is:
var velocity := Vector2(500, 0)
shouldn't it be:
var velocity := Vector2(500, -500) if you want it to move to the top right corner? 10Feb. 03, 2024
L2:P1 Velocity valueEdwardI could only make the tests pass if I set the velocity to 500,-500.
The browser based "complete code" ship.gd file shows:
`var velocity := Vector2(500, 0)`
`But, if I use this value the test fails.`20Feb. 03, 2024
Link doesn't workGilbertTheGreatNot really a question, but there's a minor bug: the link to the _process() function does not work (i.e. the "head to the glossary page: [the process function](https://school.gdquest.com/glossary/function_process)." text). Hope this helps.20Feb. 03, 2024
Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.