← Back to Journal
Architecture 2026-09-08 · 6 min read

Authoritative World Tick Simulation Engines in Go

When building Skyward — an airline tycoon simulation — the initial temptation was to calculate flight progression and market yields on the client. But client-side calculation suffers from device clock tampering, battery drain during offline calculation, and state divergence across mobile and desktop apps.

To solve this, we moved all mathematical authority to a deterministic backend tick worker in Go. The Flutter client acts purely as a reactive viewer rendering server snapshots.

By decoupling calculation from presentation, the world tick loop runs continuously in production on PostgreSQL transactions without relying on any client JavaScript or client state hacks.

“Moving simulation authority entirely to backend workers guarantees 100% fair play, zero cheat vectors, and instant state synchronization across clients.”

// World tick loop in Go
func (s *TickEngine) Start(ctx context.Context) {
    ticker := time.NewTicker(s.interval)
    defer ticker.Stop()
    for {
        select {
        case <-ctx.Done():
            return
        case t := <-ticker.C:
            s.processTickWindow(t)
        }
    }
}