Evaluation
The first submission of my game was far from ideal. I was not happy with what I had achieved and knew that it needed a lot of work in a small amount of time. The game character was not moveable and the whole game was far from playable. The scenery had a lot of room for development, as well as the game mechanic. Having not used a single script ever within Unity I was dubious about how it would go trying to implement these new scripts, to act with my animations and also to bring the game to life. Having gone through the workflow that is involved in importing assets and texturing objects as well as modeling them was a refreshing experience. It allowed me to work faster having a limited amount of time to get the game from nothing to a playable prototype.
Animation of character redo
I wanted to redo my animations for the character as I wasn't very successful in my first attempt. I initially had the character looping the idle, run and jump animation within the scene. This was obviously not sufficient for a game prototype so it had to change. I went into Maya and edited the whole timeline again, for a more accurate animation. The animation before was rigid and not very life-like. Within the graph editor I was able to smooth out the new animations for a better result. There was also a problem with the animation running too fast on my first import, this was corrected also within the graph editor by scaling the animations keyframes with the help of Mat I got the animation keyframes sufficient for the game. I imported the animations for the second time and split them up into the “idle” “run” and “jump” animations, to allow the scripting to access the animations later on in the process.
Adding in new geometry
I added more assets into the scene not only to richen the environment but to give the player more visual stimulation. This process was a good revision for me as I found that I could test in-game assets within minutes of creating the objects in Maya, allowing the tweaking element of the game to be very efficient. Trees, cars, lamp posts, bin bags, barrels and platforms into the scene since the previous submission. I wanted assets that were practical to the message and environment that I was using for the game, and that had a touch of a cartoon aesthetic to allow them to appeal to the target audience.
Player controls
The player controls were a big step for me in terms of having to develop my skills within a very short space of time. I researched on the Unity website and youtube as well as various other websites for the best ways to script the character using my animations that I created in Maya. I found a good source of scripts that could all be used within my game although al to of them were far too complex for what I was intending to use them for. I found a simple tutorial for a Mario style script. After playing around with the imported animations and the script itself I found that the script worked very well for my game. The ability to smoothly transition between my idle, run and jump animations made the game play more fluent and playable. I also found a script that had a feature to allow the character to turn direction within the air. As my game was a platform jumping game I knew that this was needed and I added it into the “side scroller” script. I had a lot of difficulty getting the overall controls script to work as the default player rotation was difficult to implement. The character faces the camera initially then once moving, turn in the direction of motion, this obviously added to the realism of the game as well as the flow.
All of the gravity controls and character speed were edited in the character controller that was applied to the game character, making it easy to get the right feel to the gameplay.
Game play
In the first approach to the litter picker game, the game play was criticised by Mat for being too linear, which it was. This not only made the game boring, but also easy. I thought of a new angle for the game play. I added a vertical element as well as a collection scheme with a danger element to enhance the play. The player would jump from platform to platform above the street that contained the chemical waste barrels. These were implemented to add the danger for the player while keeping the environmentally friendly theme. The underlying message being pollution is bad and recycling and rubbish collection is good. Albeit a simple message but nevertheless essential to match the goal I intended to approach in the brief. The main goal for the player being to avoid the barrels and successfully collect all of the rubbish bags, therefore cleaning the city street.
GUI
I was not initially going to include the element of a GUI(game user interface) of the game as I had not considered it being an essential property. After testing the first prototype I found it was. I searched the internet for techniques and methods of how to implement this feature using scripts and a few PNG images with alpha channels applied to allow it to visually overlay onto the game screen. There were a few problems when approaching this, firstly the location of the health and the bin bag counter. As the resolution of the game was outputted in a variety of formats, I had to make sure they were visible in most of the aspect ratios provided by Unity. The scripts used for the health bar and the bin bag counter were applied to the character using various online tutorials that I was able to find on the internet. As there was a menu screen that gave the player an option on start up to either, play the game or quit out of the application. Once the game is initiated the player had no option to back out of the level so I also put in a quit option in the top right of the screen to solve this. It was attached to the camera that was then attached to the player allowing the GUI to follow the player as the game played. This took longer than anticipated but I feel it was a nice addition and above all a great learning experience in workflow and methodology.
Animations
One of the suggestions by Mat was to add moving elements into the game to give a slightly more immersive feel. I agreed that this was need to bring the game to life a little. I weighed up what was already in the scene and what could be moveable. The obvious choice was the platforms to move to add further risk for the player when jumping over the toxic chemical barrels. I used the integrated animation system to do this within Unity, it allowed me to save time and I was familiar with the key frame system that it provided. I added animation to the barrels to make the game more challenging, and ultimately more fun!
Scripting
Scripting was a big challenge for me in this module. I have never used javascript since I've been on the course so I knew I would run into difficulties and allocated time to compensate for this. I researched various tutorials online, some were helpful, some weren't. They were mostly applicable to my game but there were a few elements of the scripts where I had to combine a few scripts from a few tutorials. It was a bizarre process for me as it was initially totally confusing writing the Javascript language but eventually beneficial as I've picked up a few core techniques of how to go about scripting within Unity. I ended up adding a lot of scripts to my game. Maybe not a lot for a modern game but I was pleased with the amount I was able to implement in the Litter Picker game. There was a script for the camera following the player and for all the menu systems within the game.
I studied different methods of implementing the re-spawn feature of the game. I knew that it would require this to make it a true prototype. I looked into making a plane for the player to collide into once it fell off the street scene geometry. Also I could have used a script that relied on the Y value of the character, when it reaches a certain height below the scene it would re-spawn. I found this too be impractical as my character wouldn't want to jump off the street. Instead I blocked the path with a few cars on the end of each street and implemented the re-spawn script into the collision of the barrels. I added the toxic barrels into the game, essentially acting as the fall but instead the character would have to avoid hitting these.
Problems and future updates...
I had a lot of problems while trying to get the scripting to work in this game. It allowed me to understand the areas that I was confident in tackling and improved my workflow in these areas. Adding new assets into the scene was a ten minute job allowing for instant game testing of the new objects. The health system was a big problem for me in the game. I started out with a health system that had a bar in top right of the screen acting as the GUI. It had health of 100, 75, 50, 25 and 0. I was able to test the script with a print command within the console and found it to be working, however making it work on the collision was very difficult. I posted my problem onto the Unity website that received a few answers that helped to a degree but still did not make the scripting work. Having tried this one approach I opted for a heart based health system. 3 hearts would act as a three strikes and your out mechanic. However even after researching the heart health system online at the Unity website, I had no luck in getting this to work. Having tried these two methods and running out of time I found a script that allowed me to reload the menu screen on completion of the level, giving the game a definite ending, and fulfilling the intended “prototype game” I had set out to achieve in my brief.
If I had more time with this game I would focus on getting the health system to work on collision with the barrels as well as adding a “game over” screen and a level “complete screen”. This would complete the game prototype and give a more satisfying experience for the player.
The ideal health system would be what I had originally set out to achieve which was a bar that would deal damage of 25 hit points each time eventually ending up with an empty health bar that would trigger the game over screen with a possible “retry?” title.
Having worked very hard on the game myself I feel content with the amount that I was able to achieve within the allocated time. I learnt a lot from this process and feel confident to go on and tackle a more challenging brief that is more orientated into my area of interest.