How would you design input handling that supports keyboard, gamepad and touch, plus key rebinding?
What the interviewer wants to hear
- Use an action-based system like Unity Input System or Unreal Enhanced Input
- Gameplay reads actions, not raw keys
- Separate action maps or contexts for gameplay, UI and vehicles
- Rebinding UI saves overrides, for example as JSON
- Show correct button prompts for the active device; handle dead zones
Model answer
I would use an action-based input system, such as Unity's Input System or Unreal's Enhanced Input. Gameplay code only reads actions like Move, Jump and Interact, and each action has bindings for keyboard, gamepad and touch controls. I group actions into maps or mapping contexts, for example gameplay, UI and driving, and switch them when the game state changes so keys do not do two things. For rebinding, the settings menu starts an interactive rebind on an action, checks for conflicts, and saves the overrides, which Unity can export as JSON. The UI listens for the last used device and shows matching button prompts. I also tune stick dead zones and sensitivity and keep accessibility options like hold versus toggle.
Can you answer it under time pressure?
Take a timed medium round and get scored on every answer.
More medium Game Developer questions
- Your game runs at 40 FPS but must hit 60 FPS. How do you find and fix the problem?
- How would you design a save game system?
- How would you build the AI for an enemy guard that patrols, notices the player, chases and attacks?
- How would you choose between Unity, Unreal and Godot for a new project?
- How do you make game systems easy for designers to tune without changing code?
- How would you build a third-person camera that follows the player smoothly and does not clip through walls?
- Players report that their character sometimes falls through the floor. How do you investigate and fix it?
- How would you procedurally generate dungeon levels that are always playable?
- Describe how you would design a reusable object pool and what trade-offs it has.