Basement is a drug dealing tycoon game. You take control of an enterprise, that main profile is drugs production. You're hunted by police and mafia, keep your enterprise growing, to achieve great goals.
We have had a lot of thoughts on different graphics enhancements for Basement last times. And a few days ago, i've made one. It's like fog of war post effect, that hides out what is happening outside of explored areas. Here is how it looks in current build.
Technically it's easy effect, but i'd like to describe it in details below.[[MORE]]As you may already noticed, we're using Unity for our game. But it won't matter, cause it can be easily reproduced in any other framework with an access to framebuffer or more user-friendly render textures.This effect is based on a simple principle: we want to render highlights in already observed points and make everything else dimmed. If you'd draw such fx in photoshop, you'll just create a new layer with overlay blending and highlighted drown in white.
To achieve similar effect we'll need to render that texture with highlights. In Unity i've added a new rendering Layer, called FogFX, and attached quad with simple texture to each view, that should be highlighted.
Those shadow circles are overlapping each other. In our case, to avoid clouds effect ( Multiply overlapped edges of circles would be more lightened ), so i've fixed blending in shader, that takes maximal value from alpha channel for current fragment. Here are sources:
All circles are rendered to separate camera. In Unity Pro you have an access to Render Textures, so you don't have to mungle with framebuffers, getting what was rendered that camera. This is what has been rendered to that cam:
The last step is to draw that texture again with proper blending to a usual camera. As we rendered highlights as shadows, i need to subtract color value from that texture. I've also added a float uniform to control fog density. Here is shader source for inverted fx used to render that fog.
Latest tweets from @halfbus_studio
This is how we're shooting basement gameplay video T.co
5hours 40mins ago
Sep 14 2014, 4:07pm
RT @adegtyarev: Finally added custom sprites to font. It'd better be done much earlier. Now it's a lot more easier to work with text http:/…
Sep 14 2014, 8:35am
Sep 13 2014, 3:13pm
Sep 13 2014, 7:27am
Sep 6 2014, 11:21am