Virtual pets might be 20 years out of style, but if you're looking for a miniature desktop friend, Adafruit has a guide to build a little emoting creature you can call your own.
To be build this, you'll need about $US40 ($53) worth of parts, including a small LED Matrix and Adafruit's Pro Trinket board. The whole thing's packed into a 3D printed case, but it's small enough you should be able to have it printed for cheap.
You'll also need some basic soldering skills, but overall the assembly and code here is super easy to work with. The end result is a little desktop companion that gets sad when you ignore it, annoyed when you push its buttons too much, and happy when you're doing everything right. Silly? Sure. But it still makes for a great learning project that results in a cool desktop toy.
Adafriend the Virtual Pet Cube [Adafruit]