ERA – Week 6 of Production

This week I have worked mainly on the fog of war and the minimap. It has been a pretty tricky process to get it all to fit together.

For the fog of war setup we have worked with an external tool from the unity app-store. This has made it possible for us to get the fog working decently quite fast, but it makes it harder to make adjustments and establish connections to for example the minimap.

The first thing I did this week was look at how the fog of war was implemented. It collects a list of clients (players enemies etc.) that produce vision for their team; it then applies this vision as alpha settings on the pixels to a small 2D-texture. This texture is then applied via a shader to a plane covering the entire map that is positioned between the world and the camera. We want our fog of war to be not completely black, but actually revel the world that is in shadow as well, so therefor we have to make sure to disable all rendering for all characters that are under parts of of the fog of war plane that isn’t entirely transparent.

Having this fog of war texture available was good for me when I was working on the minimap. Unfortunately it turned out that the texture’s colors was inverted before the shader was applied. The areas where the team had vision was dark and vice versa. What I had to do was to go into the code and invert the colors that was set to this texture. I also had to go into the shader and invert how it applied the colors of the texture to the plane. Once this was done though it was easy to simply place a reference-sprite of this texture over the minimap. I could then create minimap GUI representations for all the characters in the game. Converting the world coordinates to minimap positions for these was pretty tricky but after a lot of trial and error I finally got it right.

Towards the end of the week we realized though that we wanted the minimap and the camera angle turned 45 degrees. So this created quite a bit of extra work of refitting the minimap that was pretty tedious to be honest.

About rasmusbjorling

I am a game designer, with lots of projects behind and ahead of me, learning new things every day.
Det här inlägget postades i Uncategorized och har märkts med etiketterna , . Bokmärk permalänken.

Lämna en kommentar