General information


Subject type: Mandatory

Coordinator: Adso Fernández Baena

Trimester: First term

Credits: 6

Teaching staff: 

Marco Antonio Rodríguez Fernández
Alejandro Jiménez Encinas 

Skills


Specific skills
  • E7. Develop video games in interpreted languages ​​to prototype gameplay, user experience and balance.

General competencies
  • G3. Gather and interpret relevant data (usually within their area of ​​study) to make judgments that include reflection on relevant social, scientific, or ethical issues.

  • G5. Develop the learning skills needed to undertake further studies with a high degree of autonomy.

Transversal competences
  • T2. Work as a member of an interdisciplinary team either as an additional member or performing management tasks in order to contribute to developing projects with pragmatism and a sense of responsibility, making commitments and taking into account available resources.

Description


Interpreted languages ​​are widely used as a resource in the programming of applications and video games, for their great flexibility, versatility, simplicity and efficiency. At the same time, integrated into more complex compiled applications, they provide valuable tools such as real-time interactive development, execution, and debugging, saving resources and compile time in the main application (or engine). 

In this course we will introduce one of the most widely used interpreted languages ​​currently in the video game industry: Lua (www.lua.org).


As this is a second year subject (where three previous programming subjects have already been taken) it is assumed that the student has an adequate knowledge of the fundamentals of programming, Object Oriented Programming and Applied Programming. in video games. In this sense, it should be noted that there will be an introduction to the language and its particular characteristics, to quickly focus on programming applications through scripting in game environments. In the event that the student has not satisfactorily achieved the contents of the previous programming subjects, a very intensive work is recommended in advance to consolidate the knowledge necessary to follow the subject normally.

This subject has methodological and digital resources to make possible its continuity in non-contact mode in the case of being necessary for reasons related to the Covid-19. In this way, the achievement of the same knowledge and skills that are specified in this teaching plan will be ensured.

Learning outcomes


At the end of the course students must be able to:

E6.6. Develop video games in 2D and 3D (or parts of it) in high-level languages ​​on platforms and engines intended for this purpose.

E7.1. Classify and describe current interpreted languages ​​and their characteristics.

E7.2. Programming with interpreted languages ​​to develop gameplay, interaction and balancing prototypes.

Working methodology


The subject will use the following work methodologies:

Master class, case study, small group laboratories and question-based learning.

This course, due to the situation generated by COVID, some of the large group sessions will be held in hybrid format: face-to-face and online (via streaming). This will allow students to rotate to face-to-face classes, respecting the maximum number of students per classroom imposed by the distance measures. When they are not in contact, they will be able to follow the class online from home.

With regard to internship sessions in smaller spaces (such as laboratories, studios or sets), where appropriate, work will be carried out simultaneously in several spaces in order to ensure that the conditions established by the safety protocols are met.

Contents


1. Introduction to interpreted languages
1.1. Classification of programming languages
1.2. Compiled languages ​​vs interpreted languages
1.3. Basic concepts of interpreted languages
2. Programming with Lua
2.1. Basic features
2.2. Common uses
2.3. Interpreter / IDE
2.4. Modes of development
2.5. Chunks and blocks
2.6. Grammar rules
2.7. Unwritten rules and programming style
2.8. Local variables and global variables
2.9. Regular operators (arithmetic, relational and logical)
2.10. Specific operators (concatenation and size)
2.11. Table builders
2.12. Multiple return
2.13. Higher order functions
2.14. Variable arguments
2.15. Metatables and metamethods
2.16. Object-oriented programming
3. Graphic programming with the Love engine
3.1. Events
3.2. Graphics
3.3. Finite state machines (FSM)
4. Application of scripting to game environments: Modding
4.1. Data files (csv, xml, json).
4.2. Game configuration files.
4.3. Integration in applications and game engines
4.4. Structural analysis of a commercial game.
4.5. Use of Lua and Xml, for the generation of mods.
5. Application of scripting to gaming environments: Lua embedding in the Unity3d engine
5.1. Integration of a Lua performer as an asset.
5.2. Runtime load.
5.3. Interaction with Unity3d objects

Learning activities


With the aim of collecting evidence of the achievement of the expected learning outcomes, the following activities of an evaluative nature will be carried out (related to all the common competences):

A1. Exercise in class: Tables with Lua (Evidence of learning outcome E6.6)

A2. Exercise in class: Sprites with Lua (Evidence of learning outcome E6.6)

A3. Exercise in class: Sprites with Lua2 (Evidence of learning outcome E6.6)

A4. Exercises in class: Luathon (Evidence of learning outcome E6.6)

A5. Exercise at home: Modding with Lua (Evidence of learning outcome E7.2)

A6. Exercise at home: Scripting with Lua (Evidence of learning outcome E7.2)

A7. Laboratory practice: Introductory session with Lua's interpreter (Evidence of learning outcome E6.6)

A8. Laboratory practice: Programming a game with the Love bookstore (Evidence of learning outcome E6.6)

A9. Laboratory practice: Programming a structured game with Love (Evidence of learning outcome E6.6)

A10. Laboratory practice: Making scripts on Lua for a commercial game (Evidence of learning outcome E7.2)

A11. Laboratory practice: Integration of scripting in Lua with a game performed on a graphics engine (Evidence of learning outcomes E7.2 and E6.6)

A12. Final Exam (Evidence of all learning outcomes)  

 

General criteria of the activities:

  • The teacher will present a statement for each activity and the evaluation and / or rubric criteria.
  • The teacher will inform of the dates and format of the delivery of the activity.

Evaluation system


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

 

A1. Exercise in class: Tables with Lua 1.5%

A2. Exercise in class: Sprites with Lua 1.5%

A3. Exercise in class: Sprites with Lua2 1.5%

A4. Exercise in class: Luathon 1.5%

A5. Exercise at home: Modding with Lua 2.5%

A6. Exercise at home: Scripting with Lua 1.5%

A7. Laboratory practice: Introductory session with Lua's interpreter 4%

A8. Laboratory practice: Programming a game with the Love 6% bookstore

A9. Laboratory practice: Programming a structured game with Love 12%

A10. Laboratory practice: Making scripts on Lua for a commercial game 6%

A11. Laboratory practice: Integration of scripting in Lua with a game performed on a 12% graphics engine

A12. Final Exam 50%  

 

Final grade = A1 0,015 + A2 0,015 + A3 0,015 + A4 0,015 + A5 0,025 + A6 0,015 + A7 0,04 + A8 0,06 + A9 0,12 + A10 0,06 + A11 0,12 + A12 0,5

Considerations:

· It is necessary to obtain a note superior or equal to 5 to the final examination to be able to pass the asignatura.

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

· It is the responsibility of the student to avoid plagiarism in all its forms. In the case of detecting plagiarism, regardless of its scope, in any activity it will correspond to having a mark of 0. In addition, the teacher will inform the head of studies of the situation so that applicable measures can be taken in the matter of sanctioning regime.

· Attendance at laboratory practices is mandatory.

Recoveries:

· The retake exam only retrieves the grade of the final exam. Students who have a grade of not taking the final exam will not be able to take the resit exam.

REFERENCES


Basic

Lerusalimschy, R. (2006). Programming in lua. Roberto Ierusalimschy.

Lerusalimschy, R., De Figueiredo, LH, & Celes, W. (2006). Lua 5.1 reference manual.

Kasuba, M. (2015). Lua game development cookbook. Packt Publishing

Complementary

 

Paxton, D. (2016). Mooder's guide to Civilization V. Retrieved from https://forums.civfanatics.com/resources/modders-guide-to-civilization-v.23669/

 

Young, D. (2014). Learning game AI programming with Lua. Packt Publishing Ltd.