Friday, 27 March 2015

Media Test - Level Streaming

For a while now, my game has become very slowly which has been very frustrating. I have been trying to figure out ways of fixing this which has taken me such a long time. The frustration has also slowed my progression in development as I have felt irritated. However, I have now found a solution and have finally fixed this problem!

Level Streaming
Level Streaming is an effective method to make a game much more efficient. It enables you to easily load in or out certain parts of your game. This means that if there is an area that the player cannot see, you can save rendering process by loading this part out and only loading it in when the user is going to see it.

Finding the Issue
At first I thought my level was slow due to so much lighting. I ended up deleting a lot of lights to help improve my game. This helped only slightly. Thankfully, it did not effect the ambiance of the environment too much as it was after all a horror game in which, darkness always entices atmosphere. After further reading I read that fully opaque materials can use up a lot of rendering process. With this in mind, I changed all my opaque materials to be fully visible, however, nothing much improved.

I then looked into level streaming and thought that this actually may end up solving my issues. I found this really helpful tutorial on Youtube:

https://www.youtube.com/watch?v=jqdz9n-7H_A

Using this I quicky tested in by splitting my environment in two. Apart from lots of errors to due coding links being broken etc, it worked perfectly. My game was running so smoothly I couldn't believe it!
I then went ahead and decided to split up all the extra rooms I have and have them stream in nad out depending on where the player is (via trigger boxes).

Media Test - Level Streaming
This has helped dramatically and the only issue  I occurred was in relation to blueprint references and matinee's etc. The reason being, I could not find a way to call these functions/variables in different levels. It was easier for my to just make the assets in the room that were not referenced in blueprint as the level's pieces. E.g with the levels that are not loaded in (the assets are not there) trigger boxes and matinees still sit there.) thankfully these to not take up much memory so it is ok to leave them there.

Personal Notes

This has been an extremely annoying hindrance for my process (the slow frame-rate). I am so glad that I have fixed this using level streaming. This does mean I am a little behind plan but at this point, I am not overly fussed as I am happy to have just solved this major issue I was having. I still aim to have an 'Alpha' version of my game completed on Monday, as well as starting my dissertation.

No comments:

Post a Comment