Sunday 19 February 2017

Loop and instantiation


BasicsKnowing that I wasn't able to demonstrate loop or instantiation for my first prototype I decided to make it my first goal for my second prototype. As my plan was to display loop and instantiation through creating snow in blueprints didn't work out. I needed to research methods of how I can use these in my game. I spent too long trying to suit my plans for prototype 2 to fit these programming prototypes that I decided to throw out the plans and design a level suited to the concepts. I keep the same setting and genre but change the whole level design. While this wasn't the best method, I did find that I was able to design a better prototype with more complex concepts as a result. 


How- I watched a tutorial called 'Endless Runner: Spawning the Course' (Unreal Engine, 2015). Which taught me how to spawn floor tiles into the game world. First I created an actor class called 'Spawn_Floor' and created a function. This function 'Get Attach Transform' tells the class where the next floor tile needs to attach from. The attach point is positioned at the end of the floor tile for the next tile to spawn from

Within the game mode class, I created a new function to spawn floor tile. The node 'SpawnActor' allows me to find the class of the actor I want to spawn and the position 'spawn transform' of where I will it to spawn too. This blueprint reference the blueprint above to where in the game world does the floor tile need to spawn. So the floor tile will spawn at the attach point. 


Again within the game mode class, I say when I want the spawn to start. For this, I said 'Event BegainPlay'. Which is when the level starts. Next, I used a 'For Loop' to specify the number of times I wanted 'Add Floor Tile' to occur. As I only wanted two tiles I put 'Last Index' as 1 (this is because blueprint starts counts from 0).

Back in the 'Spawn_Floor' class I added a collision box and added collision handling. When player collides with box activate 'Add Floor Tile' which spawns in a floor tile. Then 'Destroy actor' which destroy the floor tile. 


Testing-
While testing I discover an error I did not think I won't find. In my second level, I had trigger boxes which had text visual when the collides with it. When I was placing then through my scene 
I discovered that on the path there the floor tiles will spawn I wasn't allowed to place any trigger boxes. If I did the game would crash. As a result of discovering this unforeseen error, I decided to use rendered text already visible in the game instead of text that appears. 






Why - As there is no clear path and there is no floor set I wanted to create a small but uneasy feeling when the player uses these floor titles. The player will feel safe on the ground that doesn't disappear after you step off it. I wanted the feeling of uncertainty when the player walks across these floor tiles. 


Other that the floor tiles there are many other ways I have tried to get the horror theme across through mechanics and visual style. After the player gets off the floor tile bridge they are greeted by a skull coated in red light. Both the colour red and a skull are semiotics of horror and death. I wanted this semiotics to be a foreshadowing of the player's death in the next scene where the player is lowered into a grave. 


For this prototype I decide to use the first person camera model and for the player to interact with the game world through an unknown avatar. Basically an avatar interaction model. The reason why is to add to the horror theme. If you playing with an unknown avatar you are more likely to relate that avatar as yourself. I want the player to experience the game through their own eyes and I can achieve this through using first person camera model. This is to make the horror more real for them. 




Industry expectations


Usability: This blueprint class is easy to use and to edit. I had no issues when I want to change something. When I had an issue with the trigger boxes I was able to find the cause by looking through the class and seeing no errors.


Ready made libraries - I was able to find spawn actor from the ready made library. Without that node, this would have taken a lot longer to write out. 


Re-usability - For this blueprint, I was able to use it in two of my levels. So it is reusable within the same project as least. A big issue I could see is the fact that I used the game mode class. If I was going to re-use this blueprint in another project I might have to copy the blueprint from the game mode class of this project into the game mode of another project. To sum up I don't thin you could re-use this blueprint in another project.


On the other hand, I was able to migrate a blueprint class from 'PressE' from my prototype 'Timmy's Adventures'. I was surprised how easy it was and how it worked perfectly when I tried it out a level. This has proven to me that you can re-use well-designed blueprints from one game to the next. I used this class in the level 'Cathedral2' and the only thing I needed to change was the text I wanted to display. 


Time Management 

Having 11 days to go until the final deadline and only completing the two tasks from the previous section isn't the use of time management. On the other day if I complete the 'Array' task soon I will be able to focus on the work I need do for this section of the project. 



Bibliography

Unreal Engine, (2015). Endless Runner: Spawning the Course | 02 | v4.7 Tutorial Series | Unreal Engine. [online] YouTube. Available at: https://www.youtube.com/watch?v=3om6yJiYMcg [Accessed 19 Feb. 2017].

No comments:

Post a Comment