using one of unity's ui systems we created a basic ui for a fps game. Using units old Ui system we created a fake fps game using different transparent PNG pictures to create the look of the game after doing this we started a new project where we immediately put these new skills to use in creating out clicker. A problem I ran into was the scaling of the screen when on free aspect things would twist into the wrong places although this was fixed by having it as a set resolution (1920 x 1080)
i made the base UI using a canvas as the main thing, then putting panels in different parts to sore my buttons and text ext then i made some buttons so when you click the menu button it makes a panel active and makes a bunch more buttons appear on the screen one of these disables the menu
I put different assets into different folders depending on what they were used for this is really beneficial when I include a lot of assets for the achievements or the ducks, as well as every animation I make for them. This saves a lot of time as everything is easily located.
the resume button disables the menu panel, and the reset button sets all the variables back to their original value that they were originally.
this is the code for the add score button at the top of the previous images this is in a score manager game object that is called when the button is clicked and the specific function "OnButtonClick" is called which adds 1 score and updates the text
it also plays an audio clip that i added to an audio source.
i originally had 3 upgrades however then i couldn't get the passive speed to work properly so it currently has 2 upgrades for adding click power and adding passive power.
I made the passive by when you have the score and click the button for the first time it will start a function that will add score wait 2 seconds and do it all again. I've made the price scaling for the passive to be greater than the clicking price to encourage more clicking than passive game play. During the creation process of this I ran into a few issues one of the first being that I tried to do a waiter in fixed update, this wouldn't work because the update functions ignore all lines of code that pause the code. I later found out that it needed to be in an enumerator and in this later version of the script I opted to remove the passive speed as when I tested the normal passive I came across the issue that it increased in speed without using the speed upgrade. This was an issue because it would break progression of the game I later slightly resolved this by realizing every time you bought the upgrade it would start the waiter function again so I made it only run after clicking it once.
i updated the buttons so that it gave the game more of an identity instead of a bunch of default buttons I also didn't like the look of that the panels made so I made them all transparent by putting their alpha channel to the bottom value this allowed for more freedom with the look of the game allowing me to later add a background image. Using the ducks on either side I also added animations that appear when you get enough score for them to activate so you can see them.
i added 2 fonts to my clicker game that i found off dafont. These fonts will help give the game a more unique feeling rather than the bland look of had with the default font. This is a food design choice because the bland texture may be more boring to look at rather than a more curved and soft font that I added as well as the default font not fitting the theme of the game witch is ducks.
Using the noun project website I found icons for my achievements and buttons this really helped speed things up as I was at a loss of what to do about the icons I needed with the time I had left to do this project although I made a few myself before finding these that will be seen in the achievements section. There weren't any issues doing this all I had to do was edit the photos slightly in Photoshop then add them as buttons in my scene.
The achievements work similar to the animated duck as they get a game object and once you reach a certain milestone it swaps the Sprite with the correct achievement I ran into a few problems here as I tried using the image variable to store the PNGs in however this didn't work and I realized that they needed to be sprite variables once I had don't this it worked fine. I stored all the data in arrays so that they would be easily grouped. I added achievements because the game had no reason to be played so I added achievements that gave the game a bit more reason to be played.
Using units particle system I made it so when you click the duck it does some particles that fall I did this using the unity gravity graph after this I made the texture of the particle a placeholder image of the default duck it will spew a bunch of these all out at once using the emitter option in the particle system so that it flings out a bunch of particles when clicked. Next I made it so that the size over lifetime would go down until it wasnt visible. I had a lot of difficulty using the render option to make it my image while playing to fix this I made a material and set the option to particle I made sure the default color was white so it had no tint however when I put it in my scene I couldn't see the particles so I went through the web to find how to fix it later coming across the site that is connected to the button above
I was having difficulty with the particles appearing in the wrong colour or with not enough light for you to see the image these issues were mostly fixed by following the instructions on this web page.
I coded an event into the game so that it has a 0.1% chance every time you click the button to start a money event that wi triple your click power for a short time then will decrease it back to your normal amount. An issue with my system is that if you buy 3 upgrades for click power during that event once it ends you'll only have 1 more than when it started, to fix this I could increase the amount of click power per upgrade for a short while.
The rebirth system I made was very simple and mostly re used my restart code however it wouldn't reset the rebirth points and your already purchased rebirth upgrades, the upgrades I put in the shop felt like they made starting the game a lot faster until you reach the next bit of difficulty where progress appears to stop. To improve upon this system I would add more upgrades and give more ways to unlock rebirth points rather than just total clicks as this isnt very clear in the game, so I would also add an indicator to how close you are to a rebirth point.
After putting the video on YouTube I had officially finished my project and stopped developing it as I wasnt that keen on making clicker games, however if i had to improve upon my game i would add another event for the unused asset that i have witch is a heart eyes duck i didnt add this already because i ran out of time whilst fixing other issues. Another thing I would add is the rest of the upgrades that already have buttons in the rebirth shop this would make the game playable for a lot longer as there would me more to work towards.
i uploaded the game onto itch so that anyone can play it if they find it.