How to Make Minesweeper In Godot | Beginner Tutorial

  Рет қаралды 8,625

Coding With Russ

Coding With Russ

Күн бұрын

Пікірлер: 36
@kshawn2579
@kshawn2579 Жыл бұрын
Thanks Russ! You are so underrated. From Pygame to Ursina to Godot. What a Legend!
@NagaGaming76
@NagaGaming76 8 ай бұрын
Thank you soo much for making this! I've always wanting to do a more "challenging" project to start out with but all other tutorials were all outdated. Not only was this tutorial very insightful, it also provided a smooth lesson into each of godot's mechanics. Good job!
@uh7123zz1azxcv
@uh7123zz1azxcv Жыл бұрын
Thanks! Glad you're returning to the code along style I know it's much more demanding in terms of time and effort, much appreciated Russ Thanks again for the nice tutorial
@cccornel5965
@cccornel5965 Жыл бұрын
Awesome tutorial to learn how to use arrays
@CodingWithRuss
@CodingWithRuss Жыл бұрын
Thanks!
@evelynchew2523
@evelynchew2523 8 ай бұрын
Thanks again! Learned something new from this tutorial.
@CodingWithRuss
@CodingWithRuss 8 ай бұрын
Glad to hear it!
@thehogman.
@thehogman. Жыл бұрын
Thanks for all the tutorials. If I could, I'd recommend solitaire next. Thanks again!
@CodingWithRuss
@CodingWithRuss Жыл бұрын
For some reason I hadn't considered card games, that could be an interesting one to work on!
@nulloWorld
@nulloWorld 6 ай бұрын
This was very helpful, because I am new to Godot. That being said future viewers of this project should bear in mind that this tutorial is somewhat buggy. It is possible to get negative flags, the hover layer should disappear on game end and the left right mine sweep thing allows you to open surrounding cells even if flag count is greater than the number cell's number, it should not let you do this. Also the way that a mine is repositioned after the first click will result in mines being located in the top left corner at a higher rate than expected. But I did learn a lot about how Godot works so thanks :D
@ghb323
@ghb323 11 ай бұрын
50:17 the flood fill algorithm. Get adjicent cells that meets a condition
@sergeiseniuto627
@sergeiseniuto627 7 ай бұрын
Awesome!!!! Love your lessons!!!
@CodingWithRuss
@CodingWithRuss 7 ай бұрын
Thanks!
@Me_Bole_Briga
@Me_Bole_Briga 4 ай бұрын
Do the new tilemap layers change the tutorial too much?
@danidiodo
@danidiodo 8 ай бұрын
Learning a lot with this tutorial. Short doubt: is there any Tilemap method that returns what item from your tileset you're clicking on? ie: a function that returns the original tileset position that corresponds to a given tile you click on. I'm just trying with get_cell_tile_data(number_layer, map_pos) to get the Number i'm clicking on but no success so far. Many thanks!
@SEOmaster_real
@SEOmaster_real Жыл бұрын
cool< want more video!
@CodingWithRuss
@CodingWithRuss Жыл бұрын
Working on it :)
@dovos8572
@dovos8572 8 ай бұрын
at 17:30 you are using 2 for loops to iterate over the tilemap to search for the mines. why aren't you just using the mines array that you created before in the mines layer? that would mean you only need one for loop and a simple check if it is at the border. then just add +1 around the mine cell. after each mine cell is looped through the surrounding cells should be set correctly. to do the +1 you just need to add +1 to the atlas x coordinate. this should simplify that part of the code quite a bit. also i don't know if you change that later in the video, so this comment might not be as relevant. now at 25:50 i'm really confused what you are doing. it seems that you are doing the inverse of what i thought should be done with the first part of my comment. why are you searching the 8 cells around an empty cell and hope that a bomb is in it? using that exact function on the bomb would give you all cells that need to increment it's shown number. you don't need to go through all empty cells of the tilemap and count the surrounding bombs that COULD be there.
@dovos8572
@dovos8572 8 ай бұрын
for those interested, this is what i thought it would be. @export var Columns : int = 16 @export var Rows : int = 16 @export var MineCount : int = 10 @export var Mine_positions : Array[Vector2i] enum Layers {Background, Mines, Numbers, Gras, Pointer} func create_mines(): var mine_texture = Vector2i(5,1) for i in range(MineCount): var mine_pos : Vector2i = Vector2i(randi_range(0, Columns-1), randi_range(0, Rows-1)) while Mine_positions.has(mine_pos): mine_pos = Vector2i(randi_range(0, Columns-1), randi_range(0, Rows-1)) Mine_positions.append(mine_pos) set_cell(Layers.Mines, mine_pos, 0, mine_texture) func create_numbers(): var target_cell : Vector2i for mine_pos in Mine_positions: for x in range(3): for y in range(3): target_cell = mine_pos + Vector2i(x - 1, y - 1) if target_cell != mine_pos and !Mine_positions.has(target_cell) : if (target_cell.x >= 0 and target_cell.x = 0 and target_cell.y
@qingxian3870
@qingxian3870 8 ай бұрын
thank you bro, im learning alot from this video. I followed the video step by step and finished it ! And i actually learned a lot ,now i know how to use array and loop And i think we no need a move_mine() function. If first click is not empty cell, we can while a new_game() function until a cell is empty 🤔
@MultiLeandrini
@MultiLeandrini 11 ай бұрын
If mines and numbers are never placed on top of each other couldn't we put them in the same layer?
@hanazosimp
@hanazosimp Жыл бұрын
can u make playlist for the basic pygame functions pls, it will help me learn alot better
@rezashir3873
@rezashir3873 Жыл бұрын
you are amazing🙃😊
@CodingWithRuss
@CodingWithRuss Жыл бұрын
😀
@mmjuuno
@mmjuuno Жыл бұрын
hey russ, my pygame window suddenly started to take a while to load, do you know what might be the cause?
@furrydoggolol
@furrydoggolol Жыл бұрын
i paused at 48:18 and accidentally completed a minesweeper lol
@tungbeso4751
@tungbeso4751 Жыл бұрын
I hope you make a game match 3
@PythonDataAnalytics
@PythonDataAnalytics Жыл бұрын
what language do you use in godot?
@CodingWithRuss
@CodingWithRuss Жыл бұрын
It's GD Script, Godot's own language. It's very similar to python
@kshawn2579
@kshawn2579 Жыл бұрын
and js@@CodingWithRuss
@MrYellow12
@MrYellow12 Жыл бұрын
​​​@@CodingWithRussI'm learning python but Pygame is quite limited, if I learn python and then switch to Godot would it be possible to use Python the way it's used on Pygame, the same way in Godot?
@CodingWithRuss
@CodingWithRuss Жыл бұрын
@@MrYellow12 Godot uses its own language GDScript but it is very similar to python so switching from pygame to godot will be easier if you are already learning python. There will still be a lot to learn in the godot engine itself as it is quite different to using pygame
@MrYellow12
@MrYellow12 Жыл бұрын
Should I keep learning python or just switch to Godot straight away?@@CodingWithRuss
@luckyheropro
@luckyheropro 6 ай бұрын
I watched yours and CyberPotatos Godot 4 Tutorial. No comparison. His tut was faulty and unelegant. Big probs!
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
I made a game using Godot for the first time
7:35
shawcat
Рет қаралды 1,4 МЛН
How to make a Video Game - Godot Beginner Tutorial
1:17:12
Brackeys
Рет қаралды 2,7 МЛН
Making a 3D Minesweeper Game 💥
5:52
tutmo
Рет қаралды 6 М.
Lost in Forest part 1
12:56
just make a game
Рет қаралды 210
Winning My First Ever Game Jam? | Godot Devlog
10:25
mz_eth
Рет қаралды 333 М.
Coding Challenge #71: Minesweeper
53:46
The Coding Train
Рет қаралды 532 М.
How Games Make VFX (Demonstrated in Godot 4)
5:46
PlayWithFurcifer
Рет қаралды 372 М.
Get This DIALOGUE System For Your Godot GAME Now
42:50
DeveloperEzra
Рет қаралды 34 М.