Updates in this Iteration
The original plan in this iteration was to create Factories, but there was a unity update that makes it possible to do deferred rendering. So before i add more buildings, that all got obsolete soon, i decided to do a big graphic update instead.
New UI Style
I got some feedback, that the UI colors were too bright and not really fitting to the style of the game, so i tried to improve this part also. I choose now way darker colors.
With the new Unity update it was possible to use deferred rendering, what makes better lighting with the entity system finally possible. Before, the lighting was prebaked, now its calculated in realtime. Due to this it was possible to split up the buildings to different objects without breaking the lighting, so it was a very big refactoring of the buildings and settings.
The shadow of the sun is also working now.
A possible change in the next iterations will be custom buildings. So like in many other building games, the player can add the interior where he wants and also enhance it with other interior than the needed ones for the work. To make this work i refactored a lot in this iteration. I created empty 5 buildings with different sizes and used them to do the current buildings.
To make it usable for all kinds, the walls and floor textures can be changed on runtime, so different buildings will reuse the main textures and the complete model.
To make the small storage inside of a building work, i created a mechanism to cut parts out of the model, so at runtime the holes needed for them are done.
Interiors are now separate objects inside of the model. All settings related to it, like the action points, animation paths or the storage-settings are moved to there.
Buildings have now interior bounds what is now used for path calculation for the persons and later to know where the player can place the interior.
Besides all of that, the work is separated to a different object, to be also choosen later from the player, make one internal storage can be reused by multiple works and changed the internal coordinate system. To round everything up, i generated the lights to have a balanced lighting inside of the building.
Other smaller changes
- Fixed Animation of Unconciousness was looping wrong
- Fixed not updating Animation when staying in the building
- Readded Legend for inner Details
- Fixed person Icons had no background-color on first selected building.
- Fixed flickering of UI in some special situations
- Fixed Crash related to not canceled Tasks after destroy a building (Thanks to Ichao for report)
- The Dismantle button got an icon instead of a text.