Create a Virtual Pet Game in Unity and C# (Cross-Platform)
Game developers can make a full Virtual Pet style game in Unity using C# for iOS, and Android with assets included
Course Description
In this course you will learn how to build a classic Virtual Pet Game
for mobile devices with Unity and C#.
We will focus on the main features of modern games in this genre. In this course we will create: an animated character, progress bars to display the needs of our pet, a simple in-game shop with scrollable content, a custom mini game and so on.
You will gain access to all the C# scripts that are used to build this game right in the beginning of the course, but we will take a closer look at each of the scripts before we use them. This approach will help us save a lot of time instead of typing in the code manually and it will let us build a more interesting and complicated game. Among all the scripts provided with this course you will get a free asset to create sliding menus in any of your future projects.
I have tried to save the project that I was working in as often as I can so that you can easily pick up the material from any point in this course. All these projects and the assets used to develop our example application will be available for download with this course.
The material in this course is divided into 5 Sections.
Section 1 includes a short overview of the project that we will be making in this course.
In Section 2, we will create a basis that is used for any virtual pet game a system that will constantly demand care from our players in different categories. In this game we will have categories for food, sleep, taking our pet for a walk and playing with our pet. We will make custom progress bars to display our pet`s current needs. In all the other Sections of this course we will come up with different methods of interacting with our Care system to restore care points.
In Section 3, I will show you how to create sliding menus using a free asset provided with this course. We will learn how to lay our pet to sleep to restore his Sleep care points. And we will create an in-game shop with scrollable content that will allow us to buy food items for our pet. Eating these food items will restore his Food care points.
In Section 4, we will focus on animating our pet character. We will try to make the most out of the art assets that we have to create an interesting character with diverse behaviors. You will learn how to manage complex state machines in Unity`s built-in Animator component. We will discuss grouping animations by creating sub-state machines. We will give our character an ability to move in the scene. This is not used in every virtual pet game, but we will later need this feature for our mini game. We will add a new Training
system to our game that will allow our players to give commands to our pet (sit, bark, look around based on the animations that are available for this character)
In Section 5, we will add 3 new scenes to our project: a starting scene, a game over scene and a scene to take our pet for a walk and play our mini game. We will create a fun mini game that will let our players get our in-game currency to buy more items from the shop. We will add a speech bubble for our pet to send some messages when he needs something from our players. In this Section we will make our Health HUD functional. If the health of our pet drops to 0 or below the game will end.
By the end of this course we will end up with a fully functional virtual pet game. In the last lecture I will build this game and show you how it looks and feels on an actual mobile device.
BONUS
Among all the scripts provided with this course you will get a free asset to create sliding menus in any of your future projects. Typically, asset of this quality would sell for $25 or more in the Unity asset store.
This asset is designed to work with new Unity UI. It will help you slide any of your UI game objects in and out of view from any direction (Top, Bottom, Left, Right) into any area of your screen. There is no need to create and configure Mecanim animations to control the movement of your sliding menus. Everything is controlled by a single script component.
Sliding menus created with this asset will support all the Unity UI features and automatically resize itself to fit their sliding area on different devices with different screens and aspect ratios.
And this comes with the course for free!
for mobile devices with Unity and C#.
We will focus on the main features of modern games in this genre. In this course we will create: an animated character, progress bars to display the needs of our pet, a simple in-game shop with scrollable content, a custom mini game and so on.
You will gain access to all the C# scripts that are used to build this game right in the beginning of the course, but we will take a closer look at each of the scripts before we use them. This approach will help us save a lot of time instead of typing in the code manually and it will let us build a more interesting and complicated game. Among all the scripts provided with this course you will get a free asset to create sliding menus in any of your future projects.
I have tried to save the project that I was working in as often as I can so that you can easily pick up the material from any point in this course. All these projects and the assets used to develop our example application will be available for download with this course.
The material in this course is divided into 5 Sections.
Section 1 includes a short overview of the project that we will be making in this course.
In Section 2, we will create a basis that is used for any virtual pet game a system that will constantly demand care from our players in different categories. In this game we will have categories for food, sleep, taking our pet for a walk and playing with our pet. We will make custom progress bars to display our pet`s current needs. In all the other Sections of this course we will come up with different methods of interacting with our Care system to restore care points.
In Section 3, I will show you how to create sliding menus using a free asset provided with this course. We will learn how to lay our pet to sleep to restore his Sleep care points. And we will create an in-game shop with scrollable content that will allow us to buy food items for our pet. Eating these food items will restore his Food care points.
In Section 4, we will focus on animating our pet character. We will try to make the most out of the art assets that we have to create an interesting character with diverse behaviors. You will learn how to manage complex state machines in Unity`s built-in Animator component. We will discuss grouping animations by creating sub-state machines. We will give our character an ability to move in the scene. This is not used in every virtual pet game, but we will later need this feature for our mini game. We will add a new Training
system to our game that will allow our players to give commands to our pet (sit, bark, look around based on the animations that are available for this character)
In Section 5, we will add 3 new scenes to our project: a starting scene, a game over scene and a scene to take our pet for a walk and play our mini game. We will create a fun mini game that will let our players get our in-game currency to buy more items from the shop. We will add a speech bubble for our pet to send some messages when he needs something from our players. In this Section we will make our Health HUD functional. If the health of our pet drops to 0 or below the game will end.
By the end of this course we will end up with a fully functional virtual pet game. In the last lecture I will build this game and show you how it looks and feels on an actual mobile device.
BONUS
Among all the scripts provided with this course you will get a free asset to create sliding menus in any of your future projects. Typically, asset of this quality would sell for $25 or more in the Unity asset store.
This asset is designed to work with new Unity UI. It will help you slide any of your UI game objects in and out of view from any direction (Top, Bottom, Left, Right) into any area of your screen. There is no need to create and configure Mecanim animations to control the movement of your sliding menus. Everything is controlled by a single script component.
Sliding menus created with this asset will support all the Unity UI features and automatically resize itself to fit their sliding area on different devices with different screens and aspect ratios.
And this comes with the course for free!
What are the requirements?
- I try to explain everything as much as I possibly can, but this is quite a complex application, so it is recommended that you have at least some previous experience with C#.
- But it is not strictly necessary because you will still get a full Unity project of this game and all the scripts are pre-made and available right from the start of this course.
- I mostly do not use any advanced features of C# language in this course. In some of the scripts I use properties and coroutines, but we will discuss how they work.
- You should install Unity3d to develop the application that we are making in this course. Any version after Unity 5 will do.
What am I going to get from this course?
- Over 55 lectures and 6.5 hours of content!
- Build a complete Virtual Pet game for mobile devices from scratch with Unity and C#
- Create a system that will constantly demand care from players in certain categories (in this game - Food, Sleep, Fun, Walk)
- Come up with a creative and unique way to refill care points for each of these categories.
- Create progress bars, sliding menus, scrollable lists in Unity.
- Create a simple mini game (catch a falling object)
- Create an in-game shop to sell different items or power-ups to your players.
- Set up a Unity project with multiple scenes
- You will learn a lot about saving information between scenes and between game launches
- You will learn how to use properties, coroutines, singleton pattern in C#.
- Use Layout groups to organize your user interfaces
- Create animated sprite-based characters in Unity
- Manage complex Animator state machines to transition between animation states of your characters
- Improve your C# scripting skills by viewing simple and easy to understand examples from this course.
- You will get a fully functional Unity project of the application created in this tutorial.
What is the target audience?
- This course is for people who want to build their own mobile Virtual Pet game with Unity absolutely from scratch. The techniques taught in this course are universal and applicable for any Virtual Pet game.
- This course is also useful because it gives you an insight into the step by step development of a complete Unity game project from start to finish.
Leave a Comment