# How should I design game object dependencies between windowing, input and behavior systems?

This is my first time attempting to create a game engine. I came across a theoretical problem and would like to solve it before implementation. Right now I have a WindowSystem, which opens the window, sets the GL_CONTEXT, etc. I would like it to be responsible for all things window. Then I have another system that manages input called InputSystem. Then I have a BehaviorSystem for game object behavior.

The problem: Consider a game object representing a menu where it has options to change the resolution/other graphics settings. How can I link these three systems with minimal coupling so that a Behavior script can close the window? Normally systems interact through components, but there's no component for the window. From what I've read systems shouldn't know about each other. I haven't a clue how I could go about such a scenario.

• Hello and welcome to Gamedev.SE! Questions that are not game development specific, are considered offtopic. In other words, it does not take an expert in gamedev to answer this, but any programmer, thus its more suitable for stackoverflow. However, observer pattern might help. – Katu Jun 27 '16 at 6:55
• The data for your window configuration should be in a component... – Vaillancourt Jun 27 '16 at 12:27
• Aye but then is it really worth every entity having a window component? I thought about making it part of the behavior component. The window system during init will give the behavior component a reference. Every update the input system will give the behavior component a list of keys. Then you can use this right in your behavior code like "If (Keys.down['up'])" – gjh33 Jun 28 '16 at 23:08