Breakout Urban (Android Port)

C#
Unity
⛋ 2D
Solo
--

In order to broaden my experiences, I decided to continue this game and port it to the Android OS, using the Google Play store. Further details of the original game can be found here.

Over time, I've been slowly re-working the game to run more efficiently, be easier to manage in-editor, and adding new features such as touch controls.

Team:

Liam Dunstan - Designer, Lead Programmer
Trent Williams - Designer, Artist, Programmer
Tristan Bondici - Designer, Sound Design

1 / 7
2 / 7
3 / 7
4 / 7
5 / 7
6 / 7
7 / 7

Code Snippets

                                private void CreateBricks()
{
    float xPos = 0;
    float yPos = 0;

    for (int x = 0; x < 6; x++)
    {
        for (int y = 0; y < 6; y++)
        {
            BrickScript brick = null;
            float rand = Random.value;

            if (rand < 0.5f)
            {
                int rand2 = Random.Range(1, 7);

                switch (rand2)
                {
                    // instantiate brick gameobjects from prefab and set their positions
                }
            }
            else if (rand >= 0.5f && rand < 0.75f)
            {
                brick = Instantiate(hotBrickPrefab, bricksParent).GetComponent();
                brick.transform.localPosition = new Vector3(xPos, yPos, -1);
            }
            else
            {
                brick = Instantiate(coldBrickPrefab, bricksParent).GetComponent();
                brick.transform.localPosition = new Vector3(xPos, yPos, -1);
            }

            RemainingBricks.Add(brick);
            yPos -= 0.7f;
        }

        xPos += 1.63f;
        yPos = 0;
    }
}
                            

Excerpt from GameManager.cs

This snippet has the same functionality as the previous one, but is the way how brick creation at the start of each play-through is handled in the planned mobile release.

This is included to demonstrate my improvement in just a couple of years. By using prefabs effectively and zero-ing the initial positions with the help of a reference to the parent transform, you can see the code is considerably cleaner and more efficient.