vendredi 9 avril 2021

Game design: Decouple rendering from logic: how to?

One rule in game design is (whenever possible) to decouple rendering from logic. Here I was wondering about the problem specific to console-games that you turn into fancy 2D graphics.

Let's say I have a Poker card game. Each player plays in each turns. The problem is, that the rendering loop can't stop to wait the player to choose a card, but the engine itself can run sequentially. I was thinking of state pattern, or something like a multi-threaded engine but only one thread can run at once (one for logic, one for rendering). How to solve this problem / design patterns about this ?

Aucun commentaire:

Enregistrer un commentaire