How to make 2D NPC Movement?

Yes I did to know pls… So I can finally make a game with NPCs.

1 Like

I’m guessing this is for a platformer and not a top-down. What do you want it to do? walk around, interact with things, etc?

1 Like

Timers that repeat forever, simply just make a random router with 4 different choices that make them get a velocity for a bit.

Ok thanks For the help. @CodeAlpaca Just want the dude to walk around

1 Like

Ummmmmm…Trying to imagine what it would like it…Not working…

Repeating timer that goes in a router (lets say it has 12 outputs) make the timer select the router and make the router random in the settings options. Then make 4 of the 12 outputs get a direction of movement (5 velocity x, then wait 2 seconds then set x velocity to 0)


So what galactian said works, another method you can use is with ray casts. So when the ray cast hits a wall it turns around and walks in the other direction, and if you have a ray cast pointing downwards you can also make it turn around if it gets to an edge.

1 Like

Still trying to imagine it …Sorry I cant render :frowning:

1 Like

Thanks! CodeAlpaca! Next Time I really need to work on my imagnation

1 Like

my imagination is broke :weary: :sob: :sob: :face_holding_back_tears: and i ONLY have motivation for Quanah not anything else

Dont worry man Just wait for the train to pass by and you will soon be on it!
You got this! :hugs: @TheFlowingLabThatFlowsALab

1 Like


im never saying rawr ever again

1 Like

Why is that @TheFlowingLabThatFlowsALab

no just no im never saying it

Um ok very ok good to hear i guess?

Anyway my mind is now Motivated but not Imagineable sadly

but im motivated to find ideas