I'm loving this series, and I love how you teach the material. My favorite part is where you show how changing the weight of the steering forces results is some very intelligent appearing AI. Your content is so clear and easy to understand. Thank you for the tutorial and I can't wait for the next video!
Hello :) Just wanted to take a second to tell you I appreciate this channel and the immense amount of work you do to make it happen! I confess I've only seen a couple videos as time is ehh lately, but I plan to! There's not enough quality GMS content out there, especially about topics like this that use good old fashioned code structures. Also, this channel has far too few views! :O
Really good dude. Well presented and explained. Doubtless if you did 'making Mario jump in two minutes' you'd get 60k views. But for those of us who got here. Really appreciate it.
How would you go about calculating a knockback effect on an enemy while using seeking behavior? Is it possible to use vector_lengthdir & set_magnitude to do something like this, or would it be easier to find a point away and send the object there to simulate it?
Yes, vector_lengthdir would work, but once you start adding in outside forces, it gets more complicated. For example, let's say you keep the velocity limit in, this will cap your knockback in that direction. But if you remove the velocity limit, you need some other way to limit the velocity (such as friction or drag) or your velocity will increase to fast. An alternative way would be to track knockback separately (you can still do it with vectors) and then add it to position as well.
Sam SpadeGameDev I love there tutorials, I am 9 months into making a top down sci-fi game and these are helping me out hugely! i have spent the last 2 months working on my own AI steering behaviour code, but it is a mixture of built in commands and vectors, for example i had to convert the x,y and direction of the AI, into a vector so that the dot product could work. Would you be doing a tutorial on collision avoid steering behaviours or is it too advanced ?
In the next video, I'll do separation, which is a bit like avoid or flee but works with more than one object, and I might do avoid itself in the future. There's a good written explanation of how to it here: gamedevelopment.tutsplus.com/tutorials/understanding-steering-behaviors-collision-avoidance--gamedev-7777. It uses a different language, but the ideas are the same, so it is translatable with some effort. You can also use most traditional collision movement code by substituting position.x/y for normal x and y. I have an example over on the GMC tutorial forum: forum.yoyogames.com/index.php?threads/vectors-and-steering-behaviors.86491/.
@@SamSpadeGameDev Thank you for this this is what i have so far ua-cam.com/video/8lZ9rDIRXk0/v-deo.html as you can see its not perfect but with these tutoirals i can hopefully improve it hugely!
While not quiet as simple as replace x and y in your tile collision code with position.x and position.y, it would likely be close to that. Pretty much anything you can do with a normal x and y you can do with a position x and y (and then remember to update the actual x and y after). I have a basic script I posted in the GMC tutorial section here for doing collisions with objects which might be helpful as an example: forum.yoyogames.com/index.php?threads/vectors-and-steering-behaviors.86491/#post-543322.
I'm having trouble with my wander_force script. It looks identical to what you have, but the velocity vector keeps instantly changing direction so my ship instantly turns almost 180 degrees. I used the debug script and even the targeting circle rotates instantly with it. Any ideas what could be causing that?
I've often wondered how to implement something like this, thanks for your explanations!
I'm loving this series, and I love how you teach the material. My favorite part is where you show how changing the weight of the steering forces results is some very intelligent appearing AI. Your content is so clear and easy to understand. Thank you for the tutorial and I can't wait for the next video!
Keep up the tutorials, really informative and enjoyable too.
Hello :) Just wanted to take a second to tell you I appreciate this channel and the immense amount of work you do to make it happen! I confess I've only seen a couple videos as time is ehh lately, but I plan to! There's not enough quality GMS content out there, especially about topics like this that use good old fashioned code structures. Also, this channel has far too few views! :O
i was waiting for this, such a good tutorial.
thanks
Really good dude. Well presented and explained. Doubtless if you did 'making Mario jump in two minutes' you'd get 60k views. But for those of us who got here. Really appreciate it.
How would you go about calculating a knockback effect on an enemy while using seeking behavior? Is it possible to use vector_lengthdir & set_magnitude to do something like this, or would it be easier to find a point away and send the object there to simulate it?
Yes, vector_lengthdir would work, but once you start adding in outside forces, it gets more complicated. For example, let's say you keep the velocity limit in, this will cap your knockback in that direction. But if you remove the velocity limit, you need some other way to limit the velocity (such as friction or drag) or your velocity will increase to fast. An alternative way would be to track knockback separately (you can still do it with vectors) and then add it to position as well.
Sam SpadeGameDev
I love there tutorials, I am 9 months into making a top down sci-fi game and these are helping me out hugely! i have spent the last 2 months working on my own AI steering behaviour code, but it is a mixture of built in commands and vectors, for example i had to convert the x,y and direction of the AI, into a vector so that the dot product could work.
Would you be doing a tutorial on collision avoid steering behaviours or is it too advanced ?
In the next video, I'll do separation, which is a bit like avoid or flee but works with more than one object, and I might do avoid itself in the future. There's a good written explanation of how to it here: gamedevelopment.tutsplus.com/tutorials/understanding-steering-behaviors-collision-avoidance--gamedev-7777. It uses a different language, but the ideas are the same, so it is translatable with some effort.
You can also use most traditional collision movement code by substituting position.x/y for normal x and y. I have an example over on the GMC tutorial forum: forum.yoyogames.com/index.php?threads/vectors-and-steering-behaviors.86491/.
@@SamSpadeGameDev Thank you for this this is what i have so far ua-cam.com/video/8lZ9rDIRXk0/v-deo.html as you can see its not perfect but with these tutoirals i can hopefully improve it hugely!
Any tips on using tile collision with seek?
While not quiet as simple as replace x and y in your tile collision code with position.x and position.y, it would likely be close to that. Pretty much anything you can do with a normal x and y you can do with a position x and y (and then remember to update the actual x and y after). I have a basic script I posted in the GMC tutorial section here for doing collisions with objects which might be helpful as an example: forum.yoyogames.com/index.php?threads/vectors-and-steering-behaviors.86491/#post-543322.
I'm having trouble with my wander_force script. It looks identical to what you have, but the velocity vector keeps instantly changing direction so my ship instantly turns almost 180 degrees. I used the debug script and even the targeting circle rotates instantly with it. Any ideas what could be causing that?
What is this magic!?