Looks like you're not logged in

Login or Register to continue

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.

  • Godot 3 .tres file incompatible with Godot 4gardenvegetableFYI for those trying to follow along with this Godot 3 course in Godot 4: from what I can tell, .tres files created in Godot 3 don't load in Godot 4 as the file syntax has changed so the two are incompatible. This means the isometric tiles cannot be loaded. I got around this by recreating the tiles: - Create a TileSet, with x: 100px and y: 50px as the tutorial says - Import the "tileset.svg" file as the texture - In the Tileset Setup tab, in this case set margins to x: 10px, y: 10px, and set the separators to x: 10px, y: 5px to make the cells align with the images. - Then you can create multi-cell tiles. In Setup, highlight one cell, then go to Select, click that cell and drag the red handles that appear to cover the adjacent cell. Then go to the TileMap tab, select Paint icon and draw. As far as I can tell, the multi-cell tile ignores the separator between the cells. Did I miss an easier way? It would be great if Godot 4-compatible .tres files could be made available for this course. It's one thing to navigate the more obvious 3.x vs. 4.x changes such as node and property differences - KinematicBody2D becomes CharacterBody2D etc - but the TileMap system is completely different and this took me a long time. (I'm someone new-ish to Godot who has gone through a load of tutorials in 4.0 and now needs something more advanced, but I haven't used Godot 3 so can't compare the two easily.) 2 0 Oct. 03, 2023
  • isometric(ish) movementLailoken42So I found that the movement for the player was not accurate in that you vertically traverse a section twice as fast as you horizontally traverse one. I fixed this by dividing y by 2 after normalizing instead of multiplying x by 2 before normalizing. ```gdscript extends KinematicBody2D export var movement_speed := 200.0 func _physics_process(_delta: float) -> void:   var direction := _get_direction()   direction.y = direction.y / 2   move_and_slide(direction * movement_speed) func _get_direction() -> Vector2:   return Vector2(   (Input.get_action_strength("right") - Input.get_action_strength("left")),   Input.get_action_strength("down") - Input.get_action_strength("up") ).normalized() ``` 1 0 Mar. 24, 2023
  • For Godot 4 usersJJIt seems that when you try to create the map using the TileMap, it will all be offset from the grid, like half a square offset. I found a solution for this and it was related to the texture origin for each tile in the TileSet. In this image it was like this, being the blue square the one that will adjust to the grid, that's why it was off even in the map scene. Moving the texture origin Y coord to -25px solved the issue. This needs to be done for the other tiles too. And lastly, for the invisible barrier, by default it won't have the collision added for this course, so you will need to add it manually again. I found the solution following [this official Godot tutorial about TileSets](https://docs.godotengine.org/en/stable/tutorials/2d/using%5Ftilesets.html#adding-collision-navigation-and-occlusion-to-the-tileset) 0 0 Mar. 19, 2023
  • There should be collision in the third tileset? Godot 4JJIn the tutorial images, this image is shown But what I see in my tilesets is this Am I doing something wrong or could be something related to use Godot 4? Do you know how can I achieve the same effect? How can I add collision to a sprite? 1 0 Mar. 16, 2023
  • Godot 4 and hiding the block wallsJJI'm trying to do this project in Godot 4 and I'm having an issue with the part of hiding the block walls (the purple ones) with the Simulation script. The error is this one ```gdscript E 0:00:00:0685   Simulation.gd:17 @ _ready(): Index p_layer = 1 is out of bounds ((int)layers.size() = 1). <C++ Source>   scene/2d/tile_map.cpp:3817 @ get_used_cells_by_id() <Stack Trace>  Simulation.gd:17 @ _ready() ``` And I have the exact same script that is suggested. It seems that it can't find the different layers for tiles. I must say that YSort doesn't exist anymore so I used a simple Node2D instead with YSort enabled, and added the Ysort enabled also to the GroundTitles layer 0 and ordering part. If the IDs of the script corresponds to the ones on the TileMap, they are the same also, ID 0 for blue, ID 1 for purple and ID 2 invisible. Can you say what it's wrong with this info? I have the project uploaded to a Gitlab and created a specific tag for this point in time https://gitlab.com/godotjj/tutorial-simulation-game/-/tags/v0.1 2 0 Mar. 15, 2023
  • Player movement right/leftCavasIn func _get_direction() we double the input for left/right, because the cells are twice as long as the up/down cells. So far, so good. But if I change the value "\* 2.0" to let's say "\* 7.0" , nothing changes in the movement speed in direction left/right. Is this correct? ```gdscript export var movement_speed := 200.0 func _physics_process(delta: float) -> void:     var direction := _get_direction()     move_and_slide(direction * movement_speed) func _get_direction() -> Vector2:     return Vector2(         Input.get_axis("left", "right") * 2.0,         Input.get_axis("up", "down")         ).normalized() ``` 2 0 Nov. 16, 2022
  • get_axis() since Godot 3.4parapixelI guess since Godot 3.4 the new get_axis() function can be used? ```gdscript # in /Entities/Player/Player.gd ## Returns a normalized direction vector based on the current input actions that are pressed. func _get_direction() -> Vector2:     return Vector2(         # As we're using an isometric view, with a 2:1 ratio, we have to double the horizontal input for horizontal movement to feel consistent.         Input.get_axis("left", "right") * 2.0,         Input.get_axis("up", "down")     # We then normalize the vector to ensure it has a length of 1, making it a direction vector.     ).normalized() ``` 1 0 Apr. 09, 2022
  • Why don't we use the delta variable ?GrominetWhy don't we use the delta variable in the Player's _physics_process function ? I thought the variable was meant to make the game more fluid in case some physic frames were lagging. ```gdscript move_and_slide(direction * movement_speed * delta) ``` 3 0 Dec. 07, 2021
  • Mind the gapjustincHere is a screenshot with what hopefully is an easy way to understand what you need to do for the upper 2 edges of the ground. Basically, the blue "floor" tiles should not touch any of the purple ones for the upper 2 edges of the purple box. Below, there are 3 blue boxes which need to be removed, and which you can do so via using the right mouse button to remove tiles when the "GroundTiles" node is selected: 1 0 Nov. 19, 2021
  • Why do you use x := y instead of x = ySir_ConneryWhy is that you would use := instead of = . Haven't seen this used in anyone else's projects. 3 0 May. 26, 2021
  • Script File LocationsmodelarI'm almost done with the first third of the simulation series and I already learned a lot. One improvement to this excellent series I'd like to see is a more detailed instruction as to where script files or files in general should be stored. You do provide an introduction in the project overview, but at times i am still unsure where to save certain files. Right now I look it up in the finished course files in the zip or on github but I'd prefer short hints in the text. 1 0 Apr. 27, 2021
  • Odd diagonal movement? jmccloskey108When going diagonally across world tiles (i.e. the pure X and Y directions) it seems I go way faster in the pure Y-axis than in the pure X-axis. Is this just an unavoidable artifact of isometric views? 1 0 Feb. 25, 2021
  • Notes from 0.7.1BleedingEdgeThe text refers to a tile map node "Ground", but in the downloaded examples, it was named "Floor"., It took me a moment to figure out the "gap" between the blue floor and the pink barrier. Heads up: you actually create what, if viewed top-down, would be a gap you would fall through, but because of the collision barriers and isometric display, the Player can't reach the gap. I think the screen shot of the Scene tree in the "Putting The Player In The World" section is wrong, I believe it needs to be nested under the YSort node; as shown, it is a sibling of YSort. 0 0 Feb. 13, 2021
Site is in BETA!found a bug?