Adrianotiger / desktopPet

Remembering the lovely eSheep (stray sheep) from 1995 -

Home Page:https://adrianotiger.github.io/desktopPet/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limit number of pets on the screen

Adriansun opened this issue · comments

Let us say that I start with 3 pets when the program launch. After some time I might have 9 sheep on my screen. I think that if I limit it to 3 at start up then it should stay at 3. Or an extra surprise sheep at some point. But 9 sheep is a bit too much.

It is an animation bug, not application bug.
Every animation can create a "child". This child should disappear after a while (killed or exit from the screen). In the last version of the green sheep, this is not done and so the childs (new animations created from the main mate) remains on the screen.

In future, I could create a timeout timer on each child and force it to be removed after 1 minute for example - even if it is not the best solution: it limits the application.

I still have this idea that if there could be more interaction with the pet, you can for example create a Super Mario game directly on your screen, where Mario (parent) will generate a lot of cubes (childs) on your screen and you can jump over them. This cubes should be stay there for more than 1 minute.

I feel like 1-2 minutes is more than enough for most animations, would definitely be a decent amount of time.

I don't remember how the pet files look, but would it be easy enough to parse over it and check the max time of all the animations in the file and possibly just double that for the default max timeout?

This is something i have removed from my latest version releasing soon. There will no longer be additional sheep spawns (except for the king sheep, which will disappear eventually now as well).