Tutorial: Adding A Plant to Plant Therapy
Adding A Plant to Plant Therapy
Plant Therapy is a cozy plant collecting game built in Unity. Our small team has been working on this project for over a year. Each plant takes 10 hours or more to be created and animated and added to the game. Currently we have 60 plants in the game and have plans for many more. I am sharing a brief description of the process.
Design and Research
I maintain a spreadsheet with all the plants I want to put in the game. This is where I keep track of descriptions, pricing, sizes, rarity, when and how they unlock in game, whether they trigger an achievement, and whether they have been added to the game. I think about the popularity of houseplants in general as well as size, texture, colors, etc. to create a wide variety of plants in the game. Frequently, I take my own photos of plants I want to draw but also use library books and internet searches for more info. All of the plants in the game are based on real plants. It was important to me not to have any made up plants because I would love to inspire people to find the same plants in real life.
I took a photo of this corkscrew rush plant at my doctor’s office. I love the textures and whimsical look. However, I decided to make a different corkscrew type plant, the Albuca Spiralis, that has clearer stems and larger corkscrew elements.
Drawing the Plant
I draw all the artwork for the game using a combo of Procreate and Adobe Photoshop. I draw them all several times larger than they will appear in the game so that when they are resized they will maintain detail. All the plants are drawn first in Procreate and saved as a PSD file in order to maintain the layers. Each plant can have up to 6 layers, not including blooms. Then, in Photoshop I convert them to a PSB file so that the layer order will be saved when I import into Unity. PSB files can support much larger images, which is great for the detailed plants. All the other images, such as the artwork and furniture for the apartment are saved as PNG files.
I usually have to break each plant in several layers so when they are animated I can have full range of motion on the different stems or prominent leaves. Sometimes I draw just a few leaves without stems so I can make the plant look fuller but avoid needing to animate the stems themselves.
Importing into Unity
I have a 70 plus point checklist that our programmer Randy devised for importing and animating each plant. He did all the animations at the beginning of the project and can do them much faster than me!
First, I drag the PSB file of the plant in the game. I have to change the scale of the plant to fit the game. I add a terracotta pot to the game scene and test the size there. Instead of doing it with the sizing tool, we change the pixels per unit in the PSB importer. Then I open the sprite editor and add the rigging. I also need to make sure the plant is assigned to the correct layer or it will render behind the pots.
Rigging and Animation
It takes a while to get used to adding the bones, adding geometry, and then weighting the bones. Unity frequently makes the wrong assumptions about where splits should be in the geometry, so it is key to go over every point carefully and add vertices and splits as needed. It can also accidentally weight the images bizarrely so that takes some adjustments as well. If you miss it and then begin animating, weird things will happen and you have to go back and adjust. (I am currently researching using Spine to do the animations outside of Unity and then import them in but for now I am just sticking with the basic Unity tools that work fairly well.)
I tend to add too many bones to the layers because I like to tweak and adjust every little thing. However, a little bit of movement goes a long way, especially when you can end up with 20 plants in one scene. Once the rigging is done, press apply and close the sprite editor. It’s now time to animate.
Each plant has an idle, happy, and sad animation. To make things easier for importing, we duplicate an already created plant animation set and then rename and set all the animations to the new plant. Then I delete the old animations out and record new animations for the new plant. I also have to make sure the new animation controller gets connected to the new plant. The idle and sad animations loop and the happy animation will play once and revert to idle, so each one needs a different length. Remember to press the record button when you make adjustments to animations. Otherwise the work will not be saved.
Besides animating, each plant needs to have an anchor point set to where it will sit in the pot and I also need to set the various coin spawners to where I want the coins to appear in game. I also adjust whether the plant blooms, and make sure all images and animations are in the right spots in the editor.
Adding to the Database
The nearly final step is to add the plant to the Plant Database so that it will show up in the plant shop in the game. This means creating a new plant ID and configuring items such as price, description, size, when available, again if it blooms, achievements associated, if any, and whether the plant needs to be in a hanging pot or maybe can only be on the ground. Also remembering to connect the prefab of the plant with the item in the database. Lots of tiny details that are easy to miss.
Testing
It’s so easy to want to skip this step and just push the add to GitHub, but it’s key to play the game in Unity and make sure the plant shows up at the appropriate time in the correct level and that the animations are working. We have hidden dev tools that are easy to unlock when play testing in unity so I can keep cycling the plants through in the shop and make sure the newest plant is installed.
Adding to the Game
Once I’ve tested and double checked everything is working then I can push my add through GitHub. It’s easy to forget things like deleting the pot you added to the game scene for sizing and then it will create a conflict. With three people working on the game, we have to communicate well.
Thanks for reading about adding animated plants to Plant Therapy! Look for new plants coming soon in our next update.
//Jennevieve
Get Plant Therapy
Plant Therapy
Get cozy in this plant collecting and decorating game!
Status | Released |
Authors | Short Leg Studio, WhereTheRedfernCodes, Randy Larson, Short Leg Studio, cindytrivera, Jennevieve Schlemmer |
Genre | Simulation |
Tags | Casual, Clicker, Cozy, Cute, Gardening, Idle, plant, Relaxing, wholesome |
Languages | English |
Accessibility | Interactive tutorial |
More posts
- Plant Therapy Coming to Apple StoreAug 19, 2024
- A Big RefreshJul 16, 2024
- A Few Fixes for the New YearJan 04, 2024
- Expanded Vintage Shops and Quality of Life fixesNov 18, 2023
- Shopping fixesOct 11, 2023
- Simpler Tutorials and a few other UI fixes.Oct 09, 2023
- Spooky Season Is Here!Oct 05, 2023
- Spooky Season is Here!Oct 01, 2023
- UPDATE: Upgraded Watering Can and Fertilizer Subscription Now in Downloaded Vers...Sep 25, 2023
- Plant Therapy and Queens DLC now on SteamSep 21, 2023
Leave a comment
Log in with itch.io to leave a comment.