3
\$\begingroup\$

I have a very general question: In games, what use does the programming concept of a window have? Or, in other words, why do some game dev libraries offer interfaces through which to create multiple windows? — Why would you need more than one windows in a game?

Are multiple windows used as different views/states of the game? (I.e. in-game, main menu, pause menu, etc.)

\$\endgroup\$

4 Answers 4

5
\$\begingroup\$

They are literally as you describe; a window is a window on the screen. It is separate from a 'View', which acts like a viewport (a part of the display) or a 'State' (which is more like a separate menu).

\$\endgroup\$
1
\$\begingroup\$

Some devices can render to more than one window. It's increasingly common for desktop computers to have two screens, and there are platforms like the DS and 3DS that offer multiple screens.

\$\endgroup\$
7
  • \$\begingroup\$ What about normal 2D games (Super Meat Boy, BEEP, Braid, etc)? -- Do they have a use for multiple windows? \$\endgroup\$
    – Paul Manta
    Jun 5, 2011 at 12:12
  • \$\begingroup\$ @Paul: That isn't the question. \$\endgroup\$
    – DeadMG
    Jun 5, 2011 at 12:19
  • \$\begingroup\$ What do you mean? It's exactly the same question. Your answer provided some details, but not enough. In your average PC game, is there a use for two or more windows? \$\endgroup\$
    – Paul Manta
    Jun 5, 2011 at 12:20
  • 1
    \$\begingroup\$ The initial question was broad enough to include this. \$\endgroup\$
    – Paul Manta
    Jun 5, 2011 at 12:55
  • 2
    \$\begingroup\$ @DeadMG He has got a 'why' in there, and he hasn't edited. \$\endgroup\$ Jun 5, 2011 at 17:19
1
\$\begingroup\$

While most games don't use multiple windows, tools will often create more than one separate window that they want to render to.

\$\endgroup\$
1
\$\begingroup\$

A window is an organizational tool, as noted for separating and displaying information. In a PC context you'd generally use this for (as example) a primary output window and a debug window (or a game window and a multiplayer lobby/chat).

I don't see a lot of games that use multiple windows, generally I see view ports used to divide up the screen among a viewable game area, inventory, chat and so on though even that is somewhat out of vogue right now, with most controls simply overlaying the play area in a HUD like display.

Hope this is what you were looking for.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .