Abstract
The aim of the course was to provide an insight into programming languages based on C# and to give an introduction to the basics of Unity. However, as this technical subject was taught in the Digital Arts programme, which mainly includes students coming from a design approach, it was particularly important for me to convey the principles, introduce the students to analytical thinking as well as to design the exercises with the aim of achieving visual results in Unity and providing allegories in a more personal approach.
In the following, I would like to briefly discuss the individual exercises and my thoughts on them. See the conclusion section to read further about my students impression of how I did.
After teaching Liveproduction in the first part of my last study year, I was asked to help out in the subject “Game Programming” as well. However this time, I did not teach alone, but took over half of the exercises (every second one), with FH-Prof. Dr. Martin Kocur, B.A. M.Sc. organising the other half and having an overview of the subject.
Scopes, Visibility & Moving Objects
In my first exercise (which was the second exercise overall), I wanted to build on the basics of Martin’s first exercise (variables and IF conditions) and explain the principle of scopes as well as visibility. In my opinion, this was important to understand why curly brackets are needed and how variables are used with them. As this also deals with visibility (a variable that is created within a scope is not visible outside it), the principle of visibility of public and private should also be dealt with in a separate exercise.
To create a visual effect, an example in Unity was used to explain how 3D objects can be moved using variables and methods.
Components & ManagerObjects
In this exercise, I wanted to go into the principle of using scripts as components in Unity and reiterated that scripts can be understood as reusable functionalities of a 3D object. I explained this using the example of a car. This car object could have a movement script, which is only responsible for locomotion, and a horn script, which concentrates on this. By splitting it up, the script can in turn be used independently for other objects.
I also emphasised the importance of variables within the components using the example of manager objects. For example, I cited the example of the score manager, where a variable is responsible for counting the number of points – in this case, variables are responsible for enabling the aforementioned functionality (script) of the 3D object. It was particularly important for me to understand how a problem can be broken down into smaller problems. For example, how the functionality of the motion script could require the following properties / variables:
- Direction of movement
- Movement speed
Arrays
In this exercise block, I wanted to let the students explore the use of loops themselves. To do this, I started by repeating their structure and how arrays content could be printed. As a warm-up exercise, the content of an array of numbers was to be added up. After the students had already learnt about the rigidbody component in the previous exercise with Martin, in the second part, the students should be able to see that not only numbers, but also references to other 3D objects could be stored within an array. In order to enable a visual change – unlike the number array – the 3D objects in the array were to be accelerated in an undefined direction when a button was pressed: The first game dynamics.
Unity2D
To familiarise the students with 2D game development, I used an exercise to apply the concepts they were already familiar with and to demonstrate specific procedures in the use of tilemaps, among other things.
Conclusion
Even though – from my point of view – the learning effort in this exercise was very high and therefore demanding, I realised during the semester that my focus on allegories, comparisons that the students were familiar with and the personal approach, as well as the willingness to repeat individual content more often and with different examples, paid off. Students came to me outside the classroom and thanked me for my way of teaching and for the fact that they always had the feeling that they could come to me with problems without having to feel bad.
That alone and the shared joy when a bug was solved during the lesson was definitely worth it for me to have put a little more time into the preparation than I had initially planned. I can therefore say without hesitation that I am really happy that I took the opportunity of teaching this subject. Finally, I would like to say that I am really proud of the students’ results and progress, because despite the hurdle of having to take a technical subject in a design-focused programme, they were increasingly attentive, asked good questions and were interested in taking as much as possible from the lessons.
(On this occasion I’d like to address a little greeting to a certain person who always happened to anticipate a new topic with a suitable question just before I wanted to move on to it xD)