Repository navigation
RPS Simulator (v1.0.0)
The first production release of the RPS Simulator!
Features
- Interactive Simulation: Watch entities move, collide, and transform according to classic Rock–Paper–Scissors rules.
- Deterministic Seeding: Control simulation outcomes with a custom seed input; easily apply, randomize, or copy seeds.
- Responsive Canvas: High-DPI support and auto-resizing keep the simulation sharp across devices.
- Customizable Settings:
- Adjustable entity size and simulation speed.
- Configurable starting population per type.
- Two wall modes:
- Bounce: Entities rebound off the edges like balls in a box.
- Wraparound (toroidal): Entities leaving one edge reappear on the opposite edge, like in the game Asteroids.
- Persistent Controls: Most settings are saved locally and restored on reload.
- Visualization Tools:
- Real-time population mix bar with percentages.
- Sparkline chart showing population history over time (a compact line graph that shows trends at a glance).
- Accessibility & Feedback:
- Clear labels and live-updating status indicators.
- Toast notifications (small popups at the bottom of the screen) for key actions such as applying seeds or declaring winners.
Performance & Stability
- Optimized collision detection using a spatial grid (splits the space into cells for faster checks).
- Velocity clamping and overlap resolution ensure stable physics behavior, avoiding runaway speeds or “stuck” entities.
- Safeguards against excessive entities and overly long seeds to prevent slowdowns.
- Graceful fallback for environments without
localStorage, clipboard, or crypto support.