Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.)

share|improve this question
add comment

4 Answers

up vote 5 down vote accepted

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).

share|improve this answer
add comment

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.

share|improve this answer
    
What about normal 2D games (Super Meat Boy, BEEP, Braid, etc)? -- Do they have a use for multiple windows? –  Paul Manta Jun 5 '11 at 12:12
    
@Paul: That isn't the question. –  DeadMG Jun 5 '11 at 12:19
    
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? –  Paul Manta Jun 5 '11 at 12:20
1  
The initial question was broad enough to include this. –  Paul Manta Jun 5 '11 at 12:55
2  
@DeadMG He has got a 'why' in there, and he hasn't edited. –  The Communist Duck Jun 5 '11 at 17:19
show 2 more comments

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.