HexEngine
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…
Codable conformance for ECS system revisisted
01-04-2020
In the post I demonstrated a way of adding
Read More…
Codable
conformance to the GameplayKit ECS system. For another game I'm working on (HexEngine, source here: https://github.com/maartene/HexEngine) I experimented with a different solution, that I now feel is more elegant.Read More…