Unit 4: Programming - Subjective Questions

CSE434 — Game Development In 3D • Practice Questions with Detailed Answers

20 questions

1

Define a scripting language in the context of 3D game development. Explain its role in creating game behavior.

2

Explain the important characteristics that make a scripting language suitable for game development.

3

Describe the purpose of the common Unity scripting lifecycle methods Awake, Start, Update, FixedUpdate, and LateUpdate.

4

What are game architecture patterns? Explain why they are important in a large 3D game project.

5

Compare the State, Singleton, and Observer patterns based on their purpose, structure, and typical game-development applications.

6

Define the State pattern and explain its main components using a player-character example.

7

Describe how you would implement a State-pattern-based enemy AI with patrol, chase, attack, and dead states.

8

Explain the role of state transitions and the Enter, Execute, and Exit operations in the State pattern.

9

Distinguish between implementing character behavior with a large if or switch statement and implementing it with the State pattern.

10

Define the Singleton pattern. Explain how it can be used for a game manager in a 3D game.

11

Explain how a persistent Singleton can be implemented safely in Unity. Discuss duplicate-instance handling and initialization concerns.

12

Evaluate the advantages and disadvantages of using the Singleton pattern in game development.

13

Define the Observer pattern and describe its publisher-subscriber relationship.

14

Describe how the Observer pattern can be used to update a health bar when a player's health changes.

15

Compare event-driven communication through the Observer pattern with polling in a game system.

16

What are the common problems associated with Observer-pattern implementations, and how can they be prevented?

17

Define a Scriptable Object in Unity and explain how it differs from a MonoBehaviour.

18

Explain how Scriptable Objects support data-driven game design. Illustrate your answer with a weapon system.

19

Compare Scriptable Objects, plain C# classes, and MonoBehaviour components as methods of storing game data.

20

Explain how Scriptable Objects can be used as event channels. State the advantages and precautions of this approach.