All Projects → CompleteUnityDeveloper → 03-Text101

CompleteUnityDeveloper / 03-Text101

Licence: MIT License
A basic state-machine based text adventure exercise using scriptable objects in Unity, as part of our Complete Unity C# Developer course (http://gdev.tv/cudgithub). (Ref: TX_CUD)

Programming Languages

C#
18002 projects
ShaderLab
938 projects
HLSL
714 projects

Complete Unity Developer 2D - Text101

This is the Complete Unity Developer - one of the most successful e-learning courses on the internet! Completely re-worked from scratch with brand-new projects and our latest teaching techniques. You will benefit from the fact we have already taught nearly half a million students game development, many shipping commercial games as a result.

You're welcome to download, fork or do whatever else legal with all the files! The real value is in our huge, high-quality online tutorials that accompany this repo. You can check out the course here: Complete Unity Developer

In This Section

We may a text adventure game using scriptable objects in Unity. (ref: TX_CUD)

How To Build / Compile

Lecture List

Here are the lectures of the course for this section.

1 Welcome To Text101

In this video (objectives)…

  1. Overview of this section
  2. Flex your designer muscles if you're interested
  3. We'll be using Scriptable Objects to make a Text Adventure Game
  4. Let's get started!

After watching (learning outcomes)… Ready and raring to start this section.

2 Text101 Game Design

In this video (objectives)…

  1. Overview of our game design, core mechanic and theme
  2. Some high level design insight on how we are creating a game for other people
  3. A challenge to flex your designer muscles and come up with your own game theme

After watching (learning outcomes)… Clear on the design for our game.

3 Creating Sprites In Unity

In this video (objectives)…

  1. Introduction to Unity's main windows - Hierarchy, Scene, Game, Project, Inspector.
  2. Create simple square and circle sprites.
  3. Compare the difference between 2D and 3D scene view.
  4. Build a simple platformer scene for fun.

After watching (learning outcomes)…

Capable of adding sprite Game Objects into a scene in Unity.

4 UI Canvas & Text

In this video (objectives)…

  1. Introduction to Unity canvas for UI.
  2. Initial discussion of parent-child relationship for Game Objects in hierarchy.
  3. Add text elements.
  4. Edit text, resize elements.
  5. Add UI images as background elements.

After watching (learning outcomes)…

Able to create UI Canvas with text elements and plain image objects.

5 Update Text Component

In this video (objectives)…

  1. Deeper understanding of how Unity Game Objects, Components and Properties relate to one another.
  2. Introduction to [SerializeField].
  3. Creating a reference to a text field.
  4. Printing a string to our UI text field.

After watching (learning outcomes)…

Capable of programmatically adding a string of text to a UI text field.

6 Game States

In this video (objectives)…

  1. What are states and what is a state machine.
  2. Creating decision points for the player.
  3. How to manage all of our states and conditions - scriptable objects.

After watching (learning outcomes)…

Understand our requirements regarding states and create your first state for your text adventure game.

7 Unity Scriptable Objects

In this video (objectives)…

  1. What is a scriptable object and why use it?
  2. Use CreateAssetMenu so that we have a context menu to add scriptable objects.
  3. Create our first scriptable object.

After watching (learning outcomes)…

Create our first scriptable object.

8 Public Methods & Return Types

In this video (objectives)…

  1. Public versus private access modifier.
  2. What are return types for methods.
  3. Writing a public method and accessing it from another class.

After watching (learning outcomes)…

Create a public method and access it from another class.

9 Creating An Array

In this video (objectives)…

  1. What is an array and how are arrays created.
  2. Returning an array type variable from within a public method.
  3. Assigning array elements in Unity by dragging and dropping into the inspector.
  4. How to lock the inspector window.

After watching (learning outcomes)…

Understand how to create arrays and assign elements to arrays in code or in the inspector.

10 Manage Next States

In this video (objectives)…

  1. Create a small game loop by having each state lead to another state.
  2. Create a method to respond to player's key input.
  3. Update the game's state based upon the next state array options.

After watching (learning outcomes)…

Complete our small adventure game engine using player input and state flow.

11 Game State Story Design

In this video (objectives)…

  1. Using draw.io for our state diagram and flow.
  2. Time to create your own story.

After watching (learning outcomes)…

Capable of creating a flow chart for your story.

12 Organise State Files

In this video (objectives)…

  1. Complete our game flow by adding all story states, and start and end states.

After watching (learning outcomes)…

Add all our states to our game.

13 TextMesh Pro & Polish

In this video (objectives)…

  1. Using Unity's Package Manager to install TextMesh Pro.
  2. Font a font online to bring into your project.
  3. Create font atlas using the font you found and TextMesh Pro.
  4. Create a TextMesh Pro text for your title.
  5. Find a colour scheme you like and update the colours in your game.

After watching (learning outcomes)…

Know how to use TextMesh Pro and how to polish the look of your game.

14 Text101 Instructor Hangout #1

In this video (objectives)…

  1. Further discussion regarding state as a class and state as a variable.
  2. Further discussion on how scriptable objects work, where they are saving and what is required.
  3. Code formating - where it matters and where it doesn't.
  4. Why we didn't dig into more narrative design in this section.

After watching (learning outcomes)…

Deeper understanding of the concepts covered thus far in this section.

15 Publish Your WebGL Game

In this video (objectives)…

  1. Adjust our screen aspect ratio and scaling.
  2. Create a WebGL build.
  3. Zip our build foler and upload to sharemygame.com.
  4. Celebrate, you've published a game!

After watching (learning outcomes)…

Create a WebGL build and publish online.

16 For Loops

In this video (objectives)…

  1. Find a bug in our game which causes our standalone PC build to break.
  2. Figure out why the game is breaking because of the bug.
  3. Use a for loop to change our input mechanism and stop ArrayOutOfIndex errors.

After watching (learning outcomes)…

Fix our ArrayOutOfIndex error using a for loop for player input.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].