The Ice Hiker
The Ice Hiker is a game that I am currently working on with a team of 4 people. The goal of the game is to beat the bird boss with your ice pickaxe. The plan is that there will be 3 / 4 phases. The first phase or phase 0 as we call it, the player gets introduced with the first 3 mechanics Climbing, throwing the pickaxe like a grappling hook to go to climable surfaces and throwing the pickaxe in general. In phase 1 the player gets introduced to the bird and has to hit it a couple times while avoiding attacks. if the player hits the bird till 66% of it’s HP, the bird will go up on a pillar and defends it and the player has to climb up the pillar to hit the bird again. This state machine goes around twice and then phase 2 wil begin. In phase 2 the bird flies away from the player higher on the mountain and creates an avalanche. The player learns to use a rope with the pickaxe and has to run and climb around the mountain othewise the avalanche crushes the player. In phase 3 the player has another conflict with the bird. If the player beats the bird the game ends and the player wins. As of right now the third phase isn’t fully thought out.
My addition to the project so far is a bug fix where the bird didn’t go to another destination after it did an attack. This was not really hard to solve. I thought it out step by step before editing the code.
- If the bird doesn’t have a destination it should get one
- After the bird reached the destination it has a 50/50 chance it would attack
- After the bird attacks it should choose a destination that is not the previous destination
- Repeat
I made this into code:
private void ChooseRandomDestination()
{
if (currentDestination == Vector3.zero)
{
currentDestination = destinations[Random.Range(0, destinations.Length)].position;
agent.destination = currentDestination;
}
newDestinations.Clear();
for(int i = 0; i < destinations.Length; i++)
{
if (destinations[i].position != currentDestination)
{
newDestinations.Add(destinations[i].position);
}
}
currentDestination = newDestinations[Random.Range(0, newDestinations.Count)];
agent.destination = currentDestination;
}
The code for attacking was already done the only thing was that the previous destination wasn’t saved. This meant that the bird didn’t compare the previous destinations with all the destinations in the list. So it could choose the same destination multiple times, which means that it could attack multiple times on at the same destination.
I also made Breakable Ice. That is ice that should break after hitting it 3 times with the pickaxe. This is currently not used in the game, but we’re planning to use it in the future. this was pretty simple to make, but the only thing i found hard was to change the texture so the ice has more cracks in it each time you hit it. At first I wanted to just change the texture of the material of the ice but it would change for every ice object in the game with the same material. So I just made 3 different materials that would change after each time the player would hit the ice.
Now we are working on phase 2 and the addition I am working on now is the main screen / menu.
Here is are 2 gifs of gameplay from our first prototype of phase 0.