Skip to content

Mukund2/ServerRush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server Rush

Why This Exists

The data center industry is in crisis. Nearly two-thirds of operators report difficulty finding and retaining qualified staff. The AI boom demands tens of thousands more engineers, with global data center demand projected to grow over 20% by 2030 — yet the construction workforce alone faces a projected shortage of 3.2 million workers by the end of the decade. The people who will fill these roles are teenagers right now, and they've never thought about what happens inside the buildings that power every app on their phone.

Video games are how the next generation discovers what they care about. Hay Day made a generation romanticize farming. City builders made kids dream about urban planning. Server Rush does the same for data infrastructure — it takes the invisible backbone of the internet and turns it into something you can see, touch, and fall in love with. If we want to close a workforce gap of millions, we need to start by making the work feel exciting. That starts with play.

Sources: Uptime Institute Global Data Center Survey 2025 · IEEE Spectrum · Brookings


What Is Server Rush

A cozy data center tycoon where incidents are the star of the show. Inspired by the charm of Hay Day and Stardew Valley, it swaps crops and barns for server racks and cooling units — warm earth tones, bouncy animations, and a world that grows with you as you expand from a single closet into a sprawling facility.

Build server racks, keep them cool, power them up — then firefight a nonstop stream of crises by dragging the right tool onto the right rack before everything melts down.

An AI guide character named Chip roams your data center, powered by Mistral AI. He reacts to what's happening in real time — warning you about incidents, celebrating milestones, and answering questions when you tap him. His voice is brought to life by ElevenLabs, giving Chip a distinct spoken personality that makes the experience feel alive rather than text-on-screen.

Built for the Mistral AI Worldwide Hackathon (Feb 28 – Mar 1, 2026).


Gameplay

Build Phase

Place equipment on an isometric grid to grow your data center from a single closet into a sprawling operation.

Category What it does Equipment
Servers Generate revenue Basic Rack → Advanced → Enterprise
Cooling Prevent overheating AC Unit → Cooling Tower → Liquid Cooling
Power Supply electricity Generator → UPS → Industrial PSU
Network Add bandwidth Switch → Firewall → Load Balancer

Incident Phase

The real game. Incidents telegraph 2 seconds before going live, then you drag the matching tool to fix them:

Incident Tool What happens if you don't
Overheating Fire Extinguisher Racks take 4 damage/sec, lose 50% revenue
DDoS Attack Shield 2 damage/sec, lose 70% revenue
Cable Failure Cable Plug 3 damage/sec, lose 30% revenue
Power Outage Wrench 5 damage/sec, cascades to nearby racks

Incidents get more frequent as you add more racks. By the time you have 10+ racks, you're in full whack-a-mole mode.

Expansion

Start with a 6x6 grid. Buy expansion tiles at the edges (Hay Day style) to unlock larger areas and higher-tier equipment. Three expansion zones scale from $800 to $5,000.

Progression

Milestones guide you through the game: build 3 equipment, earn $1,000, resolve 5 incidents, purchase your first expansion, and so on. Each milestone triggers a popup and unlocks new goals.


Chip — AI Guide (Powered by Mistral)

Chip is a round orange character in a hard hat who wanders your data center. He reacts to what you're doing with short, personalized quips generated by the Mistral AI API:

  • Celebrates when you build or hit milestones
  • Warns when power or cooling is overloaded
  • Comments on your revenue, incidents, and expansion progress
  • Falls back to local dialogue strings if the API is unavailable

Chip calls mistral-small-latest with rich game context (money, revenue, equipment count, incident status, resource percentages). API usage is throttled to max 1 call per 45 seconds.


Architecture

SwiftUI (HUD, menus, guide)  <-->  GameState (@Observable)  <-->  SpriteKit (iso world, sprites, particles)

21 Swift files, ~6,000 lines. Single GameState source of truth shared between SwiftUI overlays and the SpriteKit scene.

Key Components

Layer Files Role
Game Loop GameScene, SimulationEngine, IncidentScheduler 60 FPS rendering + 1 Hz simulation ticks
Input InputHandler, CameraController Tap-to-select, drag-to-build, drag-to-fix, pinch zoom + pan
Rendering IsometricUtils (TextureFactory) Programmatic isometric sprites with per-category visual details
Models GameState, Equipment, Incident, Level All game data, equipment stats, incident definitions, milestones
Services MistralService, ElevenLabsService, AudioManager, SoundEngine Mistral API for Chip + ElevenLabs TTS + haptics + procedural sound effects
Views ContentView, HUDView, BuildMenuView, RackInfoView, etc. SwiftUI overlay system
Design Theme Centralized color palette, fonts, spacing

Project Structure

ServerRush/
  Game/
    GameScene.swift            Main SpriteKit scene (rendering, particles, guide AI)
    IsometricUtils.swift       Coordinate math + programmatic texture generation
    SimulationEngine.swift     1-sec tick: revenue, resource balance, damage, milestones
    IncidentScheduler.swift    Random event spawning with telegraph system
    InputHandler.swift         Touch handling, drag-to-fix
    CameraController.swift     Pinch zoom + pan with inertia
  Models/
    GameState.swift            @Observable central state, save/load
    Equipment.swift            12 equipment types across 4 categories
    Incident.swift             4 incident types, tools, active/telegraphed models
    Level.swift                Milestone definitions and progression
  Services/
    MistralService.swift       Mistral API integration for Chip
    ElevenLabsService.swift    ElevenLabs TTS for Chip's voice
    AudioManager.swift         Haptic feedback patterns
    SoundEngine.swift          Procedural sound synthesis (AVAudioEngine)
  Views/
    ContentView.swift          Root view, phase-based routing
    MainMenuView.swift         Title screen with server illustration
    BuildMenuView.swift        Collapsible equipment selector
    HUDView.swift              Resources, objective tracker
    RackInfoView.swift         Equipment details, upgrade/sell
    IncidentAlertView.swift    Active incident list
    AIGuideView.swift          Chip's speech bubble with typewriter effect
    ExpansionConfirmView.swift Purchase confirmation modal
    LevelCompleteView.swift    Milestone achievement popup
  Theme.swift                  Design system (colors, fonts, spacing)
  ServerRushApp.swift          App entry point

Visual Style

Warm, cozy Hay Day / Stardew Valley aesthetic.

Role Color Hex
Background Warm cream #F5E6D3
Cards Soft tan #E8D7C6
Primary accent Warm orange #E8985E
Secondary Warm gold #D4A574
Positive Sage green #7DB77D
Critical Warm rust #D85B56
Text Dark brown #3D2B1F
Wood accents #A0845C

All sprites are generated programmatically at runtime (no image assets). Equipment blocks are isometric with category-specific details:

  • Racks: shelf dividers, LED status dots, side ventilation slits
  • Cooling: fan circles on top face, grille lines
  • Power: lightning bolt, gauge panel, battery indicators
  • Network: port grids with active link highlight, antenna stubs

Fonts use SF Pro Rounded throughout (monospaced only for the money counter).


Tech Stack

  • SpriteKit — isometric game world, particles, animations
  • SwiftUI — all UI overlays (HUD, menus, modals)
  • @Observable (iOS 17+) — reactive state management
  • Mistral AI APImistral-small-latest for Chip's dialogue
  • ElevenLabs API — text-to-speech for Chip's voice
  • AVAudioEngine — procedural sound effects (13 synthesized sounds, zero asset files)
  • XcodeGen — project generation from project.yml
  • UserDefaults — JSON-encoded save/load

No external dependencies. No CocoaPods, no SPM packages.


Building

Requires Xcode 16+ and iOS 17+ simulator or device.

# Generate Xcode project and build
cd ServerRush
xcodegen generate
xcodebuild -project ServerRush.xcodeproj \
  -scheme ServerRush \
  -destination 'platform=iOS Simulator,name=iPhone 17 Pro' \
  build

# Or open in Xcode
xcodegen generate && open ServerRush.xcodeproj

Game Mechanics Reference

Resource Balance

Racks consume power, generate heat, and use bandwidth. If any resource exceeds capacity:

  • Power overload: racks take 2 damage/tick
  • Cooling overload: racks take 3 damage/tick
  • Bandwidth overload: racks take 1 damage/tick

Equipment Health

Range Status Effect
61–100 Normal Full revenue
25–60 Warning Full revenue (yellow indicator)
1–24 Critical Full revenue (red indicator)
0 Offline Zero revenue, takes up space

Incident Frequency Scaling

Racks Interval
0 30–45s
1 25–40s
2–3 18–30s
4–6 12–22s
7–10 8–16s
11+ 5–22s

Expansion Zones

Zone Cost Grid Unlocks
Starting Free 6x6 center Basic Rack, AC Unit, Generator
1 $800 10x10 Advanced Rack, Cooling Tower
2 $1,500 14x14 UPS, Network Switch, Firewall
3 $5,000 16x16 Enterprise Rack, Liquid Cooling, Load Balancer

Save System

Game state is automatically persisted to UserDefaults as JSON. Tracks money, all placed equipment, expansion state, unlocked equipment, milestones, incident stats, uptime, and play time. Continue from the main menu to resume.


License

Built for the Mistral AI Worldwide Hackathon 2026.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages