0% found this document useful (0 votes)
55 views13 pages

Unity 1,3 D Physic

This document provides instructions and exercises for Module01 of the Unity Piscine. It covers creating a scene with 3D characters that can move and jump using physics, and implementing levels that require cooperation and problem solving using tags, layers, switches and moving platforms. There are 5 exercises of increasing complexity, starting with basic character control and ending with an challenging level featuring traps, hazards and time pressure. Students are instructed to complete the exercises using only the lessons from Module01.

Uploaded by

Otman Simo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views13 pages

Unity 1,3 D Physic

This document provides instructions and exercises for Module01 of the Unity Piscine. It covers creating a scene with 3D characters that can move and jump using physics, and implementing levels that require cooperation and problem solving using tags, layers, switches and moving platforms. There are 5 exercises of increasing complexity, starting with basic character control and ending with an challenging level featuring traps, hazards and time pressure. Students are instructed to complete the exercises using only the lessons from Module01.

Uploaded by

Otman Simo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Piscine Unity - Module01

3D physics, Tags, Layers and Scene

Summary: In this document, you will find the Module01 subject of the Unity Piscine.

Version: 1.00
Contents
I Instructions 2

II Foreword 3

III Exercise 00: Thomas and his friends 4

IV Exercise 01: Exit this way! 6

V Exercise 02: Stage2! 8

VI Exercise 03: Interactivity 9

VII Exercise 04: Buttons! 10

VIII Exercise 05: A deadly game! 11

IX Submission and peer-evaluation 12

1
Chapter I

Instructions

• If you have problems installing the tools needed for your project on the 42 comput-
ers, you can use a virtual machine. In this case, you will have to :

◦ install the virtual machine software on your computer.


◦ install the operating system of your choice.
◦ install the tools needed for your project.
◦ Make sure you have the space on your session to install all of this.
◦ You must have everything installed before the evaluation.

• Only this page will serve as reference. Do not trust rumors.

• The exercises have been ordered from easiest to most difficult. Under any circum-
stance you can submit or take into account an exercise if a previous one has failed.

• Be careful with the access rights of your files.

• You should follow the submit procedure for all you exercises.

• Your exercises will be corrected by your piscine peers.

• You cannot leave any extra file on your repository except the ones explicitly specify
on you subject.

• Got a question? Ask your peer on the right. Otherwise, try your peer on the left.

• Everything you need can be found on the man or out there on Google.

• Read carefully the exercises: they may contain some features you should implement
that are explicitly mentioned on the subject.

• Use your brain!!!

2
Chapter II

Foreword

Today’s starring :

• Thomas - Lonely and slightly naive, Thomas likes to list his observations
about the world - and is absolutely fantastic at falling.

• Chris - Pessimistic, irritable and suspicious - Chris might not be the best
jumper, but he was doing just fine on his own.

• John - Rather proud of his agility and sportiness, John quite likes an audience
so decides to look after Thomas and Chris.

• Claire - Claire lacks confidence, she moves slowly and considers herself rubbish
at jumping. But then she discovers that she might be a superhero.

• Laura - Laura isn’t great at jumping, although she does have her own unique
ability - which, sadly, she’s too ashamed to tell anyone about. An ominous pixel
cloud has been following her around lately, and this worries the others.

• James - James had always been different. Not least because of his unique
disregard for Newtonian laws.

• Sarah - On a quest to find the fountain of knowledge and learn the truth
about her world, Sarah sees herself as rather more intelligent than the other "lesser"
quadrilaterals.

3
Chapter III

Exercise 00: Thomas and his friends

Exercise :

Exercise 00: Thomas and his friends


Turn-in directory : unityModule01
Required elements : The "Stage1" scene, PlayerController scripts on each
character and anything relevant
Forbidden functions : None

Demo : Take inspiration from it if you wish, but keep in mind


that is only demonstration and some behaviours do not necessarily
correspond with the desired behaviour in these exercices.

To start, run the demo so you know where you going today.
Create a scene Stage1 with:

• A Ground.

• A Camera.

• 3 characters: Claire, John and Thomas.

At the start no character is active. You can activate and switch it with the Alpha1,
Alpha2 and Alpha3 keys.
Characters must help each other to pass the levels!

You can move the characters right and left with the keyboard (AD keys) and press
the space bar to jump.

The camera is automatically centered on the active character.

4
Piscine Unity - Module01 3D physics, Tags, Layers and Scene

You must be able to reset the scene pressing a key, R and/or Backspace

Warning! You must only create ONE single script that will be applied
to all characters.

You’re free to create other independent scripts, to manage the camera


or for instance.

5
Chapter IV

Exercise 01: Exit this way!

Exercise :

Exercice 01: Exit this way!


Turn-in directory : unityModule01
Required elements : The "Stage1" scene, and anything relevant
Forbidden functions : None

Now, the characters must also possess different features:

• Claire, the blue square moves slower and jumps lower than the others.

• John, the yellow stick moves faster and jumps higher than the others.

• Thomas stands between both with an average speed and jump capacity.

You must always use the same script for all your characters

They must not be able to jump several times without falling on a surface, ground or
other character. No infinite jump or wall jump!

They must run through a first stage that forces them to cooperate to get to the exit.

The exit of each character is indicated by an outline representing them.


When each character is aligned on their exit, the stage is over.
You must display a message stating it. For the moment, a simple message in the console
will be enough.

6
Piscine Unity - Module01 3D physics, Tags, Layers and Scene

The stage must force cooperation, so characters must not be able to


reach the exit without the others.

7
Chapter V

Exercise 02: Stage2!

Exercise :

Exercise 02: Stage2!


Turn-in directory : unityModule01
Required elements : "Stage2" scenes and anything relevant
Forbidden functions : None

You must create a second Stage using Physics Layers in the level design:

• Platforms are either white either a character’s color.

• Characters can only use white or their color’s platforms. They go through the
others.

• You must link the stages. When the characters finish a stage, they have to move to
the next stage. If there are no more stage, they have to go back to the first stage.

8
Chapter VI

Exercise 03: Interactivity

Exercise :

Exercice 03: Interactivity


Turn-in directory : unityModule01
Required elements : "Stage3" scene and anything relevant
Forbidden functions : None

It’s about to get interesting! Create a Stage3 with teleporters and moving platforms.

You will choose to create fast and technical pathways, sadistic elevators, like in a good
old retro game where it will take 10 seconds to get the right elevator alignment.

The goal is to create a pleasant level to run through, not just a demonstration of
virtuosity.

Don’t forget to progressively add your levels to the build.

9
Chapter VII

Exercise 04: Buttons!

Exercise :

Exercise 04: Buttons!


Turn-in directory : unityModule01
Required elements : "Stage4" scene and anything relevant
Forbidden functions : None

Now, create a Stage4 with switches that open doors. Even better, color switches that
open color doors.

Better yet! White switches take the color of the character that activates them and
open the matching color doors

Finally, switches that change the platform colors so the path the characters can use.

You’re clearly free to design this level as you like as long as you set buttons that work
as described above.

10
Chapter VIII

Exercise 05: A deadly game!

Exercise :

Exercise 05: A deadly game!


Turn-in directory : unityModule01
Required elements : "Stage5" scene and anything relevant
Forbidden functions : None

For the last Stage5, we’re going to set the difficulty a little higher so the player doesn’t
have the feeling they’re just walking around:

• Create color turrets that shoot regularly. The shot only hits the same color char-
acters.

• Create traps on the ground or in the air.

• Create holes. The camera will not follow a character falling in a hole.

• If a character is hit by a turret shot, hits a trap or falls in a hole, the game is over.

You can code everything with yesterday’s and today’s lessons. Don’t
use any other system, especially with timed actions and coroutines to
manage the turrets’ shots. We’ll see about that later.

11
Chapter IX

Submission and peer-evaluation

Turn in your assignment in your Git repository as usual. Only the work inside your repos-
itory will be evaluated during the defense. Don’t hesitate to double check the names of
your folders and files to ensure they are correct.

You should not put all the files of a project on git, otherwise
the disk space occupied by the repository will be unnecessarily
increased. Here is how to configure Unity and GIT for an optimal
use.
• Make sure that Unity saves as many files as possible in text
form instead of binary.In Unity, go to Edit >Project Settings
> Editor. Under textttAsset Serialization, you have to choose
the Force Text Mode.

• check that the .gitignore file automatically generated by unity


is present.

The evaluation process will happen on the computer of the evaluated


group.

12

You might also like