AutoTiles OpenSimplex Noise Procedural Generation Godot 3.1 Tutorial

  Рет қаралды 37,422

Gingerageous Games

Gingerageous Games

Күн бұрын

Пікірлер
@sriram97
@sriram97 4 жыл бұрын
This is the best procedural generated map tutorial that i have found so far.
@maggot9779
@maggot9779 4 жыл бұрын
If anyone else is having trouble with the background tilemap not placing stone walls correctly, you have to make sure the subtile size is set to 48 for y.
@kshitijbaria5883
@kshitijbaria5883 4 жыл бұрын
GOD LIKE Awesome vid man i was cracking my brains at how to get the auto tiling in a procedural map Didn't know it was this easy Keep it up!
@MrSmith_
@MrSmith_ 3 жыл бұрын
13:52 Idk if someone else has answered or if you already know by now since this video is 2 years old, but you're exactly right in that it's the frequency per tiles. The denominator value is the ceiling and the numerator is the frequency. Example, 1 out of 4 tiles will be chosen.
@gingerageousgames613
@gingerageousgames613 3 жыл бұрын
Thanks. I always appreciate a helpful comment even if I was fairly certain I was right.
@nuvod4770
@nuvod4770 4 жыл бұрын
14:33 Actually, `and` is short-circuit: if left operand is false - right will not be calculated, so you can do comparison on one line
@ryanbuizon58
@ryanbuizon58 2 жыл бұрын
This tutorial is literally the best. The Simplex noise would look great for spawning something like islands!
@gingerageousgames613
@gingerageousgames613 2 жыл бұрын
Thanks. It is nice comments like this that make me think I really need to make some more videos since my short break kind of turned into a year.
@knightfury7120
@knightfury7120 Жыл бұрын
This tutorial was amazing🖤
@robertoaguiar6230
@robertoaguiar6230 4 жыл бұрын
Thanks, mate, I'll try it tomorrow in godot 3.2 if I make it I'll let you know
@tofudeliverygt86
@tofudeliverygt86 2 жыл бұрын
Exactly what I was looking for, thanks!
@vishu6787
@vishu6787 5 жыл бұрын
I have never seen such use of tile map, looking forward to see new things on this channel, I am trying to come up with a 3d terrain generation for my car game which use perlin noise I'll be great if you can help me go forward.
@sirbranson5254
@sirbranson5254 4 жыл бұрын
hey im also trying to go the same thing for my 3d fantasy game, have you made much progress? can you share?
@CoderJK
@CoderJK 2 жыл бұрын
This is just what I was looking for! The command to update the bit mask was the missing piece for me! I guess I have no excuse but to make something incredible now. 😊
@archiebaldry
@archiebaldry 4 жыл бұрын
great tutorial, man. good job.
@NeZversSounds
@NeZversSounds 5 жыл бұрын
Procedural proceduralization.
@judelingan5863
@judelingan5863 3 жыл бұрын
This tutorial is amazing!
@Syeno
@Syeno 5 жыл бұрын
So i understand how to make auto tiles for edges and all that, but is there a way to make auto tiling mountains walls? Making mountains is so tedious with this texture pack. A clever work around would save me so much time.
@gingerageousgames613
@gingerageousgames613 5 жыл бұрын
Are you talking about the stone walls that go down in the holes? I actually did auto tile them. Use 3x3 minimal. Then I only used the middle 3 bits to see if it had neighbors to the left or right.
@jaymhlurbaloyi7813
@jaymhlurbaloyi7813 3 жыл бұрын
@@gingerageousgames613 bro can you post it on GitHub Or paste just that part as a comment I can't figure it out.
@masterroyale0376
@masterroyale0376 4 жыл бұрын
Great Work! :D
@ebregains
@ebregains 3 жыл бұрын
I think it would be better if you nest all three functions on a two dimensional loop with the noise value and pass it as an argument. You will avoid iterating through the tilemap 3 times and obtaining that noise value 3 times too. Something like: func _ready(): # ... var noise_value for x in map_size.x: for y in map_size.y: noise_value = noise.get_noise_2d(x,y) check_for_grass(x, y, noise_value) check_for_road(x, y, noise_value) check_for_enviroment(x, y, noise_value) make_background() #... You can even nest this on a new function called generate_world() and just call it in the _ready() function. Anyway, I completely understand that this is an educational video and what I prouposed is maybe harder to read and understand. Thanks for sharing this tutorial, it was really clear!
@gingerageousgames613
@gingerageousgames613 3 жыл бұрын
I agree. But I also appreciate well thought out and clear suggestions. It would be silly for people to think I really knew what I was doing. I have learned a lot from comments like this.
@robertoaguiar6230
@robertoaguiar6230 4 жыл бұрын
Hey, man, I'm looping this error and nothing happens. "ERROR: tile_get_tile_mode: Condition "!tile_map.has(p_id)" is true. Returned: SINGLE_TILE At: scene/resources/tile_set.cpp:480"
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
So what he error is saying is it can not find the tile_id that you are trying to set. So making a fair amount of assumptions on my part I would guess that on line 47 you have set the environment to a number that doesn't exist in your tileset. Check that tileset and make sure you have 4 single tiles or your random num reflects how many tile types you have. Also if you went back and deleted any tiles in the tileset it can make gaps. To check if this is right. Use a number you know is in the tilemap instead the randi num in line 47 to set the cell. That is my first guess.
@Garfield91076
@Garfield91076 4 жыл бұрын
Thanks for all the help in your tuts! I just have one question for some reason my tiles are getting lines between them when they are rendered. I have to zoom way out to not see these weird lines. Know anyway to fix that? I could provide a picture of it if that would help.
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
Are the lines spaces or sprite? If they are spaces check you tile size. If they are part of a sprite check you texture region. Otherwise you could try pixel snap.
@Garfield91076
@Garfield91076 4 жыл бұрын
@@gingerageousgames613 Hey thanks for the quick reply! Turns out the lines were just appearing in the editor because I was zoomed in or out and it would make the tiles look blurry and put some weird artifact looking lines in between each tile. Then in the game when I would run it my window settings were weird i guess and messed around with those to fix it. It was creating different a kind of artifacting there. Also like another guy mentioned I'd super appreciate getting the source code if youre ok with giving that out. Having fun with godot but seems like a lot of people dont offer links to their code in tutorial videos. Thanks again
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
@@Garfield91076 Well if it means anything most if not all my videos the code is all given in the videos. Nothing is hidden. I just find git tedious and sometimes I am lazy. But I will do this project when I get to my computer. Lol.
@Garfield91076
@Garfield91076 4 жыл бұрын
@@gingerageousgames613 Haha thanks much appreciated!
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
github.com/gingerageous/OpenSimplexNoiseTilemapTutorial
@swippy5071
@swippy5071 Жыл бұрын
how could you make the environment decorations spawn in the same place when you use the same seed
@hector_dgz94
@hector_dgz94 4 жыл бұрын
great video, thanks a lot
@MarkJrLuat
@MarkJrLuat 3 жыл бұрын
How do you make a like a small patch of different grass tiles
@roadtopro-rtp695
@roadtopro-rtp695 4 жыл бұрын
Question: How do you figure out the size of your map???
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
I just used trial and error. Make it big enough to cover the screen then adjust the noise parameters (period etc.) till it looks nice.
@fouzi6084
@fouzi6084 2 жыл бұрын
how to do a minimap with procedural generated worlds ?
@dandymcgee
@dandymcgee 2 жыл бұрын
How would you let the player move around in the world? Would you run all of this code every frame after sampling the noise function?
@gingerageousgames613
@gingerageousgames613 2 жыл бұрын
No. You would run this code once at the start of the scene. If you wanted a new map then you could re run the code.
@samuelhugo3387
@samuelhugo3387 Жыл бұрын
If you can make a tutorial on how to place interactable objects like haravstable plants or openable chests randomly in the correct places on top if this map that would be great obviously you don't want trees to spawn on the roads also if youwant random buildings to spawn you might want a certain amount of distance between them minimum and also a rarity to determine odds of it spawing these are essential things to know for developing proceedural games so I am sure the comunity will love a video on it
@MrLuizhausen
@MrLuizhausen Жыл бұрын
Look at Godot4s new TileMap features. It has the option to define Scenes as tiles! It is still in beta, but it works rly well.
@arcticblitz9630
@arcticblitz9630 3 жыл бұрын
My generation seems to stop at the edge of the screen and when I added a player, I figured out that no matter what, the generation doesn't go any further. Any idea how I can make the generation infinite
@rogerlopez6582
@rogerlopez6582 Жыл бұрын
Maybe increase map_size var?
@djtatertot1361
@djtatertot1361 4 жыл бұрын
What are the cap variables used for?
@roadtopro-rtp695
@roadtopro-rtp695 4 жыл бұрын
Question: how do I make it so I can fall if i collide with the empty map
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
Give a collision shape to the hole tileset. Then use the body or area entered signal (depending on what your player is) to trigger a falling animation which will probably be mostly scaling down the size of your character and setting it to a dead state as to stop the player from being able to move any more. Edit: It might be easier to trigger the animations with an area on the player that detects the hole collision shape.
@roadtopro-rtp695
@roadtopro-rtp695 4 жыл бұрын
@@gingerageousgames613 thank you so much
@abdellatifdev
@abdellatifdev 3 жыл бұрын
Good video but you probably could use map_size instead of Vector2(map_size.x, map_size.y) because map_size is a vector2 itself
@gingerageousgames613
@gingerageousgames613 3 жыл бұрын
Close. But the map_size variable finds the size of used tiles in a tilemap. This is procedurally created meaning the tilemap is empty and it is generated at runtime. So we have to define the size of the map we want. After it is generated then map_size would work but I would hope it is the same as the original variable I created.
@abdellatifdev
@abdellatifdev 3 жыл бұрын
@@gingerageousgames613 my point is map_size is a const during the run time so it gonna give the same effect but i think writing map_size directly will make syntax cleaner , could save few seconds of creating new vector each time in the for loop
@PikCelAlien
@PikCelAlien 4 жыл бұрын
Can you make video about infinite tilemap generation?. I can type infinite terrain script. But i don't know how to remove tiles when player moving. I use clear() but it removes all tiles
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
I will put it on the list. To get you started to delete a tile is the same as placing except the tile number is -1. set_cellv(Vector2(3, 0), -1)
@tiradentesmonotrundle7841
@tiradentesmonotrundle7841 4 жыл бұрын
Nightmare, can you make this script available somewhere? I can't find a good tutorial of infinite terrain in any video
@ShawnMcCourtB
@ShawnMcCourtB 3 жыл бұрын
@@gingerageousgames613 I'm curious about this as well. I can't find a good tutorial to make this scale infinitely. Any advice?
@gingerageousgames613
@gingerageousgames613 3 жыл бұрын
@@ShawnMcCourtB This video gets you 90% there. When the player moves you would track to see if you need more tiles. The reference the noise texture like in this video. Usually you would do chunks of 10 or so tiles so do have to run the code as often. Then when you add more you just delete the same amount from the other direction. I can add it to the list of tutorials to do but it will be awhile.
@ShawnMcCourtB
@ShawnMcCourtB 3 жыл бұрын
subbed for the quick response! would I scale the map size down to 10? Or create a separate function that looks for player position and then looks if it needs to generate more tiles if in a certain range? Would I call quadrant size perhaps?
@devinkrike5968
@devinkrike5968 4 жыл бұрын
Isn't calling for loops in each function detrimental? why not just draw all layers in 1 for x,y loop?
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
Your probably right. It doesn't run every frame so I didn't really worry about optimization.
@huahuapro
@huahuapro 4 жыл бұрын
hi, can you share the code? or the project ? thanks!
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
Yeah I have been lazy with GitHub. I will try to get that done for you this week.
@huahuapro
@huahuapro 4 жыл бұрын
@@gingerageousgames613 thank you!
@gingerageousgames613
@gingerageousgames613 4 жыл бұрын
github.com/gingerageous/OpenSimplexNoiseTilemapTutorial
PROCEDURAL Terrain Generation (with Unloading) in Godot!
18:33
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 50 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 2,7 МЛН
How to turn a few Numbers into Worlds (Fractal Perlin Noise)
15:24
The Taylor Series
Рет қаралды 197 М.
I recreated Balatro's effects in Godot
8:04
MrElipteach
Рет қаралды 46 М.
Procedural Generation in Godot 4
18:45
sloth in a hat
Рет қаралды 67 М.
How to Add Interaction in Godot 4
16:48
Nagi
Рет қаралды 25 М.
Cellular Automata | Procedural Generation | Game Development Tutorial
15:22
Why Solo Developers Should Use Unreal
9:51
Thomas Brush
Рет қаралды 451 М.
Binding of Isaac: Room Generation Explained!
7:04
Himsl Games
Рет қаралды 63 М.
Using Composition to Make More Scalable Games in Godot
10:13
Firebelley Games
Рет қаралды 251 М.
I Made a Wave Function Collapse Castle Generator in Godot
25:30
RachelfTech
Рет қаралды 74 М.
How to use Perlin Noise in Godot | Game Dev Tutorial 9
7:20
Dave the Dev
Рет қаралды 13 М.