×
SNEKS - Game Rules & Overview
About
SNEKS is a procedural snake ecosystem simulation where autonomous serpentine entities navigate a grid-based world, consuming fruit and interacting with each other through various collision mechanics.
Snake Behavior
- Each snake moves automatically one square per frame in cardinal directions (up, down, left, right)
- Movement is probabilistic - each snake has unique chances to go forward, turn left, or turn right
- The
Wiggle parameter controls base movement patterns (0.0 = mostly straight, 1.0 = very erratic)
- The
Random parameter adds variability between individual snakes (0.0 = all identical, 1.0 = maximum variation)
- Snakes wrap around screen edges (appearing on the opposite side)
Fruit System
- Yellow Fruit (+1): Increases snake length by 1 segment
- Green Fruit (+2): Increases snake length by 2 segments
- Blue Fruit (-1): Decreases snake length by 1 segment
- Fruit spawns randomly at the rate specified in parameters
Collision Rules
- Head-on collision: When two snake heads meet, both snakes are destroyed
- Head-to-body collision: The attacked snake disappears, the attacker grows by half the length difference
- Self-collision: When enabled, snakes die if they collide with their own body
Spawning Logic
- New snakes spawn at the rate specified in
Snake Gen Rate (frames between spawns)
- Snakes and fruits are placed in the largest available empty space
- If no space is available, spawning is delayed until space opens up
Visual Elements
- Each snake has a unique pastel color randomly selected at spawn
- Snake heads appear slightly darker than their bodies
- The chart tracks population dynamics over the last 2000 frames
- Dotted lines show maximum values achieved during the simulation
Parameters
- Frame Duration: Time between frames in milliseconds (lower = faster)
- Snake Gen Rate: Frames between new snake spawns
- Initial Length: Starting length of new snakes
- Fruit Rate: Frames between fruit spawns
- Grid Size: Size of each grid cell in pixels
- Wiggle: Base turning tendency (0.0-1.0)
- Random: Individual snake variation (0.0-1.0)
- Self Collision: Whether snakes die from hitting themselves