1. Which use-case would you consider is appropriate for MVC? 1. Storing and updating in-game Currency. 2. Having different types of characters. 3. For adding elements to the game over time. 4. Creating skins for any elements in game
2. Why is a Service class used for a gameObject? 1. It is responsible for the creation of gameObject. 2. To interact with other services. 3. It holds references for MVC classes to perform operations on them.
3. Where are the events supposed to be created inside an MVC-S design pattern?
4. What is the responsibility of Model in MVC? 1. Holding all the data relevant to the gameObject. 2. Model communicates directly with View to carry out logic. 3. Adding or Retrieving data.
5. When the deadline for the coding assignment is only 2 days, how will you prioritize design patterns and code architecture for it?
6. What does MVC stand for?
7. Who invokes the actual actions (e.g., Action1() and Action2()) in the Command Pattern?
8. Why is the WillHitTarget() method moved to the UnitCommand class from the IAction class?
9. Can the Command Pattern be used for implementing undo and replay features in non-deterministic game engines?
10. What is the responsibility of the Command Invoker in the Command Pattern?
11. Can the Command Pattern be used for implementing undo and replay features in games with continuous gameplay?
12. How does the Command Pattern encapsulate method invocations?
13. In context of Command Pattern, what does the object requesting the action needs to know?
14. When implementing the Undo feature, why should each command class have an Undo() method that knows how to reverse its action?
15. In the Command Pattern, what does the term "Abstract Command" represent?
16. The Model in an MVC architecture is responsible for:
17. The Controller in an MVC architecture is responsible for:
18. Can you identify a scenario where applying MVC to a project might be over-engineering?
19. How can improper communication protocols between MVC components lead to issues in software development?
20. The View in an MVC architecture is responsible for:
A. 1,2,3
B. 2,3,4
C. 2,3
D. 1,3,4
A. 1,2
B. 2,3
C. 1,3
D. All of the above.
A. Inside the Service.
B. Inside the Model.
C. Inside the Controller.
D. Inside the View.
A. 1,2
B. 1,3
C. all of the above
D. none of the above.
A. As the deadline is too strict, I will only do the implementation properly and will not worry about the quality of the code.
B. No matter what is the deadline, I will try the best code of my life. I will ask for some buffer days if I am not able to manage the deadline but I will not compromise on code quality.
C. I will skip the assignment because the deadline is too strict and there is no point in submitting the rushed code.
A. Model-View-Component
B. Model-Value-Component
C. Model-View-Controller
D. Model-Value-Controller
A. The Client
B. The Command Invoker
C. The Concrete Command
D. The Receiver
A. To ensure consistent results when executing the same command
B. To increase code modularity
C. To simplify the implementation of IAction
D. To make the code more readable
A. Yes, by recording and replaying individual player actions just like in deterministic engines.
B. Yes, by periodically taking snapshots of the game state to provide some level of consistency.
C. No, the Command Pattern is not suitable for non-deterministic game engines.
D. Yes, by creating branching timelines to account for the multiple possible outcomes.
A. It creates specific implementations of commands.
B. It triggers the execution of commands and manages them.
C. It carries out the actual actions associated with commands.
D. It acts as the client in the pattern.
A. Yes, by storing player actions as command objects and replaying them in the same order as they were originally executed.
B. No, the Command Pattern is only suitable for games with discrete gameplay, and it cannot handle continuous gameplay.
C. Yes, by employing a time-stamped command queue to maintain the sequence of actions for replay.
D. Yes, as long as you have a Time-Traveling Unicorn
A. It separates the client, receiver, and action itself, by representing actions as objects.
B. It uses encryption to secure method calls.
C. It stores method invocations in a command history.
D. It creates a separate class for each method.
A. All details of method execution.
B. How to execute the action itself.
C. The encapsulated request to execute.
D. Nothing at all
A. To complicate the codebase and add redundancy.
B. To enable players to undo multiple actions simultaneously.
C. To ensure that the Undo feature works seamlessly with all unit actions.
D. To store a history of commands in a separate registry.
A. The actual action to be executed.
B. A template for encapsulating an Execute() call.
C. The client's request to the invoker.
D. The concrete implementation of a command.
A. Rendering graphics and handling user interface elements.
B. Managing the data and business logic of the application.
C. Processing user inputs and corresponding events.
D. Coordinating between the View and Controller components.
A. Storing and managing application data.
B. Rendering user interface components and graphics.
C. Handling the input, processing user interactions, and making calls to Model objects.
D. Ensuring the data integrity and security of the application.
A. A solo developer participating in a weekend game jam, creating a simple, small-scale game, Flappy Bird clone.
B. A developer working on a card game with multiple cards with different looks and functionalities.
C. A team developing a narrative-driven RPG with extensive dialogue trees, character customisation, and dynamic world-building, requiring careful separation of game mechanics, story progression, and UI.
D. An indie studio working on a tower defence game with many different troops.
A. By improving code readability and organization, leading to more efficient development processes.
B. By increasing code coupling and dependency, making it difficult to isolate and modify individual components.
C. By simplifying debugging and troubleshooting, resulting in faster resolution of software issues.
D. By reducing the need for frequent updates and modifications, ensuring stability and reliability of the software product.
A. Managing the application's data and logic rules.
B. Rendering the user interface and presenting data to the user.
C. Directly handling user inputs and interactions.
D. Storing and retrieving application data from a database.
Design patterns are the best and most reusable practices used by experienced object-oriented developers. These patterns provide a procedural solution to solve a common problem and reduce the complexities in your code.
The main advantages of the design patterns are as follows:
This design pattern MCQs is curated to test your knowledge on the topic.