This is EXACTLY WHAT IVE BEEN LOOKING FOR literally no one has made a tutorial like this thank you so much
@1upIndie3 жыл бұрын
Really great video on such a relevant topic. I pinned this video to my community tab so more guys can check it out. Thanks for sharing.
@SamSpadeGameDev3 жыл бұрын
Thank you! I'm a fan (and subscriber) of yours as well!
@1upIndie3 жыл бұрын
@@SamSpadeGameDev Oh nice, am I not too small to be a "fan" of? If you keep on doing this high quality content you defently will bypass me and I have to be your pupil :D
@LunarcomplexMain3 жыл бұрын
The fact that TRON is in part responsible for creating a near limitless amount of virtual worlds even to this day is crazy...
@bit-6425 Жыл бұрын
Did some slight modifications to your script but this was exactly what I was looking for, thank you so much for this
@ZBLdrawings8 ай бұрын
Great work! You're the only one that made tutorial for this!
@konjecture3 жыл бұрын
I have to say that your voice is the best robot/ai voice I have ever heard 😁.
@SamSpadeGameDev3 жыл бұрын
Thanks 😅
@indieklem2 жыл бұрын
Thanks for the tuto, very clear. I use it for my pnj movment and... it work well!
@JardsonJean3 жыл бұрын
Amazing job as always.
@krystofoxik3 жыл бұрын
Amazing!
@craigosborne38123 жыл бұрын
The seed is actually the doubled perm table, generating a different perm table gives different results
@tanura58302 жыл бұрын
with the sheep example you can just make them change direction once in a time so no need for perlin noise.
@headspin41203 жыл бұрын
Thank you again!😀
@sabriath3 жыл бұрын
Or you can use a moving average on the fed random number from the generator to perform similar analysis on-the-fly without needing to do that entire function. What I mean is: get_next(last, nval, spd) { return (spd*nval + (1-spd)*last); } last = the last value you got from running "get_next" nval = the next "random" number in the generator spd = from 0.0 to 1.0 based on how quickly you want the formula to follow the randomness....0.0 means that it will never move, while 1.0 means that it's just giving you 'nval' If you want even more smoothness to the gradient, you can run the function 2 or 3 times per step with the same 'nval' and a lower 'spd' to anneal slower to value. 'nval' specifically gives you the range, so if you want 0.0 to 1.0 range, then just make sure 'nval' is 0.0 to 1.0...and done. This is similar to a "scanline" of the perlin noise function, just faster (because it's 1d). To use higher dimensions, you just add in a new generator for each additional dimension, seeds are usually stored with the blocks of data within each field, while the field itself is done on-the-fly based on the block seed. If the values in the higher dimensions are used in a collapsed form, then you simply average the returns of all the dimensions (the video you show has x/y directional movement, so it's not a collapsed form....but....if it were trying to find the height of a block at a specific point, then it would).
@SamSpadeGameDev3 жыл бұрын
That's cool - I'll have to experiment with it!
@dugl3 жыл бұрын
Thank you
@soubakouhАй бұрын
Aleluia!!!! if anyone reads this comment.. Yes! this is your definitive video!!
@thomasrebicki88342 жыл бұрын
thanks man
@nightsout.3 жыл бұрын
This video was amazing! The sheep got me thinking of ai. I'm curious if you will make a video on obstacle avoidance? All the stuff I've found online and tried out seems kinda archaic, so I'd love to see your take on it.
@SamSpadeGameDev3 жыл бұрын
There's lots of ways to do avoidance, and I will be doing a couple versions in the upcoming months as part of the vectors and steering behaviors series. Flee and avoid will be in the next few tutorials (avoiding a single instance) and towards the end of the series I'll be doing a more general avoid all instances of a certain object type behavior.
@nightsout.3 жыл бұрын
@@SamSpadeGameDev Looking forward to it! :)
@raylolpez3 жыл бұрын
I could be wrong, but the map_value() function you use is using the formula for linear interpolation, right? So it’s sort of like GM’s built-in lerp() function, but with some added functionality, so kind of like a lerp_ext()! I think lol 🤔
@SamSpadeGameDev3 жыл бұрын
Pretty much - if you break down the steps over multiple lines, instead of doing it all in one line, it looks like this and you can even use GM built-in lerp function: total = current_upper_bound - current_lower_bound; percent = (value - current_lower_bound) / total; new_val = lerp(desired_lower_bound, desired_upper_bound, percent); return new_val; I did a written tutorial on the GMC forums awhile ago on this function itself: forum.yoyogames.com/index.php?threads/map-remap-values-from-one-range-to-another.59699/
@MisterNewYear Жыл бұрын
is there a way to use periods and octaves with this function?
@nyeponpon2 жыл бұрын
Hello Sam! I've been following your videos for a while now, you're an excellent teacher I'm trying to think how I'ld use the perlin noise for terrain generation in a 2D hexagonal map, where each hexagon has 3 coordinate values, or axis: S, Q, and R-> based on RedBlob's Cube Coordinates. I created another loop inside the other two loops, incrementing an Z_Value for the perlin_noise function, but I believe I felt in one of the traps you said- Now the terrain generation can took up to minutes, and before it was only 3 seconds at best to create the map. Is there any better way to implement it? Thanks!
@SamSpadeGameDev2 жыл бұрын
To be honest, I don't know. I've never tried to generate a 2D hexagonal map. That said, there aren't a lot of ways to speed up the original function. It's code is already pretty much as fast as GameMaker can run it. Just make sure you're running the minimum number of iterations. However, one possibility would be to test using the YYC (if you have a license or subscription) that should be a lot faster. Another possibility would be to look into alternative ways of running it. I've never done this, but I know some people run it in a shader, which would be a lot faster as it uses the GPU. There's an old post on this in the forums (link below) that talks about some of the ways to speed it up. forum.yoyogames.com/index.php?threads/pure-gml-perlin-noise-function.25534/
@LVWattsPlays3 жыл бұрын
for some reason mine keeps generating again and again whilst running :/
@SamSpadeGameDev3 жыл бұрын
I'm sorry, I'm not sure what this refers to. With a little more specifics I might be able to help?
@mikebarthold7832 жыл бұрын
too many hardcoded assumptions for my taste - there's a huge array inside the noise function... no offense, but this is not the implementation i am looking for. your map_value function assumes that the current value is always in range - you should clamp(current, current_lower, current_upper) use as base for your calculation to ensure the value is in the desired range (unless you WANT results out-of-range from this function). you could add an additional parameter at the end, something like enforce_range = true to make it use the clamp