ribbybibby / Grimm-Journey

A local co-op multiplayer platformer based in a fairytale world.
0 stars 0 forks source link

[Artwork/Levels] Add some sort of border/account for screen edges? #57

Open ribbybibby opened 9 years ago

ribbybibby commented 9 years ago

We have a lot of chuff hanging around the edges of our scenes, we should look at a pretty way of neatening the edges up and hiding the odd bits of platform that are half-in/half-out of the scene. As a temporary mockup, I have added some big black borders to three sides of the Moving Platform test scene.

ChildOfTheCron commented 9 years ago

Hey all,

With regards to this I looked into shaders for Unity, I'm still trying to wrap my head around CG. But I managed to find a shader online which should allow us to fix this problem pretty well.

I just commited a new scene called Darkness shader test something something. Check it out! I'm still playing around with it.

ribbybibby commented 9 years ago

Ah crap, I didn't see this comment! I just committed some ugly black bars to our main camera as a quick fix for this but your shader looks much better as a border! I'll leave this open for you.

ChildOfTheCron commented 8 years ago

Update - In the interest of time I have a suggestion regarding this. Rather than using the shader approach which is faffy and time consuming, I would recommend a trick that I picked up on a previous project.

We set the project render settings to have the background colour to black. I'm not 100% sure what the setting name is but I can check it out when I get a sec. This bacground colour is what the project uses to colour the scene whenver light is lacking. By default it's a grey colour to allow for something to show up regardless of light. If we set this to a super dark black colour the scene will be completely hidden from the player. What we then do it add a spot light and a directional light.

In a different bug which I'll link in a minute, we want to use shaders to show the encroaching darkness as the players get closer to death. With this solution instead we dim out the directional light by 0.xx over time delta. While keeping the spotight the same. I ran a test a minute ago and the result is the edges become darker and darker and the center (spotlight) stays the same. We can then start fading out the spotlight as the last step before everything becomes black and the players are presented with a Game Over screen.

This is a faster way to achieve a reasonably good result - took my 5 minutes to set up and allows for /some/ flexibility.

ChildOfTheCron commented 8 years ago

Ambient Lighting is the setting I was on about. Windows -> Lighting - Colour. I set this for all scenes we currently use excluding the main menu/intro screen. This needs to be set per scene so if we add any new ones we'll have to do the same. I committed it, now we can tweak the lighting / add fade effects at some stage.