Ballz game on Android
Link to the repository: https://bitbucket.org/Natiami/cg-project/src/master/
The main goal of this project is to create a game for android platform. The game itself will be Ballz game. In this game user has to swipe his finger to throw the balls and break the bricks. The goal is to break as many bricks as possible before they move down to the bottom.
- Learn how to develop a game for android in unity
- Start developing from basic parts, for example create main menu
- Create the Ballz game
- Debug the game and improve the design
- Learning C#
Milestone 1 (02.03)
- Learn basic functions of unity
- create first screen for the main menu
- Write functions for the main menu
I have watched tutorials of unity and learned how to use working environment.
I have created first page for the main menu. At this stage it contains 5 buttons. Most important one is play button. I used existing game screen as reference to make my menu similar.
I wrote function for the play button. This function will allow user to go the main game screen.
Milestone 2 (16.03)
- Start developing game main screen
- make a little bar, tutorial which shows how to start the game
- Create some bricks on the screen
I have developed game main screen: I have added text areas for scores.
I made tutorial bar in the middle of the screen.
I have made bricks row and added ball as well. With the mouse click ball can be moved.
Milestone 3 (30.03)
- Constraint ball to move between the boundaries
- Make the bricks move from top to bottom
Progress: I have created walls so the ball won't go out of the boundaries. This is done by creating walls with Box collider 2D and adding ball Circle collider 2D.
Row of blocks creation is done by code and every time we press button one row of blocks is added on top and starts to move down. More precisely, We have a container for the rows and we create one row at a time on top of existing rows and than move the whole row container down by one step. At this point rows are generated by pressing button 1 but in the future it will be changed.
Milestone 4 (13.04)
- Check for collision if the ball hits the walls
- Add the line to show direction of the ball
Progress: I have used New Physics Material 2D to make the ball bounce between the walls. For this collisions were added Physics Material 2D and ball also had this added. Line for the direction added and also scale of the line is done so when we throw ball far it will scale the line to show the direction far. This is done using the script. First swiping direction is checked and if it does not point to the bottom we show the line (otherwise it is hidden) and scale it. For Scaling Vector3.Lerp function is used which Linearly interpolates between two vectors. Besides milestone I added check when ball hits the bottom collison it stops moving. This is done using checking collision with bottom collision and if it happens ball stops moving. I also added reset to throw ball again after above mentioned event. For this variables are reset to initial valus so we can throw ball again.
Milestone 5 (27.04)
- remove the tutorial part after first shooting
- make the bricks move after ball hits the bottom
- break the bricks on the hit of the ball
- Try to throw the ball even you aim to bottom part (make y=0.01 and x the same)
Progress: Tutorial part is removed after first shooting. Ball hit to the floor is checked and every time it occurs new row of bricks are generated. Bricks itself have a function which makes a damage (destroys that brick object at ball hit) which is being call when ball hit the brick. Ball is being thrown in case of aiming to the bottom too. Besides milestone I added generation of scattered row instead of full one.
Milestone 6 (11.05)
- Finish up the game
- Add the losing condition
- Add the space on top of rows
- Add score count
Progress: I have added Losing condition. When brick will touch the floor game ends. Also on top of the new row empty space is generated. Every time ball returns to the initial position(returns to the floor) level count is increased by one and is shown on top of the screen in the middle.