The problem

I want to write a simple GUI framework designed for a game, in order to learn the inner workings and nitty-gritty of how GUI 'engines' such as Unity3D's GUI work. I can't find any resource to help me get started.

What I'm looking for exactly is the abstract methodology of GUI programming, so things like what are the components of a GUI framework, how often and in what ways should the interface be updated with data, what are the different ways to connect the visuals in the interface to the logic behind them, how should clicking events be handled, things like that.

What I tried

I've been trying to research my options for months but to no avail. Looking up keywords like "GUI programming" or "GUI programming philosophies" leads nowhere and doesn't answer the questions I mentioned above.

There are plenty of resources and tutorials out there for things like OpenGL, how to write a game loop, how to write a physics engine, but nothing like that for writing GUI systems. The wikipedia pages for these topics are also usually a good starting point, but the GUI entries are too design-focused, failing to focus on programming-specific methodology/architecture.

I also tried starting from the web GUI frameworks I know such as React and Angular, and learned a few interesting things like the the view-model-viewmodel architecture and React's virtual DOM, but I still don't know how to apply them, how to generalize them into some framework/philosophy I can follow while coding, and whether there are any other possible options.

P.S. My environment is C# and OpenGL through OpenTK, but that hopefully won't matter in terms of respondents giving a broad overview.


closed as off-topic by DMGregory Feb 26 at 17:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – DMGregory
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    \$\begingroup\$ As you suspected, this question is too broad to suit our Q&A format here. However, it looks like you've got enough reputation already to ask in a less-formally-structured context like Game Development Chat. There you might be able to get some of your initial uncertainties sorted out, and you can come back here to refine your question to a more specific topic we can re-open. \$\endgroup\$ – DMGregory Feb 26 at 17:50
  • 1
    \$\begingroup\$ @DMGregory I can answer this question with reasonable accuracy. Can we bring it back to life, please? I've issued a re-open vote. I'd only suggest that the OP removes the "what are some resources" part as we don't accept list-type questions. \$\endgroup\$ – Engineer Feb 26 at 19:27
  • 2
    \$\begingroup\$ @Engineer please feel free to make the edits you consider appropriate — it's easy to roll them back if OP disagrees. The question is now in the reopen queue, so if other users agree that your edits narrow it to an answerable scope, they can vote to re-open it, so the process isn't bottlenecked on convincing any one moderator. \$\endgroup\$ – DMGregory Feb 26 at 19:36
  • 1
    \$\begingroup\$ @H. Saleh I've now edited your question a little. It is otherwise well-written. Let's hope it gets re-opened shortly. \$\endgroup\$ – Engineer Feb 26 at 19:45
  • 3
    \$\begingroup\$ I still feel like this question is way too broad for this site. And questions that are in a too broad state need to be put on hold, that's how the site works. \$\endgroup\$ – Tyyppi_77 Feb 27 at 7:30