Home How to make your own personal desktop pet in a few simple steps
Post
Cancel

How to make your own personal desktop pet in a few simple steps

Hello world, my name is WillDev (Otherwise known as WillDevv12 plus or minus a v) and I am an aspiring self-taught developer from the U.S. From here on, you will be able to find comments and notes about my different web-apps and programs on this blog.

What is a desktop pet?

A couple days ago as I was browsing the internet, I fell upon a phenominon by the name of “desktop pets”. They are what they sound like, draggable pngs that pose different animations around the clock as a placeholder for empty desktop space. Wanting a reason for a quick and easy project, I thought this would be a perfect thing to nab at. I present: CSharp Desktop Pets.

So how do you use these so called “pets”?

To somebody who frequently messes around with open-source software, installation and usage would be a breeze. Otherwise, something like this may be difficult to pull off. Here are the steps needed to install:

  • Install git bash
    • Git Bash is a command shell that allows you to easily conduct large file transfers with the platform Github. This is a necessity for those who wish to install this program as it is used to install themes, pets, and more. Download git bash here
  • Paste commands
    • Once you have fully installed git bash, you can begin the installation process. To start, open the git bash console and paste one of the following:

Make your own

1
git clone -b new --single-branch https://github.com/WillDev12/csharp-desktop-pets.git   

You can continue the guide here.


Download a template

1
2
3
4
git init
git remote add origin https://github.com/WillDev12/csharp-desktop-pets.git
git fetch origin
git checkout origin/themes -- "Name - Author"

You can continue the guide here.


Building process

To begin your building process, start by deleting the “delete on download” files found around /images and /sounds

Once you have done that, start the following:

Setting up

Enter the /data folder. Inside you will find a file by the name of pet.json. The contents will look somewhat like this:

1
2
3
4
5
{
    "name": "YourPet",
    "width": 200,
    "height": 200,
}

This information is vital to your pet. In order to modify, simply open a text editor and change up the numbers/name.

Any image shown will be automatically adjusted to the width and height (in px) of the pet, so be sure to mind resolution as you are setting up your theme.

Adding images

Once you have completed step one, now it is time to move on to images. To begin, open the images folder and examine the contents. It contains a structure like this:

1
2
3
4
images
|- idle
|- hover
\- click

If not done already, please delete any empty files found in these folders. The program will NOT run properly if these files still exist.

To begin, open one of the folders and drag in some images. The way that the program works is it will randomly deploy a file in the desired folder when the name’s according action is performed. If you do not want an image to be displayed during an action, simply leave the folder empty and the program will revert to an idle image instead. Be sure to add a .gitignore to any empty folders so that they are kept during the push. Do this for every folder until you are satisfied with how it looks.

  • (for example, pictures in /idle/ will be randomly selected if the pet is idle)

(optional) Adding audio

Adding audio works just like images. All you need to do is drag an mp3 into the /sounds folder for it to be played as the pet is clicked.

Congrats! You have made your own desktop pet. To run your program, navigate back to the main executable and double click.

Sharing your theme

To begin, you must have your theme published to github under your own repo. Once that is done, you may continue with the tutorial.

To share your theme, open Git Bash, cd to your theme folder’s parent direcory, and paste the following:

1
2
3
git remote add origin https://github.com/WillDev12/csharp-desktop-pets.git
git fetch origin
git checkout -b themes

Now commit your changes and push!

1
2
git commit -am "Added theme"
git push origin themes

Congrats! You have officially posted a theme on csharp desktop pets.

Prime your template

Once you have recieved your files, search through every directory and delete all .gitkeep files you see. After that, navigate to the main folder, run the executable file, and enjoy!

Conclusion

In this tutorial I have shown you how to make your own desktop pet. If you enjoyed this post, please share it or star my blog altogether. Also, be sure to check out my profile if you havent already. Stay safe and have a good one.

Thanks for reading,
WillDev12

This post is licensed under CC BY 4.0 by the author.
Contents