Game design
- Room
- Box
- Ball
- Gun
- Box Generator
- Wall
- Score
- GUI Skin
- Time Limitation
- Result Scene
- Start Scene
- Title Scene
Create room
- Create floor, wall and ceiling
- Create Cube and change Name to
Floor
- Create three walls and change Name to
Wall1
,Wall2
andWall3
- Create Cube and change Name to
Ceiling
- Add checker texture
- Decrease Static Friction and Dynamic Friction and increase Bounciness
- Create Cube and change Name to
- Deploy light
- Create Point Light and change Position to (0, 15, 0)
- Change Range to 25 and Intensity to 2.0 in Light Component
- Build hierarchy structure
- Create Empty Game Object and change Position to (0, 0, 0)
- Input all elements
- Save Scene
- build Settings>Scenes In Build
- Create Main Scene
- Deploy Camera
- Set Aspect Ratio to 16:9 in Game View
- Change Angle of Camera to 75
Create box
- Create box
- Create Cube and change Scale to 2.5
- Add Rigidbody Component
- Add Physical Material and Tag Box
- Copy the
Box
- Change Name each boxes to
Red Box
andBlue Box
- Create Material for each boxes
- Prefab each boxes
- Drag and drop Prefabs to each boxes
</figure>
Create Gun
- Create bullet Prepeb
- Create Sphere and change Scale to 0.5
- Add
Rigidbody
Component - Set Shader to Self-Illumin>diffuse
- Prefab and change Name to
Bullet
Gun.js
- Drag and drop to
Main Camera
- Drag and drop
Bullet
Prefab tobulletPrefab
in Inspector View - Change
initialVelocity
to 50
-
Gun.js
(change)
Bullet.js
-
Drag and drop to
Bullet
Prefab -
Introduce messaging
-
Bullet.js
(change)
-
Box.js
-
Drag and drop
Box.js
toRed Box
Prefab andBlue Box
Prefab -
Improve visual presentation
- Create Empty Game Object
- Component>Effects>Legacy Particles
- Select
Ellipsoid Particle Emitter
,Particle Animator
andParticle Render
- Set
Ellipsoid Particle Emitter
Min Size: 3
Max Size: 5
Min Energy and Max Energy: 0.5
Min Emission and Max Emission: 30
X, Y and Z of Rnd Velocity: 25
Rnd Angular Velocity: 360
Rnd Rotation: On
One Shot: On
- Set Particle Animator
Damping: 0.01
Autodestruct: On - Create
Explosion
Prefab and drag and drop this particle effect -
Box.js
(change)
-
Drag and drop
Explosion
Prefab toexplosionPrefab
in Inspector View -
Improve to delay of destroy
-
Box.js
(change)
-
-
Box.js
(change)
Create Box Generator
-
Create Empty Game Object and change Name to
Box Generator
-
BoxGenerator.js
- Drag and drop
BoxGenerator.js
toBox Generator
Game Object - Change
Interval
to 0.5 and drag and drop each Prefabs toRed Box Prefab
andBlue Box Prefab
in Inspector View -
BoxGenerator.js
(change)
Create unvisible wall
- Create univisible wall with normal wall
- Duplicate
wall
- Locate to front of
room
- Delete
Renderer
Component
- Duplicate
- Introduce Layer and Collision filtering
- Edit>Project Setting>Tags
- Open
Tag Manager
in Inspector View - Set
Bullet
inUser Layer 8
andFence
inUser Layer 9
- Click
Bullet
Prefab in Project View - Change
Layer
toBullet
in Inspector View - Click unvisible wall Game Object
- Change
Layer
toFence
- Edit>Project Settings>Physics
- Open
Physics Manager
in Inspector View - Open
Layer Collision Matrix
- Uncheck where is crossing
Bullet
andFence
Count score
- Structure
-
Scorekeeper.js
: Manage score by number
-
Referee.js
: Process to manage rule and change target
-
Box.js
(change): Save which box is desproyed
- Add this code first line
- Change
Update()
- Create
Game Controller
Game Object- Create Empty Game Object and change Name to
Game Controller
- Select
Game Controller
inTag
pull down menu in top of Inspector View
- Add
Referee.js
- change
Reward Point
to 10 andPenalty Point
to 7
- Put
Box Generator
under theGame controller
- Select
Red Box
Prefab in Project View and inputRed
inColor name
ofBox
Script Component in Inspector View - Same in
Blue Box
- Create Empty Game Object and change Name to
Set GUI skin
- Create GUI skin
- Create>GUI Skin
- Change Name to
Game Skin
- Open Custom Styles
- Change Size to 2
- Open Element 0 and change Name to
score
- Open Normal and change Text Color to white
- Change Font
- Change Font Size to 25
- Open Element 1 and change Name to
message
- Change Alignment to Middle Center
- And same with
score
- Apply GUI skin
-
Scorekeeper.js
(change)
Add code in first line
-
Add code in first line of OnGUI
function
Change GUI.Label
function
- Drag and drop
Game Skin
toSkin
inScoorekeeper
Script Component
-
Referee.js
(change)
Add code in first line
Add code in first line of OnGUI
function
Change GUI.Label
function
- Drag and drop
Game Skin
toSkin
inReferee
Script Component
Set time limitation
-
Timekeeper.js
- Add
Game Controller
Game Object
- Add
- Set
Game Length
inTimekeeper
Script Component
- Add “TimeUp” message processing
-
Gun.js
(change),Referee.js
(change) andBox Generator.js
(change)
Add this code in last line
-
Create result scene
-
ReulstScreen.js
- Add
Game Controller
Game Object - Structure
- Add
- Drag and drop
Game Skin
inskin
inResultScreen
Script
Create start scene
-
GameStarter.js
- Add
Game Controller
Object
- Add
- Create
StartGame
message processing-
Referee.js
(change),Timekeeper.js
(change) andBoxGenerator.js
(change)
Add this code in last line
-
- Set GUI and check action
- Drag and drop
Game Skin
inskin
inGameStarter
Script - Uncheck
Referee.js
,Timekeeper.js
andBoxGenerator.js
in Inspector View
- Drag and drop
Create Title Scene
- Create
Title
Scene- Save
Main
Scene first - File>Save Scene as
- Save Name to
Title
- Add
Title
by pressAdd Current
to add inScene In Build
- Put
Title
in the top
- Delete
Game Controller
Game Object - Delete
Gun.js
inMain Camera
Game Object
- Save
TitleScreen.js
- Create Empty Game Object
- Change Name to
Title
- Add
Title.js
and change skin toGame Skin
-
ResultScreen.js
(change)