need help creating player movement for a game, need help

hey guys i just needed some help creating a player movement functiob.

the game is a box where the player will need to run away from the ghost for as long as possible before he is caught.

I have no idea where to start in terms of making a function for player movement. thanks
I recommend steering behaviors (https://gamedevelopment.tutsplus.com/series/understanding-steering-behaviors--gamedev-12732 ). All you need is a basic knowledge of vectors, specifically vector addition, subtraction, multiplication, dot product, and cross product should be enough to get what you want. You'll notice how simple it is to make things move realistically using the techniques I linked to you.

EDIT: If you just want the ghost to follow the player, then just implement seek. However, the nice thing about steering behaviors, is that once you have seek, then you can literally implement the rest within minutes, they're that simple.

EDIT #2: I found this awesome video tutorial by PatrickJMT in case you don't know much about vectors (https://www.youtube.com/watch?v=pimr9I92GZY) I recommend you watch the whole video.
Last edited on
Topic archived. No new replies allowed.