Log In  

Cart #chance_of_rain-9 | 2021-10-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Chance of Rain

A slightly interactive and slightly meditative evolutionary pond simulation


  • ARROW KEYS: control frog
  • Z: surface/submerge
  • X: tongue
  • ENTER: options


This simulation is meant to be watched more than played (though you may interact with it by suggesting actions for the frog).

There are four types of creatures living in this rainy pond: a frog, fish, flies, and dragonflies. Enjoy watching them swim, fly, eat, die, and birth new generations. Flies birth larva into the water which swim towards the nearest rock, where they slowly mature and eventually sprout wings - becoming flies themselves. Well-fed fish will turn green and reproduce when near each other. Dragonflies swarm the lillypad to spawn new. Each parent passes genetic predispositions onto their offspring - which allows for behavior evolution over time. Creatures may die of old age or starvation. All the while, a happy frog swims about - ready to offer a guiding hand (or, rather, mouth) if one part of the ecosystem becomes unbalanced.

Occasionally, you may see some event-triggered haikus or tips to help you further enjoy and understand the game. Statistics about your world will also slide by from time-to-time (and can be triggered manually from the options menu). If your ecosystem fails or you lose a creature type, just keep playing - there are heavy storms that roll in occasionally to replenish your stock.

Every game has randomizations, so each experience will be unique.

DNA System

A DNA system has been implemented that allows parents to pass certain parameters onto their offspring. There is even a chance of slight genetic mutations for each parameter. Through this system, each species will actually evolve its behavior over time to be best-suited to its environment.

  • Dragonflies pass on these parameters to their offspring
    • speed, initial lifespan, threshold for hunger, starvation resistance, tolerance for rain, and others
  • Fish pass on these parameters to their offspring
    • speed, initial lifespan, threshold for hunger, and starvation resistance
  • Insects pass on these parameters to larva which become adult flies
    • speed, initial lifespan, swarming location, tolerance for rain, and others

Full "technical" breakdown of the DNA system:

When 2 parents of any species produce an offspring, the child inherits parameters from the parents. For each parameter, there is a:

  • 33% chance the child will inherit the value from its father
  • 33% chance the child will inherit the value from its mother
  • 33% chance the child will inherit the average value of its mother+fathers parameter
  • 1% chance of a 'genetic mutation' which can increase the parameter beyond defined maximums


Press the ENTER key to adjust these options:

  • If the text scrolls too quickly or too slowly, you may adjust your reading speed
  • If you are returning to the game, you may disable tips to enjoy only haikus and stats
  • If you want a more meditative experience, you may disable the text completely
  • You may also manually prompt gameplay stats to scroll by. This will happen occasionally through normal gameplay, as well.

Creature colors

  • Green: well-fed and fertile - will birth a new generation when a partner is found
  • Red: starving - will alter its behavior to look for food more seriously
  • Grey/Brown: getting old - will likely die soon
  • Peach: just born!

Final thoughts

There is a ton of nuance and complexity to the system but my goal was to simplify the player's experience as much as possible. Furthermore, I wanted to expose as much of the game as possible to the player from within the game itself (hence the tips that scroll by). Creature lifespans can be as long 40+ minutes, so this game was definitely meant to be enjoyed in the background / as a virtual aquarium. Personally, I turn off all scrolling text and leave it on during the workday to observe the system over many hours. I hope you, too, find enjoyment in this experience :)

Itch.io Link



  • Version 9 will be the final update of this project, other than any future bug fixes or player suggestions

Click here for full change-log:

Version 9 | 2021-10-29 | chance_of_rain-9

Increase births

  • Only 1 side has to be fertile for fish and dragonfly
  • Increase fish lifespan to 23m-36m
  • Increase dragonfly lifespan to 14m-20m
  • Dragonflies stay fertile until 1/2 hunger instead of 1/4
  • Well fed fish head towards a submerged frog when fertile
  • Dragonfly hunger threshold lowered
  • 2 larva each time fertile flies meet
  • Drastically lower dragonfly birth rate
  • Rework fly stun/die logic to release flies from the mortal realm more easily

DNA System

  • Create DNA system so parents can pass parameters onto their offspring
  • Implement DNA for fish, dragonflies, and flies (thru larva)
  • Explanation of DNA system: When 2 parents produce offspring, the child inherits parameters from the parents. For each parameter, there is a 33% chance the child will inherit the value from its father, 33% chance from the mother, and 33% chance it will inherit the average of mother+father's parameter. There is also a 1% chance of a 'genetic mutation' which can increase the parameter beyond defined maximums.

Particle System

  • Particles on birth of all species
  • Particles on death of all species except larva


  • Added intro and phrase 1 of e.sati g1
  • Play music on game start - refactor intro text a bit
  • Refactor and add sfx for the new interactions in versions 7/8/9


  • When fish are very close to starving, they will move towards a surfaced frog
  • Flies will still swarm on their fertility schedule even if not fertile
  • Flies revitalized on next storm anytime under 10
  • Fish are allowed to have a single member during a storm without being revitalized
  • Dragonflies die of old age in the action area
    • Fish can eat them - ~2x nutrition of stunned flies
  • Refactor stats haikus and tips to reclaim some compression space
  • Larva birth rate implemented
  • Fish max list count set to 5
  • Lots of rebalancing and tweaking (as always)
  • When creatures eat, their lifespan is extended slightly
  • Increase swarm-xy range - should see evolution over time where insects swarm closer to the rock
  • Increase/rework rand_int range on DNA parameters across all species - should allow greater evolutionary advantages to manifest
  • Repurpose some tips to explain new features

Version 8 | 2021-10-26 | chance_of_rain-8

Dragonfly and fish lifespans

  • Both dragonflies and fish can die of old age
  • Stats for tracking starvation and old-age death stats of dragonfly and fish

Reduce messiness of too many entities

  • Reduced the max list counts of all species
  • Stunned flies in the action area disappear after 83 seconds

Version 7 | 2021-10-25 | chance_of_rain-7

Hunger & lifecycle updates

  • Implement dragonfly hunger (6532->6619 - 87 tokens)
  • Implement dragonfly reproduction/birth (6619->6682 - 63 tokens)
    • dragonflies perform their mating dance near the lillypad
    • new dragonflies are born on the lillypad
  • Add dragonfly birth stats
  • Introduce "well fed" states for dragonfly and fish
  • Add fish birth - 2 fertile fish must collide & tracking stats (6682->6882 - 200 tokens [other stuff was included in this])
    • fertility occurs when a fish is over-fed (well fed)
  • Dragonfly and fish stay fertile until 1/4 and 1/2 hunger, respectively
  • fly fertility color changed to match fish/dragonfly standard
  • track fly and larva birth stats
  • fertile flies are worth an extra 5 nutrition (even if stunned)
  • fix fly and dragonfly despawning bug - rebalance init population sizes and fertility behaviors
  • flies only remain fertile for 10 seconds
  • fish and dragonflies can only be born at most every 60 seconds or 5 mins, respectively
  • flies age slower (hibernate/rest) when its raining too much for them (to help ease impact of long bouts of rain)

Reduce build-up of stunned flies on water surface (introduced in version 6)

  • reduce nutritional values for larva and flies (15&30/35 instead of 20&60)

Big code refactor to prepare for future changes

  • Introduce hunger behavior & refactor fish implementation
  • Reduce token count through some refactoring across the board (~7200->6485) and character count (~63k->58k)
    • mainly removing unneeded variables and functions (prefer inlining)
    • doing some DRY (though this sometimes created more tokens & was reverted)
    • flattening the objects (prefer global) (menu is a good example)
    • doing the math
    • multiple variable assignments on one line
    • introduce "rnd_int" to bucklib
    • comment out debug/unused code
    • remove lillypad movement
  • Deal with char limit reached
    • shorten parameter names in all behavior files
    • shorten variable names (direction->dir, etc)
  • Deal with compression limit reached
    • remove large blocks of comments and some whitespace


  • add current rain to world stats
  • change display order of world stats - creature-first focus
  • raise rock and lilly max_y to avoid overlapping titles
  • add force option to add_tip - force the wave revitalization tip on first storm
  • completely clear stats buffer on text hide
  • do not allow adding to buffer when stats are hidden
  • force storm when any list is 0 (dragonfly, fly, or fish)
  • introduce max list count for dragonfly, fly, larva, and fish
  • dragonfly draw order reversed so fresh births are drawn below flying ones
  • add additional read speed (1.5)
  • various bugfixes and rebalancing
  • fish no longer feed on larva during heavy rain (>70)

Version 6 | 2021-10-23 | chance_of_rain-6

Code refactor to prepare for future changes

  • Cleanup creature controller code for larva and dragonfly and fish
    • break draw & update functions into encapsulated pieces
    • refactor dragonfly execution flow for simplicity and readability
  • introduce birth behavior
  • introduce collision dumping ground
  • introduce "create_individual" paradigm
  • cleanup unneeded direction delay functions (make anonymous)


  • Add menu item to show world stats
  • Better behaved text change speed menu item (press left/right or enter to change speed)


  • Add sticky title to scrolling stats & updated many texts
  • Added to music (still wip)
  • Added a new tip: how to manage a large fly population

Version 5 | 2021-10-23 | chance_of_rain-5

Complete ecosystem failure should be less likely and easier to recover from

  • larva and stunned flies have different nutritional values now
  • fish hunger threshold has been increased
  • if fish population hits 0, a storm is forced on the next cycle
  • if fly population is below 10 (instead of at 0), it gets rejuvenated on next storm
  • ease lifespan suppression for large populations of flies (65->40)

Further limit dragonfly damage to fly populations

  • dragonflies must be in action area to catch flies


  • decrease frog tongue hitbox size
  • fix lillypad left-drift bug

Version 4 | 2021-10-22 | chance_of_rain-4

Limit dragonfly damage to fly populations

  • Dragonflies can only grab 1 fly per screentime - must carry off-screen to eat


  • Change tag line from poetic to meditative
  • Add runtime to world stats
  • Music skeleton (wip)

Version 3 | 2021-10-22 | chance_of_rain-3

  • Bugfix "hide tips"

Version 2 | 2021-10-22 | chance_of_rain-2

  • Capture new label image

Version 1 | 2021-10-22 | chance_of_rain-1

  • Bugfix fish starving haiku

Version 0 | 2021-10-22 | chance_of_rain-0

  • Initial release
P#99046 2021-10-22 19:45 ( Edited 2021-11-08 17:17)


Big hearts to the froggy!

P#99060 2021-10-23 00:24

Just wanted to leave a note that this entire project was inspired by the moody-beauty "rhythmfrog" https://www.lexaloffle.com/bbs/?tid=44923 by @giacomopc

Ultimately my head landed in a very different place but that game was definitely the muse.


Also credit to this very easy to use particle system: https://www.lexaloffle.com/bbs/?tid=32096
And a wave function from this project: https://www.lexaloffle.com/bbs/?tid=37911

P#99356 2021-10-30 02:34 ( Edited 2021-10-30 02:48)

this is really cool. i love stuff like this. its like a well made watch, where underneath is a highly complex system of gears and weights all working together in a complex pattern....just to do the simplest thing, make hands go round to tell the time, or in this case, make a mini eco system. It's kinda beautiful. and the fact that you can jump in an control the frog is cool to. It would be cool if you could choose to control one of the other creatures too, but even as it is, its awesome. would love to see different eco systems, like a forest, or a microscopic one or something. anyway. love it.

P#99396 2021-10-31 00:19

@D0S81 Thanks so much for the kind words

I love the idea of controlling other creatures - I'll look into how hard it will be / if I can squeeze enough tokens out to pull it off.

As far as other ecosystems, I do have an idea floating around my head for a new sim of a 3-tiered waterfall / moss garden sort of thing. That structure would be eye-level / vertical rather than a top-down view like this game. Taking what I learned in this project (and the gap between the vision and ultimate reality of the project), I'd like to focus more on beauty and depth of a single creature - rather than having multiple different creatures with many "simple" behaviors. My vision is having a single insect that has many phases of life - starts off in the water, then on land, then in a cocoon, then becomes a flying insect. In a way, it is multiple creatures - but the circle of life is more focused and expressed. The fly lifecycle in this game is a good prototype for what I have in mind (water -> land -> flying), however they are only a pixel or three big... I'd like to zoom in and really see what's going on.

Anyways -- thats just a bunch of words and who knows if it'll ever happen - talk is cheap :D Thanks again for playing!

P#99434 2021-10-31 19:05

Introductory Haiku needs to be a thing

P#111475 2022-05-07 19:22

[Please log in to post a comment]