I made an animated main menu introducing my game. In the menu there is snow and fog to create a more alive feel to it. Now I want to add a hawk that randomly spawns and flies across the screen in the distance.

Any idea how I'd create a "path" for it to follow? The path would be a curved line or something for the hawk to follow to simulate realistic movement. I have no idea how to design this.

As a side note, I'm writing this game in Löve2D.

-
Look up bezier curves. – Tetrad Jan 9 '13 at 0:10

Spawn the object at a random location on the side of the screen. Additionally, give it a initial direction/velocity of straight across the screen +/- random 20 degrees at whatever speed you want it to move. Finally choose a random target location on the opposite side of the screen.

Now use steering to guide the object from its initial starting position and velocity to the target position. This way you only need to choose two positions and you'll get fairly natural movement while it's moving from one side of the screen to the other.

Alternatively, you can pick your start and end positions forming a line across the screen, then use mid point displacement to alter the line to make it less straight. (I suggest a higher (H) value closer to one so your bird doesn't look like it's on drugs).

Further, you can combine the two and steer between the deformed vertices on the displaced line. Creating smooth movement that's more random than one point to the next.

Or you can take those displaced line vertices and use them to make a Bézier curve and follow it exactly.

Another alternative is to use the wander behavior defined in this GDC paper from '99. You'd want to put some constraints on that to make sure your object reaches the other side, but it could give more interesting results depending on what you're going for.

-
Wow. Amazing response. Pictures and all :) Thank you so much. I'll be looking into it all tonight! – mbreen Jan 9 '13 at 0:40