Well, I've decided to take the jump and seriously work on my dream to become a game developer. Ever since I was a little kid I was facinated by making imagination come to life through making games. My brother also shared my passion and we made very simplistic computer games when we were young. He was more into programming, so I helped with the ideas, beta testing and artwork (if you can call that art :P). Over time we both got involved with other things, mainly work, so we couldn't continue with making computer games. One day a few years ago I played a mobile game on my phone and noticed that there was a splash screen that said 'made with Unity' before the actual game started. This peaked my interest so I looked up Unity and found that it is a game engine for making games! I thought that was awesome and wanted to try it myself. So, I downloaded Unity and set it up and fell in love with making games all over again. I'm quite a bit older now with a large family of my own and working full time, but I was so happy to be learning how to make games even just as a hobby! After learning for several months here and there, I began working on a full game all of my own called 'Epic Ball'. It took my almost two years, but I finally finished it and had so much fun with the process! Sure there were many times of frustration and not understanding certain things, but I pushed through each of these obstacles and finally finished my first game. Only then did I realize that I had NO IDEA how to advertise it or get it seen by others... So, I got somewhat discourgaed and left Unity aside for some time. It's always been my dream to make games for a living, I really enjoy the chalenges of programming and am really happy to see my work come to life. So after a lot of thought, I decided to leave my very unfulfulling job and learn game development full-time! With seven children full-time isn't exactly that, but I do have quite a bit more time to learn than I did while working my previous job.
My first idea to continue my learning with Unity was to create simulations of various catastrophes, such as avalanches, battles, meteor strike, tornados etc. But after making a few such videos
(which can be found in the 'projects' area) I decided that I want to refactor my first game 'Epic Ball' now that I know more about programming. I was still an absolute beginner when I first started making Epic Ball and the code is HORRIBLE.
I would like to implement several new concepts that I've learned and try out some new ideas that will make the game better.
The cylinders are using capsule colliders, so I'd like to change those to convex mesh colliders so that I can stand them up on end without putting constraints on their rigid bodies. The transparent glass blocks sometimes have an odd shader glitch
when they are stacked on one another. There is a lot of repetetive code for each of the blocks. And I had to do some hacky work with their bump sound effects to get them to sound decent.
So I think I'm going to work on these issues with the blocks first.
Now that the blocks are reacting better I decided to begin working on the level settings. Before I had all of the details such and the name of each level, the music and skybox related to that level, scoring and timing numbers etc all hard coded or put in serialized lists. Which, needless to say made it very difficult to make changes to them and took quite a bit of time. So I decided to put all of the relevant information for each level in its own scriptable object and reference that object anytime I need the details for a given level, which works so much better! I will also save all of the information on these scriptable objects for when the player completes each level and gets a score for it and a best completed time.
I'm setting up the player movement to be different depending on whether the game is built for Windows or mobile devices. The arrow or asdw keys are used when playing on Windows and virtual touch controls that are displayed on the screen on mobile devices. I'm using an asset that I purchase on the Unity asset store for the mobile controls because they look much better than something that I would create :P. I have set it up so that you can swap the controls to be right handed or left handed, which I think is lacking in most games. Meaning that the movement controls can be on the left side of the screen and the jump button on the right, or opposite if you choose. It took some work to get the settings just right, but I think it looks and works great now :).
With the holidays and a war starting here in Israel I haven't had time to work much on refactoring Epic Ball. However, I did finish working on the scoring code. Wow, revamping that code took A LOT of effort. The final scores and saving them rely on many different conditions. But, I got through it! I did used to have an online highscore ladder through Google, but I've taken that out for now because I didn't want to take the time to reimplement it. I really do want to put it back in, but maybe at a later date. For now the high score is only saved on the device that the game is played on.
I have been working on making a new video of a contagion scene to upload to Youtube, hopefullythat will be put up tomorrow. I didn't work on that today though because I learned about the concept of SOLID code and I wanted to begin implementing that as much as I could with the Epic Ball code. The SOLID concept means that you want your code to be as independent as possible and closed from requiring other scripts etc. to run. This makes your script modular and should require no changes in order to use it with other scripts, or any other project. The Level Manager in particular in the Epic Ball code wasn't very independent, so I worked on that today and refactored some other scripts such as the skins for the player and the Game Manager.
Wow, I can't believe it took me so long to finally finish refactoring the code for the awards received when finishing a level in EpicBall.. It took me about a week, although I wasn't coding full-time every day. Still, there were so many factors involved, and just about every aspect of the game is affected one way or another. Scoring, activation of levels, skin availability, updating the scriptable objects that hold the scoring data for each level, displaying the awards, time, etc. So much of the Epic Ball code had to be gone through for this refactoring. But, now that it's done, there isn't much left! The block chasing cripts need to be gone through, and the particle pool needs to be implemented. Other than that, I believe everything else is mostly done. I'm not trying for 100%, as I could keep working on the code for a much longer time to get everything perfect, but I think it's pretty good now. Definitely much better than it was before I began refactoring. Oh! I also want to disable the block's rigidbodies when they are moving less than some miniscule amount. This will allow them to stack better and also take much less processing power! More on that soon.
Now that the blocks are all done, the scoring, awards, level settings and other main game mechanics, I have refactored the chasing scripts. Some cylinder and sphere blocks chase the player when he gets too close. There is a trigger collider on the player that notifies a chaser block through its interface when one enters the collider. In order to prevent the collider from checking every different object it encounters I set it so it only checks the "blocks" layer. I also went ahead and set all of the other layers properly to avoid unnecessary checks since every object doesn't interact with every other object. I made a parent chaser script and two derived classes for each of the different kind of blocks, since they each have their own specific kind of movenent and methods. I also created a separate "GintBlock" script for those specific bocks.