~ $ cd projects/fibergochi && cat README.md
The Fibergochi
A Tamagotchi, but the pet is a student at the FIB, the computer science faculty in Barcelona. It has to study for exams, find a free terminal for its labs, sleep, go to the bar with its friends, and not get bored or stressed, until it gets its degree, or it is thrown out. I wrote it in JavaScript in the winter of 1999; the code is signed Night. It was one of the first interactive pages I made.
This is the version of 2 March 1999, the one that was online, with its own drawings. I drew them pixel by pixel in February, as sixteen-colour bitmaps, and made them into GIFs for the web. Its words were in Spanish, and here they are in English.
by Night

- exam nothing to study
- lab no lab to do
- terminal no terminal
The keys on the egg are its own little drawings; the mouse over one says what it does. Study/Sleep sends it to study or to bed, and it decides which: it tosses a coin. Find terminal sends it to look for a free terminal, and once it has one, it does its labs there on its own. http sets it browsing, if it holds a terminal. Bar takes it for a drink, and it stays for as long as it has friends there; Friends makes more. Beg is for after the last day of class: it begs for the subject nearest to passing, and three times in ten it works. alfa tells the score.
The three lamps beside the drawing are an exam to study for, a lab to do, and a terminal held. After the last day of class the first two blink, and under the date it says how much there is of each.
It has habits. What it has lately done most, it goes back to on its own: a student who chats more than works drifts from the lab to http, and one who drinks more than studies is taken to the bar from the books, easily by day and hardly early in the morning. The habits fade a tenth every day. Looking for a terminal and begging stress it, and the bar calms it down. The terminal rooms were classrooms too, and in the middle of the day a class can turn it out.
A day has sixteen hours, and a term has twenty-five days, twenty of them with classes. The marks come out on the twenty-second day. A subject is passed if less than an hour of work is left on it. It had three speeds, and has them here: a step every second, which it starts at, every 0.4 seconds, and every hundredth. The drawings move on a clock of their own, whatever the speed. Time passes only while the egg is on screen. The Fibergochi is kept in your browser, as a cookie kept it then, and new starts another.
Left alone, it is thrown out for boredom on the sixteenth day of its first term.
The rules of the faculty
It starts in the Fase de Selección, the first phase of the degree: nine credits, and in this game a credit is a subject. Anyone who has passed none after two terms is out, with a single word: BACARRA. After four terms, anyone more than two credits short is out. Anyone one or two short is let through, but only to the Técnica, the shorter degree, twenty-five credits more. Anyone who passes all nine chooses: the Superior, forty, or the Técnica.
After that come the alfas: for each of the last six terms, the credits passed over the credits taken. Four of them below half, and it is out. More than a hundred of stress, and it leaves. And anyone who finishes the degree gets two messages, the second of which is an error in KERNEL386.EXE, because nobody was expected to get that far.
What the code of 1999 says
The notes at the top of the file tell how it was made. I did not know how to use arrays in JavaScript, and I had no internet connection to find out. So the ten subjects are ten variables, credito0 to credito9, and they are reached by building the variable's name and evaluating it:
function LeerArray (nom, index)
{
return eval (nom + index);
}
A browser kept only twenty cookies, which was not enough for a cookie per number. So all fifty numbers went into one cookie, four characters each, which is why every number in it had to stay between −999 and 9999. The notes also warn that Netscape did not tell upper case from lower case in names. So anything changed was to be tried in Explorer first.
Two things were wrong, and are mended here. A student let through to the Técnica after four terms was never taken out of the Fase de Selección, so the next term threw them out after all. And the score counted its alfas starting from nothing at all, not from zero, so it always found a spotless record. Two slips in what the score says are mended with it: it counted the subjects to pray for with the count of the ones going well, and numbered the alfas from the oldest as if it were the latest. The rules are otherwise as they were.
Where it was found
The copy I had kept was of 15 February, two weeks before this one, and in it the bar, the friends and begging did nothing yet. The version of March was on the Internet Archive, from the university server it lived on, but not its drawings. Those were on a backup disk, the bitmaps beside the GIFs.
The credits in the code give the original idea to Sardakuar, and the idea of actually making it to Josep Llosa, "who does not know we have mentioned him, or does".