Snowie Snow Game
Tech Stack: Unity 2023, Visual Studio, Maya/Blender, Gitlab
The Assignment
The goal of this game was to make a Christmas themed game in only 2 weeks. I worked together with 2 other developers: Tom Holewijn and Chiel Eikelenboom. I was in charge of the interactive UI and I had to make the power-ups you can see in the video at the top of this page. We had to make the game multiplayer so we chose to make it a split-screen game. The game is also only playable with controller since that was one of the requirements. All said and done I think the game turned out pretty fun and I think the progress we made as developers in the 2 weeks was very impactful for the three of us. We learned a lot more about rapid prototyping and a lot about how to efficiently work with each other.
Code Highlights
public class DecreaseMultiPowerUp : PowerUpScript
{
public override void DoPowerup()
{
if (PlayerString == "Player1")
{
StartCoroutine(UIManager.Instance.PlayPowerupAnim(0, "Enemy x0.5", 0));
StartCoroutine(DecreaseMultiplier(1));
}
else if (PlayerString == "Player2")
{
StartCoroutine(UIManager.Instance.PlayPowerupAnim(0, "Enemy x0.5", 1));
StartCoroutine(DecreaseMultiplier(0));
}
}
private IEnumerator DecreaseMultiplier(int index)
{
if (GameManager.Instance.ScoreMultiplier[index] !< 0.5f)
{
float currentScore = GameManager.Instance.ScoreMultiplier[index];
GameManager.Instance.ScoreMultiplier[index] = 0.5f;
yield return new WaitForSeconds(15);
GameManager.Instance.ScoreMultiplier[index] = currentScore;
}
}
}
Explanation:
The ‘DoPowerup‘ method represents the functionality of a power-up effect. Key features of this code include:
The DecreaseMultiplier coroutine gradually reduces the score multiplier for the specified player index to 0.5 over a duration of 15 seconds. If the current score multiplier is already less than 0.5, the coroutine is not triggered.
/// <summary>
/// plays the powerup animation on screen
/// </summary>
/// <param name="SpritesIndex"></param>
/// <param name="PowerupName"></param>
/// <param name="player"></param>
/// <returns></returns>
public IEnumerator PlayPowerupAnim(int SpritesIndex, string PowerupName, int player)
{
GameObject anim = null;
anim = Instantiate(SpriteAnimations[player], gameObject.transform);
anim.GetComponentInChildren<Image>().sprite = PowerupSprites[SpritesIndex];//sprite of the image set to sprite in the list
anim.GetComponentInChildren<TextMeshProUGUI>().text = PowerupName;//name set to parameter name
yield return new WaitForSeconds(3);//wait till dissapearing
anim.SetActive(false);
//needs objectpool implementation
}
Explanation:
The ‘PlayPowerupAnim‘ coroutine handles the instantiation and display of power-up animations on the UI. Key features of this code include:
My Role
Reflection On The Project
I really liked this project because me and my teammates got to use our, at the time, newly acquired skill rapid prototyping! We only had 2 weeks for this project so that meant we had to speed up our development and get the idea on paper as quick as possible. AFter the fact I wish I knew more about making algorithms instead of only working on the UI. I loved working with Tom and Chiel and hope I get to work with them in the future again!