General information

Subject type: Mandatory

Coordinator: Ana Beatriz Pérez Zapata

Trimester: Second term

Credits: 4

Teaching staff: 

Lasse Loepfe

Teaching languages

  • Spanish
  • Catalan

The materials can be provided in Catalan as well as in Spanish or English. 


Specific skills
  • V6. Develop video games in high-level programming languages ​​in graphics engines based on specifications.


The subject introduces the student to the programming of 2D games. The main tool used is Unity, although the course focuses more on the key concepts of game development and not on the specific tool used to implement the examples and practices.

During the development of 4 independent projects the main concepts are theoretically introduced in the first classes with small examples that students can experience. Once the concepts have been explained, the students carry out their project, with the support of the teacher at all times during the classes. The games must be delivered on time and in the proper form.

The exam consists of implementing in a practical and eoric way concepts presented in class.



Topic 1: Introduction and physics of the player

1.1 Character Movement

1.2 Jump physics

      1.2.1 Vertical jumps

      1.2.2 Horizontal jumps

1.3 Modification of gravity


Topic 2: Artificial Intelligence

2. 1 Player detection

     2.1.1 Distance

     2.1.2 Field of view

     2.1.3 Obstacles

2 Patrolling

   2.2.1 Waypoints

   2.2.2 Detection of platforms

   2.2.3 Pathfinding


Topic 3: UI & Scriptable Objects

3.1 IU

3. 2 Dialogue system

    3.2.1 Dialogue without interaction

    3.2.2 Dialog Options

    3.2.3 Outcome of the dialogue

3.3 Inventories

     3.3.1 Adding objects to inventory

     3.3.2 Using inventory items

3.4 Shop


Topic 4 Command Pattern

4.1 Store Actions

4.2 Entities

4.3 Undo / Redo


Topic 5(extra) Spawning & Procedural Generation

5.1 Generation of maps

               5.1.1 Grid-based dungeons

               5.1.2 Cellular automata

               5.1.3 Random Room placement

               5.1.4 BSP Tree

5.2 Perlin noise

5.3 Object Pooling

Evaluation system

The grade of each student will be calculated following the following percentages:

A1. Laboratory practice: 2D Video Game Project - Game 1 12.5%

A2. Laboratory practice: 2D Video Game Project - Game 2 12.5%

A3. Laboratory practice: 2D Video Game Project - Game 3 12.5%

A4. Laboratory practice: 2D Video Game Project - Game 3 12.5%

A5. Final practical and theoretical exam 50%




  • You must obtain a grade higher than 5 in the final exam to pass the subject.
  • You must obtain a grade higher than 5 a in the average of the practices to approve the asignatura.
  • The maximum grade that can be obtained in the extraordinary call will be 5.

  • An activity not delivered or delivered late and without justification (court summons or medical matter) counts as a 0.

  • It is the student's responsibility to avoid plagiarism in all its forms. In the case of detecting plagiarism, regardless of its scope, in some activity it will correspond to having a grade of 0. In addition, the professor will communicate the situation to the director of the department so that applicable measures can be taken in terms of disciplinary regime.



Learning C # Programming with Unity 3D. Alex Okita.

Web tutorial for games creation tools with the Unity engine (


Gamma, E., Helm, R., Johnson, R. and Vlissides, J.

Design patterns: Elements of reusable object-oriented software

1995 - Addison-Wesley - Reading, Mass.