At last new fog of war system is working hiding horrors of hell in darkness of caves.


This is small visibility expiration test run on 400x600 tile map. Each tile has counter how long ago it was viewed and in this example every 100ms process is expiring visibility of long not viewed tiles. In end version i will probably run that process every 500ms but for presentation purpose i need something that changes fast.
There are some fancy clustering algorithms for optimization in work here.
It took some time to shape some nice code architecture to enable encapsulation of systems and interchange of data. In the end i have inspired my self by entity component systems for keeping behaviors code in separated systems and for data management i took some inspiration from Redux. I have data store with current game state that is changed by dispatching actions to it. I needed to make some optimization hooks inside reducers so it isnt clean redux but it works pretty well for managing data.
Added benefit for using redux like stores is easy way to store and restore game state.
0 comments