Developer Notes – FlappyChick v2.0.26.2

Release Date: Sept 2025

Weather System Overhaul

  • Dispersed Rain Implementation
    • Replaced old linear rain with a particle pool.
    • Each drop now has randomized spawn x, velocity jitter (±10%), and independent lifetime.
    • Reduced uniform streaking → now looks like natural scattered rainfall.
  • Snow & Vortex Wind
    • Added snow particle type (type:"snow") with flake size variance.
    • Introduced wind gusts: applied horizontal sinusoidal offset + random turbulence to flakes.
    • Implemented “mini-vortex” effect: per-gust, a subset of flakes get additional angular velocity, simulating swirling snow.
  • Global Weather Manager
    • Centralized with weather.set({ type, intensity, seed }).
    • Each call clears previous weather state (prevents duplicate layers).
    • Weather intensity now scales particle count dynamically (low intensity = ~30%, high intensity = ~120%).

Infinite Maps System

  • 5 Biome Packs Added: Forest, Village, Urban, Desert, Space.
  • Each playthrough now randomly selects one biome pack at start.
  • Within a run, maps are procedurally extended endlessly, but no two consecutive runs repeat the same map pack.
  • Anti-repeat window ensures variety (e.g. if you just played “Village,” it won’t reappear until at least 4 other packs cycle through).
  • Each biome integrates with the new weather system (e.g. snow in Village, sandstorms in Desert, starfields in Space).

Bug Fixes

  • Multiple Suns Issue
    • Fixed duplication bug in village.js where the sky renderer instantiated drawSun() every map segment.
    • Now tracked via singleton sky.sunDrawn flag per render cycle.
  • Weather/Background Sync
    • Fixed race condition where rain was drawn before background gradient, causing “flattened” visuals.
    • Reordered render pipeline → background → weather → ornaments → foreground.

Performance & Stability

  • Optimized particle pool reuse to avoid GC spikes when weather intensity changes.
  • Added clamp for intensity values (0.0–1.0). Values above 1.0 no longer crash particle system.
  • Reduced draw calls by batching rain drops into grouped canvas paths.

Developer Notes

  • Code touching weather: js/world/weather.js, ambient_village.js, random_maps.js.
  • New infinite maps logic: js/world/random_maps.js.
  • Test seeds:
    • weather.set({ type:"rain", intensity:0.5, seed:12345 }) → moderate scattered rain.
    • weather.set({ type:"snow", intensity:0.8, seed:98765 }) → dense snow with vortex gusts.
  • Known limitation: vortex effect doesn’t yet push background ornaments (trees, houses). Planned for v2.0.27.

Leave a Reply

Your email address will not be published. Required fields are marked *