Build a Tycoon Business Sim in Unity3D: C# Game Development
3.8 (424 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,471 students enrolled

Build a Tycoon Business Sim in Unity3D: C# Game Development

Learn Unity 3D and Important C# Design Patterns by building a fun Idle Business Game Similar to ADVenture Capitalist!
3.8 (424 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,471 students enrolled
Created by Odoo Class Videos
Last updated 1/2019
English [Auto]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 13 hours on-demand video
  • 6 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Create an Idle Business Tycoon Game in Unity3D Using C#
  • Improve Game Development Skills by Using Important Design Patterns
  • Create a Game User Interface in Unity 3D 5.0 UI Tools
  • Extend the Tycoon Game with Additional Features such as Managers & Store Upgrades
  • Complete 100% Source Code with Tons of Comments
  • BONUS: Idle Game Data Generator and Custom Inspector for Advanced Students!
Course content
Expand all 64 lectures 13:09:31
+ Start Building Your Tycoon Game
8 lectures 01:07:18

Just Added 10/8/2018

Now attached to this lecture is a GDD (Game Design Document). It is very simple but as was pointed out in the comments it is a good idea to have a GDD when building out any game.


This short introduction lets you see the finished game with some simple creative common graphics. Attached to this lecture is a zip file of the final Unity Tycoon project for the game.

Preview 01:58
  • Make a new 2D project file.
  • Place your first object upon the canvas.
  • Learn how to restore Unity's default workspace layout.
  • Apply colors and alignment to your text object.
Preview 04:15
  • Save your scene within the project.
  • Create a panel for your store and control its relative size to its container.
  • Add a "Buy" button to your store.
  • Display a name and numeric counter for your store.
Preview 10:08
  • Organize your game scripts and scenes into folders.
  • Create a new "store" C# script.
  • Edit your script within your integrated development environment (IDE), such as Visual Studio or MonoDevelop.
  • Learn how the Start() and Update() functions fire.
  • Initialize your first integer-type variable for counting your stores.
  • Make a custom function for your "Buy" button that increments your StoreCount variable.
  • Discover how to use the Debug object to monitor your variable values.
  • Link your script to the panel and link your panel's button to the script's function.
Preview 12:40
  • Illustrates how the "using" directive gives you access to built-in C# class for creating objects for your UI.
  • Learn the preferred technique for converting numbers into strings.
  • Link your UI to a public script variable.
Preview 06:52
  • Designate float-type variables to hold currency amounts.
  • Learn how to store whole numbers and decimals.
  • Design our tycoon game so that the initial purchase price of each store may vary. (Unlike real life, in the game world, the cost of opening each new store should rise over the course of time; this helps to keep the game challenging!)
  • Recalculate your player's current balance whenever a store is purchased.
  • Limit purchases when the balance falls too low.
Tracking Money With Your First IF Statement in C#

In this exercise course you are asked to attempt to tie the current balance of your company to the Unity UI interface. You will need to incorporate many of the skills you have learned so far. This is a great exercise for those who have some experience programming and are confident that the material up to this point has been easy.

EXERCISE: Show us the Money! Update the UI

A core part of Business Tycoon Simulations such as this one is the timer that determines when a store's income should be added to the current balance. Timers are also very valuable in many game designs so learning how to use them early on in useful.

Time To Make Money! Create a Basic Timer to Track the Time of your Store Income
+ Expand Your Tycoon Game With Multiple Stores
5 lectures 56:38

In this lesson we see how to animate our store timer using the Unity 5.0 UI Slider. This visual feedback adds to the game play and should be giving you a great feeling of accomplishment at how the game is starting to shape up this early on.

Preview 08:09

In this lecture we move away a bit from adding additional features to the game and instead look at some important game design concepts and prepare our game design to allow multiple stores.

Preview 19:00

In this lecture we use our real game example to see how our objects (the store and the game manager) can communicate and share information with each other. You learn that public methods and public properties are accessible outside your class and inside the Unity editor while private methods and private properties can only be accessed internally.

Keeping Your Business Private - Understanding Private and Public Variables

In this lecture you complete the process of making the tycoon game capable of handling multiple stores. An important take away from the course up to this point is that we are using many of the standard Unity features that are easy to get started with. Your game is up and running and the core engine is in place. Now we can begin adding features and expanding the game design.

Now You're a Tycoon! Setting Up Multiple Stores

At this point in the course you have the foundation for a simple game. In this exercise you are to take what you have learned and built out six stores (or how many you wish) with various costs, timers, and profits on the sale.

EXERCISE: Expanding Your Empire! Create and Configure Multiple Stores
+ Adding Features to Your Tycoon Game
8 lectures 01:25:50

One key feature in these idle Tycoon type games like ADVenture Capitalist is that you unlock managers so you don't have to click on the store over and over. The store timer will automatically restart on its own once you have a manager for a store. While we will wait to implement the user interface for automating the store we will go ahead and add the feature into our store class so we can more easily test our game play.

Automating the Store Timer

Up to this point our stores are a fixed cost. In Tycoon games like this it is often desirable to have each new store cost more than the previous store. In this lecture you learn how to integrate a powerful c# math library that lets you create a function for your Tycoon game that allows you to scale up your store costs. More importantly you will learn how to use this library so that you can apply it to your own game designs.

Improving the Cost Calculation of Stores

Now that we have improved our store cost calculations, let's show the player the cost of the next store in the buy button. Learn how to dynamically change the button text.

Displaying Store Cost on the Store Buy Button

Add visual feedback in which you can change the buy button to be disabled and show different colors when the player doesn't have the money to purchase another store.

Improving the Buy Button on the Store to Change Color and Other Features

While this entire course focuses primarily on using Unity 3D's User Interface and introducing game design patterns we do at least want our stores to have a picture associated with each one of them.

Improving Your Image - Adding a Picture to Your Stores

Unity Prefabs allow you to create reusable objects within your Unity scenes. This video begins introducing you to prefabs and how they can be used in the editor. In a later lecture you will learn how to use these prefabs to programatically generate your stores from XML.

Introduction to Unity Prefabs

For our design we want to hide the stores until they are available. While this design is a bit different than ADVenture Capitalist it is common in many other Tycoon games in this genre.

Hiding Stores The Player Cannot Afford

In this lecture we introduce some overall improvements to gameplay and learn some additional C# scripting along the way.

Improve Gameplay with Small Code Changes
+ Getting Down to Serious Business- Take Your Development Skills to the Next Level
7 lectures 01:36:13

We begin to decouple our stores dependencies with the game manager by introducing the Singleton pattern. A classic design pattern used to implement game managers to they are easily accessible to all of the other systems in your game.

Improving The Game Manager Using the Singleton Pattern

As a beginning programmer it is easy to put together a game like this Tycoon clicker. However when you get into more challenging games with complex designs your beginning skills will make it difficult. This lecture will teach you how to separate out the user interface elements from the game the game manager. While this very simple example only addresses the current balance, the design principal will prepare you for a far more complex Store UI manager in future lectures.

Creating a UI Manager to Improve Game Design - Better Object Composition

One of the most important game development concepts is the ability to create events the various systems in your game can respond to. Instead of tightly coupled objects that are brittle and require much dependency using the Observer Design Pattern and Delegates and Events our User Interface can update itself when the game manager announces that the current balance has changed. This is a dramatic improvement over the previous design in which our game manager would have to know details about the user interface.

Improve Your Game Design using Delegates and Events or the Observer Pattern

Each store has several UI components and like our game manager it is important to separate out our UI from our game logic. Because the store class has more complexity this lecture certainly will be more challenging to those who started this course as a beginner. For those who are already programmers this re-factoring exercise should prove enlightening and provide you with examples of how you can go about better designing your own games.

Getting Stores Their Very own Store UI Manager

Breaking out the store UI from the store game logic required quite a few steps but it should have been very valuable for those who wish to create more complex games. It demonstrates how composition of your objects is important and that you want to avoid from the beginning if possible having your UI tied in tightly with game logic. Most importantly it demonstrates that it is never too late nor never too early to re-factor your design for future growth. Build, test, re-factor, test, build, re-factor, test, build. Always take time to go back and clean up your code and re-factor when you are working on complex game projects.

Finishing Up Business on the Store UI Manager Refactoring

The design to this point uses up a lot of CPU cycles because the UI is refreshed in the update method of the game objects. In this lecture we make our code more efficient by moving code out of the Update method and using other techniques to update the user interface in the game.

Getting More Efficient By Moving Code out of Unity Update Methods

In this exercise you are asked to do some of your own re-factoring by changing variables from public to private.

EXERCISE: Make Your Business Private Only!
+ Make Your Stores Easier to Manage by using XML for Maintaining Store Data
11 lectures 02:11:18
Introduction to Loading Your Store Configuration Data from XML

In this lecture you learn how to create a simple XML document and load game data out of it so it can be utilized within the game setup.

Loading Game Data in from XML - It's really not all that hard!

NEW!!! - This is a new video added to the course that demonstrates how to create a layout grid for your store prefabs.

NEW!!! Setting up a Grid Layout to Hold your Store Prefabs

In this lecture you make a big leap in the game design going from stores that must be created manually in the Unity Editor and instead dynamically create the store prefabs from the data in the XML file. While this is a pretty simple example you can apply this to everything from loading rpg stats, maps, choose your own adventures... and pretty much any game elements. This is also an essential technique to making games in which users can easily make their own mods.

Building Your Store Prefabs Automatically - Data Driven UI Design

While most of our store data can be set right inside the store class, the store name needs to be updated in the text box at the top of the store interface.

Setting The Store Name from XML

Now that we are creating our store prefabs dynamically we must now load in our store image dynamically as well. Fortunately this short lecture will have you dynamically loading your pictures into the Unity UI in no time.

Loading the Store Image from XML

We still have additional data we need to load into our store from XML. This lecture gets the remaining elements of data we need into our store.

Loading Additional Store Data

As many other objects in our game depend on the data that we are now loading dynamically, we use an event to notify the game manager that our data is loaded. This extends on what we have learned in previous lectures on using events and demonstrates how events can be used to effectively control the sequence of actions within your game design.

Creating an Event to Notify the Game Manager

While we've completed loading our store data we now need to add the ability to load our starting balance from the XML file as well.

Loading the Games Starting Balance From XML

This exercise asks you to take what you have learned from loading data out of XML and create the ability to load the company name out of XML using similar techniques.

EXERCISE: Give Your Company a Name

Our Load XML Data method grew quite large as we built out all the features it required. In this exercise you are asked to re-factor the method so it is more modular. Then the remaining part of the lecture is my attempt to re-factor the method. Please feel free to post your solutions to re-factoring this method in the discussion.

EXERCISE: Refactor the Load XML Code
+ Add a UI to Unlock Store Upgrades - Managers to Automate Clicks for the Stores
6 lectures 01:35:42
Create the Layout for Unlocking the Store Manager Upgrades
Programatically Create the Unlock Manager Prefabs
Setting Up Our Simple State Machine
Creating Our Method To Unlock the Store Managers
Learn How to Programatically Add a Listener To Your Button
Finishing Up the Store Manager UI
+ JUNE 2017 UPDATE - Add Upgrades the player can purchase to improve their store
10 lectures 01:50:29

This lecture introduces you to the new bonus section that will show you how to improve the gameplay of our business sim by providing store upgrades that can be purchased. We begin by looking at the current design and understanding that many of the same mechanics for our manager upgrades will also apply to the store upgrades. This means we can use the same design patterns and techniques we used for unlocking managers for unlocking the upgrades. 

Overview and setup up for adding upgrades to our store

We start in the lecture by focusing on the interface mechanisms that will open up the upgrades panel. Because the manager upgrades button, panel and list are so close in functionality we can quickly duplicate them to create a starting point for our upgrades.

Setting Up The Interface For Your Store Upgrades

Just like our managers, we must have prefabs that will be utilized for our upgrades. Using the manager prefab as a starting point we create a new upgrade prefab and slightly modify the appearance.  

Creating The Prefabs For The Upgrades

Now that we have our prefabs ready to load we need to modify the load game data script so it can create the new upgrade prefabs. Once again we copy the code we used for the manager upgrade and modify it so we can get our prefabs populating in the upgrade list. 

Modifying The Load Game Data Script To Support Our Upgrade Prefab

To this point in this section we have primarily focused on the interface and the population of the upgrade items in the upgrade panel. Now that we have that functional we can tie it into our store and actually implement the upgrade.

Unlock The Upgrade and Upgrade the Store Multiplier

This lecture we are forced to get a bit more creative with how we approach our design due to how the XML is imported. We make good progress at loading in an XML element and using it to create our upgrade prefab but the design breaks down when we have both a cost for the upgrade and a multiplier when the managers design only had the cost. While this lecture could have been edited to avoid a few minutes that were less than productive I have chosen to leave it unedited as I feel it is important for aspiring game developers to see real world game design decisions and learn how they are handled.

Finalize (and Abandon) Our Single Upgrade Per Store Design

In this lecture we begin by looking at the XML we will use to define the store upgrades. This allows us to restructure XML loading methods so they can handle the new upgraded store design. While we still have a major design step ahead of us, this lecture takes us much closer to having our multiple store upgrade design implemented.

Modify the Design To Handle Multiple Upgrades Per Store

We have come a long way without creating the primary class that will represent our storeupgrade. It would have been a completely legitimate development decision to start by making this class first and working backwards towards the interface design. In fact if we were not building off the already functional manager mechanisms we probably would have taken that approach. 

Creating a StoreUpgrade Class to Improve our Game Design

When the Upgrade button is clicked it is still wired into calling methods inside of our store class instead of our storeupgrade class. In this lecture we get the core mechanics of our multiple store upgrade in place. 

Adding a Listener To the Upgrade Button
Finalizing the Multiple Store Upgrades
+ JULY 2017 UPDATE - Massive New Game Upgrade - Unity Business Tycoon 2.0
9 lectures 02:26:05

JULY 2017 -  Unity Business Tycoon Upgrade 2.0! Many new features

  • Automatically saves your game
  • Calculates profits while the game is not running (make money when away!)
  • Screen to display profits while you were gone
  • Scroll lists that work
  • unlimited stores
  • Improved performance with threading and coroutines
  • Buy multiplier button for buying multiple stores at a time
  • Optimized buy math and formulas (no loops)
  • Earnings per second
  • Support for big number descriptions up to 300+ power
  • Generate Idle Game Data with procedurally generated stores, managers, and upgrades - INCLUDES CUSTOM INSPECTOR!
  • Load and Save Game Template settings
  • Improved Screen Layout
  • Handle "Angel" investors or "Shareholders" "Transcendence" also known as NewGame+

Design and coding improvements

    • Tons of comments
    • Static methods and properties (ie gamemanager)
    • Constants
    • Loading from XML
    • Loading from CSV
    • Build a custom inspector
    • Better division and integration between game models and UI
    • Improved performance with coroutines instead of using update

  • Preview 13:42

    In this lecture we begin walking through some of the upgrades that have been made to the game manager. Specifically we begin with namespaces and we have included them throughout the project to better encapsulate our scripts and prevent them from conflicting with other modules or code you would bring into the project. Then we look at some basic uses of constants and how they are use much like variables... but cannot be changed at runtime.

    Finally we look at how we can improve our overall design to protect the properties in our classes using setters & getters. 

    Looking at the New Game Manager - Namespaces, Constants, Setters & Getters

    In this lecture we begin walking through some of the upgrades that have been made to the game manager. Specifically we begin with namespaces and we have included them throughout the project to better encapsulate our scripts and prevent them from conflicting with other modules or code you would bring into the project. Then we look at some basic uses of constants and how they are use much like variables... but cannot be changed at runtime.

    Finally we look at how we can improve our overall design to protect the properties in our classes using setters & getters. 

    New Game Manager Methods and Understanding the basics of Coroutines
    Resetting our game and understanding static methods and properties

    In this lecture we will review how we used a CSV file to store hundreds of big number descriptions and load it into an arraylist. We then use LINQ to find the correct description for a given value.

    Loading and Managing BIG NUMBER Descriptions
    Introduction to the Idle Game Data Generator - Loading From CSV FIles
    Generating Idle Game Data into XML
    Creating a Custom Inspector and Refactoring to eliminate using prefabs
    Using a Custom Inspector to Generate Idle Game Data
    • Have Unity 3D installed and Understand the Basics of Unity 3D
    • Previous Programming Experience is not Required but is Preferable
    • Totally New Programmers Should Expect to Watch Videos Multiple Times and Supplement Their Knowledge

    -- The Best Way to Learn Important Game Design Patterns Step-by-Step --

    UPDATED January 1st, 2019

    I have just uploaded a new build that is saved in Unity 2018.2.1.f1. This may make it easier for some people who are loading the game into newer version of Unity.  You can find it under the Resources in the First Lecture!

    Also, I have prepared another lecture that focuses on re-factoring some of our design to better decouple our UI objects. It will be edited and uploaded in the next few days.

    In this course you will learn how to create an Idle Business Tycoon Game from the ground up that is similar to games such as ADventure Captialist, Web Tycoon, and Cookie Clicker. But more importantly, this course is designed to teach critical game development concepts and design patterns popularized by the Gang of Four.

    You can play AdVenture Capitalist on Kongregate to get an idea of the core game play you will learn to create in this course.

    • More than 12 Hours of HD 1080P Instruction!

    • Learn Important Unity 5.0 UI Concepts

    • Great for Beginning to Intermediate Level Game Programmers (Now includes advanced bonus content)

    • Produced by Odoo Class Videos - Experts in Enterprise Development Tutorials

    • Starts off with simple C# that even a beginner can understand... end up with a full feature idle game!

    • NEW SUPER BONUS - Generate Idle Game Data with custom Unity3d Inspector!!

    Do you enjoy playing Tycoon and other Simulation or Idle games? Do you know a little bit about C# and Unity3D but would like to take your Development Skills to the next level? If so, this course is exactly what you are looking for.  Ambitious beginners will enjoy this course.

    Course Overview: This course focuses on core Game Design and Programming Principals. We use the tools in Unity 3D to create the Interface and Artwork is all from Creative Commons. Our game design only roughly borrows from many of the idle Business Tycoon type games such as AdVenture Capitalist, Cookie Clicker, and Web Tycoon. By the end of the course you will be able to customize the game as you please and we look forward to you sharing your tycoon creations with us.

    What are People Saying about Odoo Class Videos?

    First off I want to comment on all of the quality video editions you have recently added to your library. They have been tremendously helpful and I have been recommending your service to many people.

    - John P

    I find your videos real easy to follow and often revert back to them as a point of reference…

    - Peter Y.

    This course starts at the beginning but ramps up quickly to teach you important Game Design Patterns that you must know to write professional games:

    Beginning Skills:

    • Learn how to create a Unity3D Project

    • The entire project is created step-by-step. Start at the very beginning!

    • Perfect for those that are new to Unity and Programming in General

    • Start right away using Unity 3D's newest UI tools to create a working tycoon store

    • Write your first C# script and learn the basics of variables, IF statements, creating a Timer, and other simple programming concepts

    • Create an Animated Progress Bar to Show your Store in Operation

    • Video exercises along the way help reinforce what you are learning

    Improving Your Business Tycoon Game Features and Your Development Skills:

    • Upgrade the Game Design to Handle Multiple Stores

    • Create a Game Manager to Better Track Money in the Game

    • Learn to Implement Math Functions to Calculate Your Next Store Cost

    • Add an Icon for your Store and Learn to Create Dynamic Buttons

    • Learn Important Beginner C# Structures and Basic Unity 3D Game Development

    Taking Your Game Development Skills To the Next Level:

    • Designed to take you through important design patterns to improve your development skills

    • Improve Your Game Manager with the Singleton Pattern

    • Use Delegates and Events to implement the Observer Design Pattern

    • Refactor your Tycoon Game into a UI Manager

    • Use Unity Prefabs to dynamically create your stores at run time

    • Learn to Load Game Data from XML! Critical to allowing gamers to create mods

    • Learn to build a State Machine within the UI Manager to handle the various interface states within your growing Tycoon Game

    • Create a Managers Panel to extend the basic game design and provide a template for you to continue adding features to your business tycoon game

    • Perfect for those who wish to see how to implement real game designs so you can apply them to more advanced systems and future Tycoon games


    I'm happy to announce that we have completed a major upgrade for the Tycoon Business Sim course! Take your game development skills to the next level. Download the full source code for the entire project!

    This upgrade will include many new features that are found in commercial idle clicker games including:

    • New video Lectures covering both functional and technical aspects of the game

    • Learn how to save and load game progress

    • Calculate idle profits (make money when the game isn't even running!)

    • Create a screen to display profits while you were gone

    • Learn how to create Scrollviews

    • Improved Screen Design and Layout Tips

    • Create games with unlimited stores!  (memory & cpu limitations apply)

    • Use the new multiplier button for buying multiple stores at a time

    • Calculate earnings per-second for your operations

    • Big number descriptions for up to 300 exponents!

    • Handle "Angel" investors or "Transcendence" also known as NewGame+

    • New lectures on how to setup and implement your Idle Tycoon Business Simulation

    SUPER BONUS - Generate Idle Game Data with custom Unity3d Inspector!!

    • Generate Idle Game Data to create procedural generated stores, managers, and upgrades

    • Load and Save Game Template settings to easily generate new game designs

    • No need to hand key store data and upgrades... Adjust parameters to generate the idle game data

    • Data stored in human readable XML to be easily modified and tweeked as desired

    New Learning Opportunities!

    • Upgraded course video content that reviews the technical upgrades of the project

    • Static methods and properties

    • Using constants

    • Loading game data from XML

    • Use PlayerPrefs to save game state

    • Loading configuration and store names, managers, and upgrades from CSV

    • Build a custom inspector

    • Better division and integration between game models and UI

    • Improved performance and smoother gameplay with threading and coroutines

    • Using Setters & Getters to protect your class properties

    • Using LINQ with ArrayLists

    • Tons of comments throughout all the code

    • New Lectures that cover all the new content

    -- UPDATED June 25, 2017  :  TEN NEW BONUS LECTURES!!!!

    Nearly two hours of additional lectures that will show you how to add upgrades to your stores! 

    Copyright 2015-2018 First Class Ventures, LLC.  This item is not authorized for posting on Steam, or any other game or game asset site without permission.

    Who this course is for:
    • Anyone Interested in Building an Idle Business Tycoon Game similar to AdVenture Capitalist
    • Designed for Ambitious Beginners Who Wish to go Quickly From Basics to More Intermediate Game Design
    • For Beginner to Intermediate Level: Step-by-Step How to Build the Core Gameplay from the Ground Up
    • Intermediate Programmers who Wish to Learn Design Patterns and Refactoring Techniques