Diamond Destroyer
Updated 3 years ago
In development
Assignment 1 - Create a Simple Game. This project will aim to program a simplified video game using c-sharp scripting. I have decided to created a fun, simple and attractive brick breaker inspired game. Suitable for those who like launching objects into breakable surfaces. This project will be updated regularly to show new and included scripts and assets taken from other creators in the industry; referenced of course.
Images [Left to Right] and Entries are in sequential order. Follow along!
[Entry #1 - 09/11/17] This project will include the implementation of various C-sharp scripts, in order to finalise an industry ready and simple arcade game. After the planning documentation was completed last week, I've went ahead to set-up my first level to visualise the aesthetic that the game will posses. As a brick breaker game, it will gives me some leeway with regards to understanding simple algorithm of c-sharp script and it will provide me with a smaller chance of having to produce more advanced code to stress over. But, we'll see how this goes. Although I dealt with c-sharp script last year, my mind will need to rehearse how the brain of the c-sharp script functions, in order to use my development time effectively.
[Entry #2 - 16/11/17] This week I have managed to implement the basic functionality of the brick breaker game by using three script. 'ManageGame.cs' which will handle the games implementation of inserted objects, the values of the player's lives, current score and combo. Multiple methods are used amongst one another to adjust given values when needed; once a certain condition is met. 'Player.cs' will be the movement of the paddle and so it will simply move left and right using the Input.GetAxis("Horizontal") and restricted to moved beyond the walls. 'Diamond.cs' will use the AddForce function for it to launch once the player presses space to begin, once the level has loaded. With the diamond I have also managed to get it to rotate after player has pressed spaced with a simple 'transform.rotate' function. The Youtuber Raja from Charger Games has helped me incredibly, to refresh my mind on the fundamentals of c-sharp scripting with her multi-part tutorials, so I have been watching those too!
[Entry #3 - 23/11/17] After struggling with the diamonds collision functionality and the paddle moving when the diamond bounces off it, I found out eventually that it was because a rigid body was on the paddle. Although I want to include a paddle bump later on in the project, and for the paddle to launch the ball a bit harder on input, I need to find a way t allow the paddle to jump without any physics. This may be difficult, but I will keep you updated. However, I have managed to create a script by scratch using my own intuition, and this is the 'destroyableObjects.cs' script, that will allow me to assign a colour to an object with the attached script, and the checked/enabled Boolean will run the relevant code. For example, if the intended brick is blue it will make the player gain a certain amount of points on hit. I have also added death particles for when the diamond will hit the death zone, below the paddle. Next week I will be creating the main menu and adding functionality to its user-interface.
[Entry 4# - 27/11/17] After deciding that I wanted to go with a sci-fi/space theme, I decided to use a few sky boxes that caught my eye from the asset store. They look very pleasing to the eye and do not take up too much performance, with this in mind I would like this game to be playable on mobile platforms, so throughout this project I will be keeping this in mind through its code, instancing and physics of objects. Buttons have been added to help navigate the user, within its menu system. To create the menu functionality code I had to look up on how to affect canvas components, enable and disable them once a player presses a button. This is done by creating a function and assigning this function to the intended button within the inspector. I also have to mention that I had to edited found images of buttons slightly as the chosen source image had its button connected and not separate.
[Entry 5# - 4/12/17] This week I wanted to concentrate on audio of the game and to create a countdown for the game's startup, however my intended aim was post-poned due to the stubborn resolution settings. Choosing the audio tracks was the least of my worries, but I had to find a way to create two audio sources; one for main menu music [volume slider] and button sounds [SFX slider]. I still haven't figured this out yet, so at the moment I have left one volume slider to affect the main menu music only. I would also like a 'SFX' slider and this will be added later on. I have also succeeded on making the volume slider increase when the game starts up to help it fade in. Soon, I will be adding a fade in from black onto the main menu to add visual appeal. For the settings menu I wanted to include multiple options for the screen size of the game to support a player's PC monitor. At the moment the user can select full screen just fine with the other resolution options being non-interactable. However, when I choose one resolution - only '800 by 600' works and I can select more than one resolution at a time! For the resolutions I have followed a tutorial by Lague (reference in script 'menuFunctionality' [Lague, 2015]) to assist on adjusting the screen size of the game window. Some of his code is a little advanced for my level and so have commented on each line to ensure I understand it well. He uses a lot of; if this is three and not zero sort of thing [? 3 : 0]. Silly old me forgot to use the expected naming conventions for my variables and functions. Only now have I discovered that private variables need an '_' to begin along with camel case! This makes it a lot easier for me to identify if the variable within a function is private or public without needing to scroll to the top of my script. To quickly change my variables, I used the ctrl+f command to find the word to change and monodevelop allowed me to change the found word to my intended one; pretty neat.
[Entry #6 - 11/12/17] A lot of problem-solving was involved with this week, but I was mostly focused on the start/countdown timer for the beginning of each level. I found a very 'cool' female-voice counting down from three to 1, with a go. Thankfully to fit in time with when she says three, I could invoke the timer to trigger after the amount of seconds when she begins her vocal. The countdown script simply decreases its amount of seconds; being four. Adding a text upon the level's canvas and grabbing the text components needed to affect amongst the timer. When the countdown reaches zero the main music will play. Unfortunately at the moment the next level will be executed, but the music upon it will become sluggish and slow. My other task of the week was to ensure that the player's score was being recorded and saved under 'Playerprefs' which stores user data for next time they launch the game. These files are stored under the projects preferences! A music clip from Youtube was selected and implemented into the game's menu, and a pack was downloaded to include button, jump and shooting sounds. Each audio clip is triggered by 'PlayOneShot' and triggered if a player selects a button and automatically when the game starts up. At the moment I am having trouble with the volume slider remembering its assigned value when the game is next launched. I think this is because for the fade in of the music I have to reassign the volume slider's value each time the game is launched. So this is a lose/lose situation to be in! With the button sounds, I call their triggered sound method each time a button's function is activated. The sounds of the buttons also randomise between multiple sounds within the audio clip variable 'buttonSound' as an array! It's pretty neat. Upon the menu's canvas' I included particle systems sourced from the asset store to add visual appeal. The only downside to these is they don't scale to the chosen resolution but are fine in full screen. I managed to fix the displacement of particles when the user selects a higher resolution, by simple placing canvas scalers within each canvas, under the main camera object in the hierarchy. Took me three hours to work out a simple problem, and after manually adjusting to multiple resolution screen sizes a simple parenting objects method helped me in three seconds! Last week when I tried to set the main camera to world space the canvas flew downwards because the camera is set to move up the y-axis. This was fixed by again, parenting the canvas to the main camera object.
[Entry #7 - 18/12/17] More problem-solving was amended with regards to the spawning of the abilities and their functions. Before the ability orbs didn't spawn where the brick positions were. To fix this I had to set the assets within the asset library to zero. Took me ages to figure out that I also had to set the parent object to zero also to avoid positions being at the incorrect co-ordinates along the x, y and z axis. Also, some abilities this week didn't work as expected. The slow paddle moves the wrong way but decided to leave this in to create an ability that does just this by reversing the players' movement! The abilties that don't work so far are the widen paddle ability and the laser gun abilities. These will be worked on later. So far my two scripts which control the generation and function of abilities are 'Player' and 'destroyableBricks'. Which should start with a captial 'D'. The abilities generate with a given percentage of drop rate, and the majority of abilities work as expected. The test plan is helping me manage this in the most efficient time.
[Entry #8 - 1/1/18 + Entry #9 - 8/1/18] This week I have decided to get things going by creating a series of tasks to follow in order to meet this project's deadline; next week. I first began to look at my test plan and amended the features that currently weren't working, to ensure I could carry on with less headache. So far the abilities that work are the gain and decrease speed, life, and shield ability; sort of. The shield ability spawns where the diamond has been, but doesn't follow the diamond after its instantiated. I hope I can figure this out before deadline. And this problem seems very simple algorithmic-ally however as i'm instantiating my paddle and diamond onto the scene I can't seem to re-attach the shield to the diamond and make it a child object of the diamond. I've also made this week an instruction scene to let the player know what each ability does upon pickup. It gives the game a nice little introduction into the purpose of the game, explaining a bit about its story and overall setting the tone. Oh yes, I also managed to make all the levels too! The bricks even move on level three and all follow my previous level plans for the assignment, during the pre-production stage. Ignore the end score on this screenshot for test purposes it shows as minus nineteen but usually it would be much higher and above the minus range.
Aaron Alexander Wilson
Mr - Designer
Game Languages
Supported Platforms