B
B
Ben_r0072020-04-17 16:37:48
.NET
Ben_r007, 2020-04-17 16:37:48

Game architecture. How to separate the menu from the game loop?

Hello.
My question is for professional developers who know what, how and why.
I am familiar with the basics of C#. Including OOP.
There are difficulties with understanding delegates and events, i.e. how it works.
I'm planning to write a game. No Unity, Win Forms or Monogame. Start simple.
And here on simple, the question arises!
There is a menu. Let's say 3 points. Play, "Settings" and "Exit".
How to separate all these 3 cycles? Main menu, settings menu and game loop?
In Python, I wouldn't bother, but in C#, the model is OOP, and you have to do it the smart way.
How? And most importantly, what is the right way?
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#, 2020-04-17
@Ben_r007

maybe you need to meditate here - Event loop
and here - command based application event loop ( upd in this place you can and should creatively change the request until it is completely enlightened)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question