SpriteKit
Bye bye callbacks! Combining Combine and SpriteKit
04-04-2020
Consider a simulation game. The game probably has some entities, wether it's cities, cells, soldiers or reindeer. Now consider it is a turn based game, where the simulation advances on a "tick" basis. Before and after the tick, the state of the simulation will have changed, so for instance your cells might have a different color and your reindeer might have moved. Your visualization should update accordingly.
Due to the complexity usually involved with simulation models, your modal is probably a self contained unit, that perhaps knows nothing about UI stuff. Or it shouldn't anyway, because why would it care? Can we use Combine with SpriteKit to simulate the "automagical updating" of SwiftUI. Yes we can!
Read Moreā¦
Due to the complexity usually involved with simulation models, your modal is probably a self contained unit, that perhaps knows nothing about UI stuff. Or it shouldn't anyway, because why would it care? Can we use Combine with SpriteKit to simulate the "automagical updating" of SwiftUI. Yes we can!
Read Moreā¦