”The eagle”

This week I’ve been working on implementing the last aspect that will serve as a threat for the player, the eagle. The player can at random occasions see an eagles shadow on the ground, if the player would move into the shadows aggrorange, there will be a sound playing which will be kind of a screech to simulate an eagle. After a period of time, which will be decided upon later in the process when we start to balance, there will be an animation playing which would simulate the eagle sweeping in from the side of the screen, picking up the mole, which would mean game over for the player.

So, at this part of the game, the player will have to react fast to the screech to avoid the eagle by digging underground as soon as possible.

Eagle

As you can see in the photo, there is a shadow, this is basically just a sprite that has some movement. At the moment this movement is in the form of a sine wave from left to right. As soon as the eagle goes out of the screen, it will be moved to the -64 x-coordinate to simulate it coming in from the screen. The movement shall be different on beta, but as for now it’s just a simple loop with a sine wave. We have been thinking about giving it random locations that it will move to with this sine wave, this would make it more lifelike and not giving the player the perception that it just loops from a given position to another.

The eagle won’t be there at all times either, the shadow will sweep in at a random time, which we haven’t really implemented yet. But we’ve been thinking about sending it in every 30-40 seconds and give it a lifetime for about 10-15 seconds per time.

We decided to implement the eagle since we don’t think we will have the time or knowledge on how to make the gardener “smart”. We don’t really have any knowledge in working with AI at all. At this point the gardener just moves to the players position, which isn’t optimal at all. We will code it so that the gardener moves between different nodes and if the players gets in the gardeners aggrorange it will try to catch the mole. Since we can’t really make the gardener as much of a threat as we would want to, we had to make it more risky for the player to be on the toplevel by implementing something else, so we came up with the eagle.

The output of a sine wave is determined by this algorithm;
“y = amplitude * sin(frequency * time * phase) + bias”

By giving the eagle the movement of this algorithm,
it will give the movement the output shown in this photo;

Sine_Wave

En reaktion på ””The eagle”

  1. Hi there Ludvig!

    First of all, I think that your blog post had a lot of good information for the reader, which was good as it really puts the reader in a mindset that allows for good understanding of the whole design behind the mechanics. Also you do not miss any details that are crucial.

    I think that it was smart of you and your group to decide to add the eagle, as it meant that you would save time, especially if you did not have the time to make a good AI for the gardener. But I would also like to see you explain more in depth about the design behind the eagle and why you decided to go with an eagle and not something else. Did you have any other ideas or was this the first best idea that you and your group had?

    Also I would really like to see you explain how you coded both the sine wave and the rest of the class. You could next time explain more about what parts of the coding you found difficult, if there was any, and how you overcame any hardships surrounding the code.

    All and all, it was a very interesting blog post and I look forward to your next blog post!

    Have a nice week,

    Ara

    Gilla

Lämna en kommentar