#Development Journal Theo Knoll
##February 3, 2016 During this week I began to focus on the basics of my Unity game. I created my first project in Unity and followed along on the Roll a Ball tutorial. By using this tutorial, I began to learn how to use Rigid Body as a movement function. I also learned that shapes in Unity each have specific sizes and when you create objects it is often smart to reset them to origin. In addition, this tutorial showed me the basics of C # on Unity, and showed me how to access the Unity Help Page to find different commands that come preexisting on Unity (like RigidBody, Rotate, etc.). I also learned about how 3D things work in these types of games, and how the term transform relates not only to x, y, and z axis but also rotation. My platformer game will most likely be using many of the things that this game taught me. One of the less basic but still very important things I learned about was how to make objects able to be picked up and I gained knowledge about triggers, which are objects that toggle other events within games.
##February 12, 2016 During this week I finished the Roll a Ball tutorial. In one of the tutorial videos, I learned how to incorporate text into Unity games. For the sake of the game the tutorial was making, the text was used to display how many objects you picked up, and also for when you have won the game after picking up all the objects. In the game I'm envisioning, text may not be important to the functionality, but for the sake of learning Unity and being able to create games in the future, it is good to know. Another thing that one of the tutorial videos taught me is how to build the game. I didn't realize it would be this easy, but all you have to do is select a platform which you want the game to be accessible on and then hit build and Unity will make a copy of it in a desired folder. I still need to figure out how to publish games online or make them available for download, but by using the build function if all else fails at least I could put the game on a flash drive and give it to my friends to download.
##February 19, 2016 This week I began a new tutorial to become more comfortable with Unity. It is the Space Shooter tutorial. From the beginning, this was a significantly more advanced tutorial than the Roll a Ball tutorial. The first thing that I learned from this tutorial was how to import assets into Unity games. Because one of my goals is to not spend money, I will most likely have to be creating my own assets when it comes time to create my 3D Platformer. The next thing I learned about from the tutorial are colliders. Colliders are cages which wrap around game objects to give the RigidBody a set volume. They cages are used to detect collisions within the game, and relate a lot with triggers (the Roll a Ball tutorial briefly touched on triggers but didn't mention how to create the colliders, this tutorial did.) One tip that the tutorial gave me was to use primitive colliders if possible, because mesh colliders are apparently perform less consistently, although it didn't dive into any specifics.
##February 26, 2016 This week will be a long journal, because I've found that by writing down what I learn I remember it better than just mindlessly walking myself through the tutorials, only to forget what I just learned. To start off this week, I began by continuing the Space Shooter tutorial. One video of this week taught me how to make backgrounds and effectively use textures. By using different texture types, you can allow your texture to be unaffected by lighting, which could be key in making a game attractive to the eye. It should also be noted that textures generally do better if they are moved far back from the game (this is in regards to 3D games played on a 2D plane (Like the Space Shooter game).) The next video I watched was about moving the player. Like the Roll a Ball tutorial, the movement in this game used the Rigidbody function. Through the tutorial I got much more comfortable with Rigidbody. In order to keep an object within certain bounds of the x, y, and z axis, you can use Mathf.Clamp. This tutorial also taught me what serializing is (A way of storing information), and how to serialize classes you have made (this is done by putting [System.Serializable]; in the line above the class declaration). Unity needs properties serialized to view them in your inspector. The last thing this tutorial discussed was how to edit the rotation through scripting, which was simple so I won't go into more detail here. I watched one more tutorial this week, and it was related to shooting a beam from the ship. This particular video refreshed my knowledge of materials and prefabs, and had very simple coding to implement, which is good to practice as I have no previous experience with C Sharp.
##March 4, 2016 This week I didn't focus on any tutorials, as I decided I now know enough of Unity to begin actually developing my project. To start off the week I had to have Mr. Schreiber fix my GitHub, because I had made a change on the internet version when trying to upload my Formal Game Plan GitHub wouldn't let me push my files. After GitHub got working again I began to work on my Unity Game. The first thing I did was create a player object, which is a sphere. I added a material to the sphere to make it look nice. To create the ground I used a cube. This could be an issue because I'd rather not have to make a ton of different cubes to create the diverse terrain that I desire, but I'm not sure there is any way around it. After I started to set up the game, I attached a Rigidbody to my player to allow the player to be effected by physics.
##March 11, 2016 This week I began by adding more materials into my game. In my formal game plan I had specified certain powers for both the player and that platform based on the platform's color, so I added in a material for each power I had previously specified. After seeing how the black and white polka dots look, I decided that removing my that power or finding a different color for that power was necessary, because it didn't look good on the player or on the platform. I also began to create the first level. I need to figure out how to make different levels for Unity, and I need to find an easier way to make levels. Right now it is a tedious process of piecing together cube Game objects. I began to make some headway into my game later in the week. I made it so the camera will follow my player how I want it to, I added a script to my player to allow for movement, and I began working on getting a script which allows my player to jump. Currently, my jump command does not work. I haven't discovered the exact issue yet, but I believe it is because of my if statements not working correctly. I have if statements in place to prevent jumping when the player isn't touching the ground. I also attempted creating a script which restarts my game if the player falls off the platform. Unfortunately, this script has yet to work successfully either. In order to advance my knowledge of Unity, I also watched a few more tutorials on the Space Shooter game. A recent tutorial I watched taught me how to destroy game objects when they collide. This is very close to what I need for when the player falls off a platform, but not quite, because I need to restart the level, not just the kill the player.. Further down the line of tutorials this week, I learned how to add sounds into my game and after another tutorial about how to incoorperate a score text into the game, I learned how to end the game. This was exactly what I was looking for, and I am glad that I finished this tutorial series.
##March 18, 2016 This week was primarily focused on getting some more of the basics done within my game and on the first level. I made a command that successfully allows the player to jump when on a platform and doesn't allow jumps if you aren't touching a platform, which is good. In terms of player movement, I got rid of the control for the player to move across the z axis, and I coded in a script to make the player constantly move forward at a good rate to make the game more like Run 2. You should't be able to control your forward velocity as the game is going because otherwise you could just stop and slow down over the course of the level, which in turn would make the game too simple. I'm still in the progress of making the first level, because currently the platforms are not a very good distance from each other, but I added more platforms to the first level to increase the length of the map and make the game more fun to play.
##March 25, 2016 I started off this week with some error fixing. I had encountered a problem with the jump command: sometimes you would press space while on a platform and the player wouldn't jump. I realized this must be due to one of the variables (boolean grounded) that I made to see if a player would be able to jump or not based on if it was touching the ground. What I hypothesized is that the player would go over slight bumps when platforms overlapped, and the Rigidbody component would cause the player to bounce up (this much was visible), which in turn would turn my variable grounded to false, but then when colliding with the platform again, for whatever reason, grounded wouldn't change back to true. I fixed this by adding in a new line of code which makes my game MUCH more enjoyable to play and much less frustrating. I finished the "first" level of my game, but I realized this level is much too hard for a first level, so I have made another level which will serve as the true first level, and the original level I have currently finished will serve as my second or third level instead. After finishing those two levels, I began designing a third level. Designing levels is rather easy, coding and adding in new features to the game is what takes a long time, but I believe that for my first 5 levels I will not be implementing any of the special platforms which I have thought of, so further coding will not be necessary until after the next deliverable, so I am right on track in terms of deliverables.
##April 1, 2016 This week was solely focused on level design. I'm trying to keep the game progression logical in terms of difficulty, which is a harder task than I anticipated. I had believed that creating levels would be a very fast process once I get most of the scripting done, but because I don't want the game to get too hard too fast I have to actually put in a fair amount of thought and self testing into the process. This week is the week of the 2nd deliverable, and by designing more levels I have met my deliverable expectation (supposed to have 5 levels by now and a moving script, both of which I have done). I currently have 7 levels completed, which means the number of levels I completed this week is 4. Within the next few weeks I plan on adding more levels, and also adding more components into the game, such as different platform types and/or power ups as I had thought of in the formal game plan. This should do a good job in terms of adding variety.
##April 8, 2016 This week I had members of the computer science class and my speech class to play my game to make some suggestions on what I could do. Based on their suggestions I determined that the ball needed a new texture so you could actually see that the ball rolls. This makes the game look significantly better. I downloaded a bunch of textures to go on the ball. These textures are traditionally not used for sphere objects, (the one I really liked was meant for a tree's moss), but seeing the ball rotate adds a lot of visual diversity and makes it look nice. I updated the texture for the player on all the levels, which was a rather fast task that I did by modifying the material I had attached to the player originally. I also decided that the game would look nicer if I added a texture to the ground platform so I did the same for that. Another suggestion I received was make the player die sooner so the player can get more repetitions. This was a much simpler fix, all I had to do was move my killing platform higher. The last thing I did this week was design another level using the enemy objects that I had visualized in my formal game plan.
##April 15, 2016 This week I refined the texture on my enemy objects. I also greatly changed the level I had made for the enemies. It was much too hard and wasn't a very long level last week, so I completely revamped it and then finished the level. In addition, I decided that I should make a super easy level with the enemies just to show people what they enemies are and how they work. This level is very short, but teaches people the concepts of enemies within the game. I also realized that I can angle the direction of platforms... Go figure, it took me a while to even think of doing this, but using the angled platforms I add some more visual diversity and a lot more level options. Using the diagonal platforms I made another level. I also decided it would be a good week to implement some of my bigger features like having power ups for the player, so I did that too, but I haven't created a full level for any power ups yet. I am also having difficulty on figuring out how to change the player game object to be the proper color after the power up. The progression of new features vs level difficulty will differ greatly due to the features I add and when I add them. I have lots of basic feature levels that are very difficult, and a lot of medium levels that make use of the new features and also that don't make use of the features.
##April 22, 2016 This week was about game optimization. I completed the powerup level, which was done by learning how to change the ball's color. The level looks very nice, and it really spices up the game play so the game isn't the ball moving slow all the time. I plan on making more of these speed-powerup levels in the future, but due to a lack of time I'm more focused on implementing new features than making a million levels (which is fairly time consuming because of repetitious testing to make sure levels are beatable and aren't awkward to try to play.) A more time consuming feature I added this week was a title screen. By doing so I had to create a name, and the name is decent, at best, but I have no better ideas for it, so for now, "Journey of the Sphere" is what my game is called. In learning how to do a title screen, I had to watch a tutorial about how to use Canvases and make clickable buttons, and yet again I'm awed by how convenient Unity makes everything. However, I decided my original title screen (with a play button, the title, and a quit button) was too bland, so I added some flare to the background which took some new types of coding which I learned from Unity Documentation, from previous tutorials I used, and from Unity Answers. I'm very satisfied with the result. Using a similar coding, I made a menu that can be accessed from every scene by pressing "m". I also added a pause feature that works when "p" is pressed. The last thing I did this week was make a message that is displayed when you beat the last level. On this same message you can also reselect a level if you would like to play it again.
##April 29, 2016 This week I was focused on making the game a bit better in terms of when the winning level is shown. I want to make it so the win screen is shown when you beat all the levels, not just when yu beat the last level. I also attempted to make it so you can only select a level from the menu that you have previously beaten or are currently trying to beat. To do this, I needed to write more code that made it so the buttons of levels you haven't beaten would display a different color when you hovered the mouse over them, and also wouldn't react when clicked. Yet again I was amazed by Unity, much of what I needed to do had a premade function to allow for what I wanted. I also made some extreme efficiency additions within the code. I originally had the game completely functional using a boolean for each different level that was true or false depending on if it was beaten. I decided this was ugly to look at, long, and certainly not the best way to do it, so I completely revamped my old system by making an array of int's and some helper methods. Basically the point of the array is that if the number of a level is an element within the array then it will assume that level has been beaten. This allowed my helper methods to be a lot more helpful. I have a method which checks if a level is beaten and takes a parameter of an integer. With the booleans, I would have needed 13 different lines of code (one for each level) to check the boolean. With my method it took many less lines of code.
##May 6, 2016 This week had absolutely no new coding involved in it. I used the time this week instead to make more levels that use the speed powerup. I figured that if I design a feature, I may as well make the feature occur enough to actually notice it, one level wasn't enough. With each additional level I make I have to SLIGHTLY edit 3 different scenes, which is a bit of a pain, but it isn't super difficult. Basically, when I add a level I have to edit that level (creating it), then I have to edit the toggleable menu within the game to let you access that level from the menu, and then I must edit the winning game menu to also let you access that level from the menu. I created a total of 2 different levels that incoorperate the speed powerup. In terms of deliverables, my last deliverable was to have all components within my game completed, begin testing, and start looking for improvement opportunities. I have hit this deliverable by having created a powerup, scripting to allow the game to function as designed, and menu that is toggleable with levels able to be selected. There are also other convience features like having p for pause, r for restart, and having m, q, and esc be able to pull up the menu.
##May 13, 2016 This week was the real last week for features within the game. The most amount of time went into level creation and level testing. I'm not sure how many levels I created (either 3 or 4) this week, but the game menu is now full with 21 levels as I had wanted and foresaw a few weeks back. An additional change to the game that I made was I added a skybox to the game to add some visual stimulation so the game doesn't look so dry. I personally think it actually adds a lot to the gameplay. Lastly, since I have, as far as I know, completed everything there is to complete within my game, I made a finished build of the game (with n still useable because when presenting to the class I may want to skip levels). All in all, it's been a very time consuming project, but it's been fun, and I'm glad I made the choice to learn how to use Unity.
##May 20, 2016 This week I took the last suggestion for my game: music. I searched for a space song and settled on a 3 minute song that was techno and didn't clash too bad with the game. Given more time, I have no doubts I could have found a much better song, but it fit the bill and I thought I was done with the game last week so I didn't worry about it. I also added in a function accessable via the start-up and in-game menus that allow for the music to be paused and unpause because it could easily become annoying. Not only that, but I also bug tested the levels to discover a few glitches where you either died when you weren't supposed to (level 16) or where you could escape the kill zone and were free falling forever. Lastly, I edited one other level because dying early even though you weren't going to make a jump looks bad and can piss off players. The rest of the week was spent developing my presentation for the 20% project.