Skip to content

"Your first 3D game" issues #6744

@andreymal

Description

@andreymal

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

Setting up the game area

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:65 and related screenshot img/02.player_input/04.sphere_shape.png

    The 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

  • 02.player_input.rst:70 (Fixed in #9438)

    Shrink it a bit by dragging the orange dot in the viewport.

    We should now enlarge it instead (from 0.5 to 0.8)

  • 02.player_input.rst:106 (fixed in #10807) and related screenshot img/02.player_input/07.input_map_tab.png

    Godot projects come with some predefined actions

    They are no longer visible by default, we need to click Show Built-in Actions to see them

  • 02.player_input.rst:130 (Fixed in #10807) and related screenshots

    select Manual Selection -> Joypad Axes.

    The Manual Selection tab no longer exists, everything is in one window now

  • 02.player_input.rst:151 (Fixed in #10807)

    Bind 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

  • 03.player_movement_code.rst:50 (fixed in #6763)

    The velocity is a 3D vector

    It has been renamed to target_velocity to prevent collision with the builtin velocity property (the related code snippets are correct)

  • 03.player_movement_code.rst:190

        if 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

  • 03.player_movement_code.rst:235 (fixed in #6763)

    Here is the complete Player.gd code 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.webp

    This screenshot doesn't highlight Projection: Orthogonal for some reason

Designing the mob scene

Spawning monsters

  • 05.spawning_mobs.rst:14 (fixed in #6763)

    Our 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?

  • 05.spawning_mobs.rst:97

    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

  • 05.spawning_mobs.rst:161 (fixed in #6811)

    Then, 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

Killing the player

Score and replay

Character animation

P.S. I didn't test C#

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:getting startedIssues and PRs related to the Getting Started section of the documentationbugenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions