-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
There's a bunch of weird things I ran into while trying to follow the "Squash the Creeps" tutorial in Godot 4. I'm not a Godot expert and don't know how to fix some of these things, so I don't want to make a pull request, but I hope this list can help other contributors improve the documentation.
Common
The screenshots are inconsistent:
- some taken in Godot 3, some in Godot 4
- some use names in PascalCase, some in snake_case
- some nodes have the "3D" suffix (Godot 4), some don't (Godot 3), some have the lowercase "3d" suffix (beta1?)
- some screenshots are in PNG format, some are JPG, some are WebP (and I think WebP is worse than PNG), and they vary in quality and UI scale
Perhaps it would be a good idea to recreate all the screenshots after the first release candidate?
Your first 3D game
-
(fixed in #6763)index.rst:34
This link (https://github.com/GDQuest/godot-3d-dodge-the-creeps) redirects to https://github.com/godotengine/godot-3d-dodge-the-creeps — I think it would be nice to fix this unnecessary redirect.
I also found this link in three other places:
Setting up the game area
-
(fixed in #6763)01.game_setup.rst:42click the Add Node button represented by a "+" icon
This button is actually "Add Child Node" even when there are no nodes in the scene
-
(fixed in #6876)01.game_setup.rst:43Name the node
Main.It seems this page doesn't explain how to rename nodes. Mentioning
RMB>RenameorF2would be good -
(fixed in #7370)01.game_setup.rst:48Save the scene as
Main.tscnGodot 4 suggests to name it
main.tscninstead. If I understand correctly, Godot 4 uses snake_case by default after Add project setting to change scene file casing godot#52597Same with other scenes (
MusicPlayer.tscn→music_player.tscnetc.)Note that if you decide to rename the scenes in this tutorial, you will have to rewrite all the text and recreate all the screenshots, because these names are visible almost everywhere.
-
(fixed in #6763)01.game_setup.rst:67Create a new Box Shape3D.
Unnecessary space: Box Shape3D → BoxShape3D
-
(fixed in #6763)01.game_setup.rst:89create a `BoxMesh <class_BoxMesh>` resourceBroken rst link?
-
(fixed in #6763)img/01.game_setup/13.move_gizmo_y_axis.pngThe
MeshInstance3Dis not rendered on this screenshot, which may confuse some users -
(fixed in #6763)01.game_setup.rst:131and01.game_setup.rst:135add a child node
DirectionalLight
We need to move and rotate theDirectionalLightnode.Renamed to
DirectionalLight3D
By the way: unlike Godot 3, the ground is not white in Godot 4. Can we tweak something to make the lighting identical to Godot 3?
Player scene and input actions
-
02.player_input.rst:65and related screenshotimg/02.player_input/04.sphere_shape.pngThe sphere's wireframe appears below the character.
It doesn't appear in Godot 4 because it's too small by default and fits completely inside the model. I have to set the radius to 0.75 to see the wireframe
-
(Fixed in #9438)02.player_input.rst:70Shrink it a bit by dragging the orange dot in the viewport.
We should now enlarge it instead (from
0.5to0.8) -
(fixed in #10807) and related screenshot02.player_input.rst:106img/02.player_input/07.input_map_tab.pngGodot projects come with some predefined actions
They are no longer visible by default, we need to click Show Built-in Actions to see them
-
(Fixed in #10807) and related screenshots02.player_input.rst:130select Manual Selection -> Joypad Axes.
The Manual Selection tab no longer exists, everything is in one window now
-
(Fixed in #10807)02.player_input.rst:151Bind the Space key and the gamepad's A button.
It's not obvious what is "the gamepad's A button", all gamepads are different. Maybe just mention "Joypad Button 0" instead?
Moving the player with code
-
(fixed in #6763)03.player_movement_code.rst:50The
velocityis a 3D vectorIt has been renamed to
target_velocityto prevent collision with the builtinvelocityproperty (the related code snippets are correct) -
03.player_movement_code.rst:190if not is_on_floor(): # If in the air, fall towards the floor. Literally gravity target_velocity.y = target_velocity.y - (fall_acceleration * delta)
This line is rendered with incorrect indentation because the rst source mixes tabs and spaces
-
(fixed in #6763)03.player_movement_code.rst:235Here is the complete
Player.gdcode for reference.- Inconsistent comment: "while in the air" / "when in the air"
- Incorrect 5-space indentation, starting from
if direction != Vector3.ZERO:
-
img/03.player_movement_code/13.camera3d_values.webpThis screenshot doesn't highlight Projection: Orthogonal for some reason
Designing the mob scene
-
(fixed in #6763)04.mob_scene.rst:116func _physics_process(_delta): move_and_slide()
Incorrect 5-space indentation
-
(fixed in #6763)04.mob_scene.rst:153Below,
rand_range()outputs a random valueRenamed to
randf_range() -
(fixed in #6763)04.mob_scene.rst:251Here is the complete
Mob.gdscript for reference.Again, incorrect 5-space indentation
Spawning monsters
-
(fixed in #6763)05.spawning_mobs.rst:14Our game has a default window size of
1024x600.I see
1152x648, I don't know why. Is this the new default value in Godot 4? -
We can update all four cylinders at once. Select all the mesh instances in the Scene dock.
This step is not needed because all cylinders share the same MeshInstance3D. Simply select any mesh instance
-
(fixed in #6811)05.spawning_mobs.rst:161Then, as we're going to spawn the monsters procedurally, we want to randomize numbers every time we play the game. If we don't do that, the monsters will always spawn following the same sequence.
It seems it's not needed, see Call randomize() automatically godot#43330
Jumping and squashing monsters
-
(Fixed)06.jump_and_squash.rst:239With this code, if no collisions occurred on a given frame, the loop won't run.
Again, incorrect 5-space indentation
-
(fixed in #6763)06.jump_and_squash.rst:291collision.get_collider(index).is_in_group("mob")Typo,
indexis not needed here
Killing the player
-
(fixed in #6763)07.killing_player.rst:109var player_position = $Player.transform.originRenamed to
$Player.position, see05.spawning_mobs.rst:253 -
(fixed in #6763)07.killing_player.rst:272Incorrect 3-space indentation after
func squash(): -
(fixed in #6763)07.killing_player.rst:324The
extends CharacterBody3Dline fromPlayer.gdis not visible in html. I'm not a rst expert, but I guess there is a missing empty line before this line -
(fixed in #6763)07.killing_player.rst:332Missing comment
# Vertical impulse applied to the character upon jumping in meters per second. -
07.killing_player.rst:346and related linesdirection.x = direction.x + 103.player_movement_code.rst:72suggests to usedirection.x += 1instead (same withz) -
(fixed in #6763)07.killing_player.rst:359$Pivot.look_at(position + direction,Vector3.UP)Missing space before
Vector3.UP -
(fixed in #6763)07.killing_player.rst:366if not is_on_floor(): # If in the air, fall towards the floorMissing
Literally gravitycomment, see03.player_movement_code.rst:189 -
func _on_mob_detector_body_entered(body):Line 12 (UNUSED_PARAMETER): The parameter 'body' is never used in the function '_on_mob_detector_body_entered'. If this is intended, prefix it with an underscore: '_body'
Score and replay
-
(fixed in #6763)08.score_and_replay.rst:68and08.score_and_replay.rst:76There, you will see an empty Font Data field.
drag theMontserrat-Medium.ttffile we included in the project onto the Font Data.Font Data has been renamed to Base Font (the related screenshots are correct)
-
(fixed in #6763 and #6807)08.score_and_replay.rst:79Set the Settings -> Size to
22pixelsIt has been renamed to Default Font Size (the related screenshot is correct)
-
(fixed in #6807)08.score_and_replay.rst:129Again, incorrect 5-space indentation
-
(fixed in #7370)08.score_and_replay.rst:176If you get an error when you squash a mob check your capital letters in the signal "_on_Mob_squashed"
Is this note still relevant? The only important thing is that
Main.gdandScoreLabel.gdmust use the same name. I tried renaming it to_dfg3f85f4fgbdfgand it works just fine. -
(fixed in #6763 and #6807)08.score_and_replay.rst:203and related lines and screenshotsyou can use the Layout menu in the toolbar.
It has been renamed to Anchor preset, the related screenshots need to be updated
-
(fixed in #6807)13.retry_color_picker.pngThis screenshot is outdated, the hex value has been changed from
78000000(ARGB) to00000078(RGBA) -
(fixed in #6763)08.score_and_replay.rst:270func _on_Player_hit():Renamed to
_on_player_hit, see07.killing_player.rst:134
Character animation
-
(Fixed in #8282) and related screenshots09.adding_animations.rst:96Move the translation key to
0.2secondsAll the related screenshots show
0.3instead, which is incorrect -
(fixed in #7890 and #10829)09.adding_animations.rst:185If the creature is a little too close to the floor, you can move the
Pivotup to offset it.Not really. When I move
Pivotup, the player model starts looking at the ground becausePivotis rotated with$Pivot.look_at(position + direction, Vector3.UP). This will be fixed below by changing$Pivot.rotation.x, but at this point in the tutorial, movingPivotgives strange results. -
(fixed in #6763)09.adding_animations.rst:208$AnimationPlayer.playback_speed = 4It has been renamed to
speed_scalerecently: MakeAnimatedSprite's playback API consistent withAnimationPlayergodot#71907 -
(Fixed in Several improvements to "First 3D Game" tutorial #8955)09.adding_animations.rst:261Next, click on Animation > Copy.
This menu doesn't exist in Godot 4. It seems we should use Animtion > Manage Animations, but I'm not sure.
-
(Fixed in Several improvements to "First 3D Game" tutorial #8955)09.adding_animations.rst:262That's it; all monsters will now play the float animation.
We also need to enable autoplay, which is disabled by default
-
(fixed in #6763)09.adding_animations.rst:274$AnimationPlayer.playback_speed = random_speed / min_speedAgain, renamed to
speed_scale -
(fixed in #6763)09.adding_animations.rst:296Again, the
extends CharacterBody3Dis not visible in html. In general, all these reference scripts also have the previously mentioned issues
P.S. I didn't test C#