# Unity prototype

- Category : Game dev
- Tools : Unity, C#, WebGL
- Page : https://mverzeletti.com/en/work/prototype-unity
- Play the prototype : http://mmi24h10.mmi-troyes.fr/games/mov/

> My first steps with the **Unity** engine and **C#**: a small 3D scene you can play in the browser.

![Screenshot of the Unity prototype](https://mverzeletti.com/uploads/m_t1cover/w1110.webp)

**Unity** is a cross-platform **game engine** (smartphone, computer, consoles and web) developed by Unity Technologies. It offers a free “Personal” licence, with a few limitations on advanced editor features but none on the engine itself.

It is **one of the two most widely used engines in the industry**, by **big studios** and **indie developers** alike. Compared with its main competitor, Unreal Engine, Unity is known for a more approachable interface that suits independent productions.

## Process

As part of my degree, and with my future career in mind, I started learning the Unity engine and the C# language.

### Step one

To experiment with the engine, I built a small, unpretentious project to discover the grass system. I first created a little scene that I sculpted to add bumps, complexity and life. I then added grass with Unity's built-in system, plus a capsule that would later become the player.

*Game engines often use a capsule to represent a human: it is a simple, stable shape that handles collisions, movement and stairs without getting stuck in the scenery.*

![Screenshot of the Unity prototype](https://mverzeletti.com/uploads/m_t1p1/w1919.webp)

![Screenshot of the Unity prototype](https://mverzeletti.com/uploads/m_t1p2/w1919.webp)

![Screenshot of the Unity prototype](https://mverzeletti.com/uploads/m_t1p3/w1919.webp)

[Video](https://mverzeletti.com/uploads/m_t1v1/web.mp4)

### Step two

Next, I enriched the scene with trees and rocks. To do so, I installed *prefabs* from an online library (a prefab is a pre-configured object template, with its components and settings, that can easily be reused across a game). I also added large boulders to fence in the play area so the player can't leave the map and fall into the void.

![Screenshot of the Unity prototype](https://mverzeletti.com/uploads/m_t1p4/w1919.webp)

![Screenshot of the Unity prototype](https://mverzeletti.com/uploads/m_t1p5/w1919.webp)

![Screenshot of the Unity prototype](https://mverzeletti.com/uploads/m_t1p6/w1919.webp)

[Video](https://mverzeletti.com/uploads/m_t1v2/web.mp4)

### Step three

Then I added the player's movement system and the mouse-controlled camera.

[Video](https://mverzeletti.com/uploads/m_t1v3/web.mp4)

[Video](https://mverzeletti.com/uploads/m_t1v4/web.mp4)

**Final step**

Finally, I used the WebGL build target so the prototype can be played straight from a web browser.

[Video](https://mverzeletti.com/uploads/m_t1v5/web.mp4)

[Play the prototype](http://mmi24h10.mmi-troyes.fr/games/mov/)
