[GAME] New version Block Breaker game after fixes and apply suggestions

New fixes included:
1.- Three chances to finish current level
2.- To retry current level and avoid to begin all again
3.- Particle system
4.- Paddle bigger
5.- Increment velocity of ball.
You can see the new version in New Version

I hope you enjoy it!

Hey Karina,
Very Solid now.

The Replay Level is like a Gift in your Game. Its still hard to move forward because the Ball gets an incredible Speed after a certain Time. But thats fine for me, makes the game hard and interesting.

I recognized that your Ball is Hitting through the paddle. If he get Faster do you change the Collision Detection of the Balls Rigidbody to Continuous? Its make the Collision Detection of the Ball much better.
But performance Heavy so u only should use it if you need it like at the Ball.

CheckThis

Check out ur Rigidbody for Collision Detection and change from Discrete to Continuous

The Particles look very nice, your own Creation?
Also in the last version i was askin for, if you made the brick design by ur own. Just wanted to know because i like them much.

The slightly Bigger padle gives more Comfort while Playing and you not loose the ball every few Seconds.

Another few Things i saw in your Levels was that the Position of some bricks not correctly, they overlapping at some points or have an slightly Offset, but nothing that breaks the game now.

Until now i not get into a repeative gameplay so thats already Fine if we think about that you only work with the Physics.

So Nice done Karina and Keep Going
Hope to see more soon.

Regards Alex

Hi Alex, thank you for take a time to give me a feedback, I appreciate it so much.

I checked the Rigidbody 2D and yes, the colission detection is Discrete. I will change it.

For the particles I downloaded an image with rigths to use with modifications, so I modified the color, size and saturation and other properties. With the bricks I did the same process, and the broken bricks also was an edition over the original. I attached the images bellow

Modified Images:
blockv1Damage2blockv1blockv1Damage1particle2

Original image for particle:

I don´t found the original brick, because of that I did not attached it.

I will check the bricks don’t overlapping too.

Thanks and Regards!

Hi Karina
Nice game you had created ,cloud you please tell how did you done that "lives thing"
i am very beginner but i like your game and i wanted to make lives in my game but i didnt succed.

thanks Kabíček

Hi Jan,

I am going explain you that I did, but maybe someone else implemented this in a different or easier way.

I made a prefab Lives
image

Every each startX is a life. I added that prefab in every level scene. Next, I implemented a class GlobalData using Singleton pattern, the class look like:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public  class GlobalData {
    private static GlobalData _instance = null;
    private int lives = 0;
    private int lastLoadedLevel = 0;

    public static GlobalData getGlobalData()
    {
        if (_instance == null) _instance = new GlobalData();
        return _instance;
    }

    public void setLives(int n)
    {
        lives = n;
    }

    public int getLives()
    {
        return lives;
    }

    public void setLastLoadedLevel(int level)
    {
        lastLoadedLevel = level;
    }

    public int geLastLoadedLevel()
    {
        return lastLoadedLevel;
    }
}

Next in ManagerWizard I implement a function updateLevel, where the program searchs the gameobject “start”+ live for changes its sprite. The program call a function that set the ball on paddle and decrements the lives.

  public void updateLevel()
    {
        GameObject.Find("start" + GlobalData.getGlobalData().getLives()).GetComponent<SpriteRenderer>().sprite = liveLost;
        GameObject.FindObjectOfType<Ball>().setInitialPosition();
        GlobalData.getGlobalData().setLives(GlobalData.getGlobalData().getLives() - 1);
    }

That function is called in LoseCollider, where the user goes to LoseScene only when lives is equal zero and in other case call the function updateLevel

        void OnTriggerEnter2D (Collider2D collider) {
            if (GlobalData.getGlobalData().getLives() == 0)        {
                manager.goLoseScene();
            }else
            {
                manager.updateLevel();
            }
            
    	}

By other hand, in loadNextLevel, goGame (first scene) I set the Lives in 3 after LoadLevel, example:

public void loadNextLevel(){
    Brick.brickSize = 0;        
    GlobalData.getGlobalData().setLastLoadedLevel(Application.loadedLevel + 1);        
    Application.LoadLevel(Application.loadedLevel + 1);
    GlobalData.getGlobalData().setLives(3); //<== here
}

Additionally in the method Update of ManagerWizard is called the updateLevel function when the lives set in 3, the scene is a level scene and the current level is the same level loaded, because of that you see in GlobalData lastLoadedLevel attribute, for control the updateLevel and retry the current level if the user wants. This is done, because i want to decrement the live in use starting the level.

 void Update()
    {
        if(GlobalData.getGlobalData().getLives() == 3 && GameObject.FindObjectOfType<Ball>() != null && Application.loadedLevel > 0 && Application.loadedLevel < 6 && Application.loadedLevel == GlobalData.getGlobalData().geLastLoadedLevel())
        {
            updateLevel();
            Debug.Log("CurrentLevel "+ DateTime.Now + ": "+ GlobalData.getGlobalData().geLastLoadedLevel());
        }
    }

I hope my explanation is not very tangled and helps you.

thanks realy it helps me much i had no idea what to do. Now i have nice image thanks to you :smile:

My last fixes Final Version

I change the collision detection, bouncing sound, control the magnitude of velocity vector and improve the levels, aligning bricks and avoiding overlapping.

Privacy & Terms