DIGITAL LIBRARY
TEACHING AND LEARNING COMPUTER PROGRAMMING BY CREATING 2D GAMES IN UNITY
J. Selye University (SLOVAKIA)
About this paper:
Appears in: ICERI2021 Proceedings
Publication year: 2021
Pages: 5696-5700
ISBN: 978-84-09-34549-6
ISSN: 2340-1095
doi: 10.21125/iceri.2021.1285
Conference name: 14th annual International Conference of Education, Research and Innovation
Dates: 8-9 November, 2021
Location: Online Conference
Abstract:
Teaching and learning algorithmization and programming is a long process, which might be tedious for first-year undergraduate computer science students, especially for novice programmers. First of all, students have to learn how to use, create, and develop algorithms and rewrite the algorithms to program codes using the syntax of the chosen programming language. Then, after acquiring the basics of structural programming, students learn the object-oriented programming approach. Finally, it is necessary to write many program codes to master computer programming skills. Creating many similar applications might be boring. However, creating computer games is highly motivating and exciting for students; they like to develop games much more than other applications. It is possible to develop games in many environments using various programming languages; we prefer using Unity and C# language.

In the first part of this paper, we briefly describe the possibilities of teaching and learning computer programming by developing computer games. The next part of the article focuses on 2D game development in Unity, using the C# programming language. Unity is a game engine that simplifies the process of creating computer games. Students can easily add to the game their backgrounds, graphics, animations, and they can create C# scripts to code the behaviors of the game objects. During the development of exciting computer games, they understand the event-driven programming approach, and they learn how to use variables, functions, and objects. In the following part of the paper, we introduce some of the 2D games our students created in Unity at J. Selye University. We can find 2D platformer games, 2D action games, or PC versions of classic board games among these computer games. Finally, in the last part of the article, we summarize our experiences and draw our conclusions.
Keywords:
Teaching and learning programming, creating games, Unity.