Week 4 | Session 1 - Set Up Basic Gameplay - April 13, 2020
Tutorial
·
Beginner
·
+10XP
·
60 mins
·
(32)
Unity Technologies

The goal of this live session is to set up the basic gameplay for our prototype. We will start by creating a new project and importing the starter files. Next we will choose a beautiful background and a character for the player to control, and allow that character to jump with a tap of the spacebar. We will also choose an obstacle for the player, and create a spawn manager that throws them in the player’s path at timed intervals.
Languages available:
1. Overview
This is the same content covered in Lesson 3.1 in the independent Create with Code Course.
What you will make:
- The character, background, and obstacle of your choice will be set up. The player will be able to press spacebar and make the character jump, as obstacles spawn at the edge of the screen and block the player’s path.
What you will learn:
- Use GetComponent to manipulate the components of GameObjects
- Influence physics of game objects with ForceMode.Impulse
- Tweak the gravity of your project with Physics.gravity
- Utilize new operators and variables like &&
- Use Bool variables to control the number of times something can be done
- Constrain the RigidBody component to halt movement on certain axes
2. Before you Begin
To participate in this session and follow along, you need:
- Unity 2018.4 installed
- An up-to-date project open in Unity:
- If you have followed along with us this week and have your own project ready, you are good to go!
- You can also download the instructor's up-to-date project and import it (If you don't know how to import a project, you can read how here)
If this is your first Create with Code live learning session, you can catch up by:
- Following along with the recordings of our previous live learning sessions
- Completing the same lessons in the independent Create with Code Course
*Note - it is not necessary for you to catch up, but it is recommended for an ideal learning experience.
3. Recorded Live Session - 13th April - 9am PST
If you missed this live session, you can catch up with the video below:
4. Recorded Live Session - 13th April - 5pm PST
If you missed this live session, you can catch up with the video below:
5. Next Steps
Get caught up:
If you were not able to finish the session along with the instructors, you can catch up by:
- Re-watching this recorded session when it is posted in Step 3 above at 3am PT (10am UCT) the morning after this session's date
- Picking up where you left off in Lesson 3.1 of the independent Create with Code Course
Bonus Challenges:
- Experiment with new features (after making a backup)
- Try to program a double-jump
- Randomly select from a variety of obstacles to spawn
- Look ahead to the next lesson
- If you want to go ahead and preview what we'll be covering in the next session, you can give it a try in Lesson 3.2 of the independent Create with Code Course.