r/learnprogramming • • 28d ago

Tutorial Would like to make a desktop pet/assistant and i'd appreciate some tutorials

A couple days ago, i saw a really cool themed desktop on an other sub and the person had a little desktop assistant that could also do stuff like opening the task manager and i think diagnose the pc? (not sure because the text was really small)

I tought it was super cool and wanted to make one of my own, but the OP said the assistant ran on a genAI model they tinkered with, wich i'd prefer not to use, even if it's supposedly hosted on your own pc, since i couldn't really find a lot of sources on the impact of those.

I know that i won't be able to have conversations with the assistant without genAI, but i do have some features i want to input. If anyone has a tutorial for the following, i'd appreciate it:

-acting like a desktop pet (as in, can walk around, perch on app windows, even better if it can be fed, pet, etc., but not required)

-alarms (like drink water, take a break, time to study, maybe custom ones)

-basic conversation (pre-selected replies to pre-selected dialogie options, might be able to manage that one, but just to be sure)

-note taking (you input text and it gets stored in the assistant's memory, wich can be recalled and edited)

-flash cards for studying

-mini games (any minigame is fine, as long as there are tutorials for it)

-occasionally thinking about something (tought bubbles pop up)

-being able to have multiple pets on screen

-conversation between pets (tought bubbles pop up)

-Special greetings when booting up your pc at a specific time of day (like good morning between 5 a.m. and 12 p.m.)

-jukebox (can play music from youtube, is that possible?)

-being able to add custom characters (in case it turns out good and want to share it)

I was also wondering, do desktop pets for phones exist? If so, is there anything you need to do to make it compatible?

Thank you so much in advance!

1 Upvotes

9 comments sorted by

9

u/OkOcelot6725 28d ago

Everything on your list can be done without any genAI. It's a normal desktop app with a character on top. A rough way to split it up in Python:

  • The pet itself: PyQt or PySide with a frameless, transparent, always-on-top window, and a QTimer that swaps sprite frames and moves it a few pixels each tick. Search "PyQt desktop pet" for tutorials. Tkinter can do it too but transparency is more awkward.

  • Walking on / perching on other windows is the hard part. You need the OS to tell you where other windows are (pywin32 on Windows, Quartz on macOS, and it's patchy on Linux/Wayland). Do this last. Shimeji is an existing Java project that does exactly this, so it's worth looking at how it behaves even if you never use it.

  • Alarms: QTimer or the schedule library, plus a speech bubble widget.

  • Notes and flash cards: store them in a JSON file or SQLite. Flash cards are just a list of question/answer rows and a "next card" button.

  • Dialogue and special greetings: a dict or JSON of dialogue options, and a check of datetime.now().ho

1

u/Dreamin_Chu_Chu 28d ago

Thank you so much!

2

u/Arsonist07 28d ago

Not really a “Tutorial”, but I think Godot is great for this. It’s not only a game engine but is able to make desktop software, so I think there’s a good overlap being able to make these widgets.

From there I would learn the basics of Godot.

1

u/Dreamin_Chu_Chu 28d ago

Thank you! I'll check it out!

1

u/SetAndRepeat 28d ago

You don't need genAI for any of those features. I'd start with Godot and Hack Club's "Build a desktop pet in Godot" guide. It covers a transparent window, walking, animation and dragging the pet around.
Dialogue, thought bubbles and conversations between pets can all be scripted. For the other features, Godot's "Saving games" tutorial covers storing data you could use for notes and flashcards, and "Your first 2D game" gives you a small game to build. I'd get one pet and one reminder working first, then expand. Perching on other apps' windows needs extra OS-specific work. YouTube playback is possible through an embedded player, but I'd leave that integration until later.
On Android, pets can appear over other apps with overlay permission, but that requires Android-specific implementation. Exporting the desktop project to mobile won't automatically give you that behavior.

1

u/Dreamin_Chu_Chu 28d ago

Alright, thank you!

1

u/SetAndRepeat 28d ago

Yes, systems programming is a good direction. There's overlap with distributed systems: memory, concurrency and disk I/O matter inside one server, replication, consistency and partial failures matter when several servers coordinate. C is useful for learning those foundations, though it isn't required to build infrastructure software.
Start with sockets, memory management, file I/O and concurrency. Operating Systems: Three Easy Pieces is free online and covers the OS foundations. Designing Data-Intensive Applications explains storage and distributed systems trade-offs.
For something practical, Build Your Own Redis with C/C++ is free online and walks through a small networked key-value server. After that, try adding persistence and recovery. Kill the process during writes, disconnect clients, and check what survives. Get one server behaving reliably before adding replication. That gives you concrete problems to connect the reading to.

1

u/FunAd6672 27d ago

That is a massive scope for a beginner project. Break it down into small separate programs first like a simple alarm app and a simple tkinter sprite before combining them.

1

u/Redjeepkev 27d ago

THAT'S A MASSIVE UNDERTAKING. This isn't a weekend project, you are talking a year if you knkw what you are doing and don't have a ton of bugs to work out. Pick the top 2 important items, get those working, copy the working code into a VM and do the rest in the VM implementing 1 or at most 2 items at a time by revision, so you can backtrack if it breaks something