Prototype Week4 – Bug Off!
Due to technical difficulties from last weeks presentation, none of which was our fault thankfully. We did however go out feeling a little robbed of all our efforts. So to make amends we decided to investigate the same game some more. Some of the other teams had done so already with one of their prototypes and granted it was within the rules to continue and expand on an existing prototype, we felt this was the game that required this need. The only caveat was we decided to step it up a notch, which wasnt as bad as it seemed as we had become more familair with unity over the weeks, which also built up our confidence with the tool. We were also becoming much more comfortable with each other and their abilities, so the time was right to spread ourselves more thinly and onto new unfamiliar areas. Firstly, it was time to delve further into the story and experiment on existing mechanics, either polishing them up or adding to them on the programmers side, while on the art side, more detailed models and texturing would be their next stage.
For my task I personally took on the responsibility of creating an in game fly through camera, something I have wanted to do for a while in unity, also investigating if a rewinding feature could be implemented. This rewind action would be called via a button press, namely ‘r’ this would then being the process of reversing the characters movement until the button was depressed, it was designed to remove the need for a life system giving the player a softer punishment rather than a harsh one of restarting from a designated checkpoint. I always thought any type of fly through camera was a better form of narrative in explaining or emphasising points of interest. In our attempt, we utilized this technique by indicating where the character should go next from their current location. It would be implemented as an extra camera that would follow a path, smoothly until it reached its end point, in which event it would switch back to the main camera. The flythrough was borrowed from a google search and massaged into our code. I discovered that the system was using time to calculate the path to follow and this would cause issue when run in game. Basically once started, the flythough camera played. So when the cameras are switched we had not way of pinpinting the position of the flythrough camera which was already making its way around its designated path, which and was also looping back to the start once it completed its full path. So the cheapest workaround with the least rewrite overhead in getting around this was to position and save a prefab in edit mode and save it out as a prefab, later instantiating that prefab with initial positions set automatically. The prefab would then appear and run as if it had been set to run from the beginning, of course some may say, why didnt you just reset the time to zero. Well this is because it was using system time and this is read only. In any event this workaround fixed the issue and was enough to get our point through during presentation time.
The rewind feature on the other hand took a lot long as this idea was quite rare and there was little information on how to do it, I had only seen one game using unity, called Time donkeys and they weren’t doing it as an in game rewind rather a replay system. After 2-3 days of research and coding I came up with a solution that worked, only problem was when time to test I discovered that it did not work as intended against a moving platform. The issue arose due to the rewind not being able to indentify the existing trigger and script that allowed the character to attach and follow a moving platform, so instead you would warp to whatever collider was below. What was most pressing about this bug was that our starting platforms in the game were those that moved, and due due to time constraints I wasnt able to come up with a feasible and stable solution to fix and present. I literally got the rewind functionality working 2 hours before presentation and even then it was in a rough basic form. So we decided not to show this feature and continue with only showing the other things we had added. As for the art we did see some new additions, for example a new model for the character which was created and textured. We managed to get it to perform basic ragdolling, only problem was the ragdoll was applied to another model so it just looked weird when you died and the main character would then swap from the current to an army dude while also going all limp, still got a cheer from the crowd so happy with the result.