Works best with Chrome/Chromium
Set as screensaver
debug:
You can use Chrome Kiosk mode in order to use the fishtank as a screensaver.
However, for security reasons, javascript cannot close the browser window automatically so you will need to use Ctrl+W
in order to exit from the screensaver manually.
You can make this run offline by downloading screensaver.html
and run.js
. Put them in the same folder then replace the URL beginning by "http" in the
following commands with the local URL begining with file://
of the screensaver.html
file.
You can find the local URL by dragging and dropping the screensaver.html
file inside a Chrome tab.
chrome.exe
(help){FULL_PATH_TO_CHROME.EXE} --kiosk http://fishtank-io.bitballoon.com/screensaver.html
sudo apt-get install xautolock google-chrome
xautolock -time [time in minutes] -locker "google-chrome --kiosk http://fishtank-io.bitballoon.com/screensaver.html"
I don't know the first thing about OSX, but if you know how to do that just let me know at fishtank-io@mailnesia.com
I should probably explain what's going on here. The three colors are for three different species, and each species eats another one and is eaten by the other one.
The genome of the fishes has numerical values for :
Moreover, each individual has the following attributes :
var -= constant * age^2
The size of the fishes increases with their age, and their color fades to black when their HP approaches 0.
The fishes can win HP by eating food. They win HP, speed and agility when they eat other fishes. They loose velocity when they reproduce.
Their is no explicit fitness function or generation : the implicit fitness being the time spent alive. The longer a fish lives, the more children it will have.
Lastly, the number of fishes is capped for performances issues, so when a species A becomes overwhelming, some of its individuals are replaced by newly generated random individuals of species B (with A preying on B) in order to keep the numbers balanced.
I know it's not very clear, feel free to ask for more details :)