Post

Balls

My attempt at making popular mobile game Ballz. I have got the game to a state that I am happy with. It has a game loop with some cool visuals and audio.
Ballz

Things that I am proud of in this project are:

  1. Creating the ‘aiming’ effect, the large red triangular thing, without any outside help. By that I mean I was able to do the math and the effect all by myself!
  2. Setting up the grid for the boxes and triangles, I went through a lot of iterations for this. It began with a list of all the objects and iterating through them to update their position. Then it moved to a much more intelligent grid system where each object is aware of its own position and where it will be moving in the next round.
  3. The cool bloom effects and the materials used by all the objects in the game I made. Which you can probably tell by how janky it looks haha. But it was a good first attempt using Gimp as I have never called myself an artist:
    Box Emission Triangle Emission
    I kind of like the effect of the triangle not being perfect.
  4. Used some simple inheritance for the spawnable objects. This made it easy to add the triangle which increased the total amount of balls.

Some things I still want to improve upon:

  1. How the balls move once the hit the base.
  2. Displaying the ‘balls to shoot’ and ‘returned balls’. It is very spammy and massively inaccurate.
  3. Add some background images to give the idea of progressing levels.
  4. Do more with the audio as the levels get higher.
  5. There is one issue I need to resolve: Public Reviews #1

You can play the game right now!

Ballz

GitHub Actions

The cool thing that I was able to set up with this project was a GitHub action (following game.ci) to build the Unity project for me, then using another action to upload the build to to my Itch page (following Creating a free build pipeline for Unity games using GitHub Actions)!

The major advantage of this would be the ability to distribute test builds QA, testers or your audience without having to do much yourself. Although there is a lot in the set up. Once everything it done, it should continue to work without much up keep!

Hopefully, I will be able to use this knowledge for a larger scale project in the future.

CommitsMessage
1Initial commit
2Uploading project and fixing ignore
3Spawning the grid
I can spawn a grid with boxes and numbers
No other functionality yet
4Might continue to work on this?
5Added ball spawning, input interaction and an indicator for the direction and force of the shot. Things are not colliding which is the next thing to fix
6Implemented a round counter and rounds. Current issue is the boxes are not moving down correctly.
7Something was not being clean up properly. So, I destroy every object in both lists then clean them. For reasons?
8Base game working. Lots of bugs. Could add a lot of polish. Fixed spawning heavily on the left had side.
Need to implement:
Main menu
Pause menu
End screen
Audio
Modifiers
More balls
Colors
9Included in the last commit just forgot to stage
10Balls are no longer colliding with each other.
11Unity Save
12Massive refactor.
Created BaseSpawnable:
- This is the base for any object that is spawned at the start of a game round. Currently includes boxes and stars.
- This means that I can add more objects to spawn in new rounds which is cool.
Box refactor:
- Will now change colour depending on value. Currently only green when less then 5 and red when more than.
13The first ball to hit the base will set the ballSpawn position. Adding a new angle when starting the round.
14Cleaning up an error with resetting the ball spawn position. Now working on setting a minimum speed for the balls.
15Added min speed which can be set in the game manager.
16Made good progress. Currently working on scaling the gravity depending on the round duration.
17Closing Unity
18Scaling gravity value with round length. It is currently just a magic number so that could be better implemented at some point.
To do:
Main menu
End screen
Sound
19Moving the Unity project to the right place.
20Issues with balls amount display and how it is set
21Unity close
22Checking I haven’t broken the repo
23Create activation.yml
24Testing workflow
25Update TestLicense.yml
26Update TestLicense.yml
27Create main.yml
28Delete .github/workflows/TestLicense.yml
29Update main.yml
30Testing work action
31Removing project path
32Update activation.yml
33Update activation.yml
34Delete .github/workflows/main.yml
35Update and rename activation.yml to main.yml
36Moving into a folder
37Correcting git ignore
38Update main.yml
39Merge branch ‘master’ of https://ConnorY97@github.com/ConnorY97/Ballz.git
40Work .yml
41Adding activate
42Update main.yml
43Update main.yml
44Update main.yml
45Update main.yml
46Update main.yml
47Update main.yml
48Update main.yml
49Update main.yml
50Update main.yml
51Update main.yml
52Update GameManager.cs and UnityConnectSettings.asset
53Update main.yml
54Testing build to Itch
55Changing the channel name
56Following git example rather than blog.
Attempt at fixing caching issue as well, now building to both WebGL and Win64
57Email has been verified and testing new caching values
58I think I still need to upload the project to github cause it currently cant find it. But I think I am getting close
59Captilization?
60Adding download action
61I messed with the upload artifact path which caused it to fail. Which in turn caused the downlaod the fail Fixed that change
62Updating path the artifact
63Didn’t save :(
64Changing build to WebGL
65Updating path and bringing back the download checker to see where the files are exactly
66Fixing a syntax error
67Trying to find the right download path
68Putting the upload runner and download runner in the same job. This would make sense why nothing was being found since the files weren’t there anymore
69Trying to find the right window size
70Close Unity
71Updating action to only build on specific branch: ‘Build
72Update main.yml
73To do:
74Adding FMOD integration and project.
75Closing Unity
76Changing the BGM. Creating the build branch
77Finally got post processing to work. I will work on adding bloom now.
78Managed to make an emission map for the box. Next ball and triangle.
79Created triangle emission map
80Thinking of adding a grid rather than just having a list of current spawnitems. This will allow for nicer movement of the objects at round end. Hopefully.
81Started looking into a new spawning function which will use the grid.
82Implemented the grid with spawnable objects being spawned and using it. Need to implement lerping function and sizing correctly. Going good
83Lots of stuff!
84Closing Unity
85Stopped DoNotDestroy objects doubling up
86Update DoNotDestroy.cs
87Going to move the project over to a mobile 2d project to aid in getting the sizing correct on Itch.
88Closing Unity
89That was a mistake, so I have gotten rid of it
90Figured out the correct resolution but manually building. Now going to pass it to the action to test.
91Re-implementing the scaling gravity
92Finally happy with the sizing on Phone, will have to fix it for pc. But it is a phone game so oh well
93Adding Volume slider
Josh made a good observation that there is no way to control the volume, so I added an options screen with a volume slider. Thanks Josh
94Updating actions as suggested
This post is licensed under CC BY 4.0 by the author.