🔒 Hive Security: Preventing Beehive Theft (2D)
2D top-down apiary security lab: toggle a perimeter fence, CCTV/motion light, hive strap & padlock and a hidden GPS tracker, then watch a state-machine intruder get deterred at the boundary, stopped at the hive, or steal and either get recovered or get away.
This 2D companion drives the same layered-defence state machine as the 3D apiary scene through a flat, top-down diagram built for reading the sequence of events rather than orbiting a scene: a dashed fence ring, a sweeping camera cone, three hives with strap and GPS indicators, and an intruder marker that walks in from the tree line make it easy to see exactly which layer stopped — or failed to stop — each attempt. The same finite-state logic as the 3D lab drives the outcome: an approach can be halted at the fence line, caught inside the camera's sweep, blocked at the hive by the strap, or — with nothing switched on — carried off for good unless a hidden GPS tracker later recovers it.
A finite-state machine — approach → (fence-stop | camera-stop | struggle | steal) → resolve — drives one intruder at a time. The camera check compares the angle between the intruder's bearing and the sweep direction against a fixed half-angle, so timing the sweep matters as much as switching the camera on. Security score is a simple weighted sum (fence +30, camera +30, strap +22, GPS +8, base 10, capped at 100) that approximates coverage rather than the exact odds of any one attempt.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install