Design a flexible ability and buff system for an RPG with hundreds of skills.
What the interviewer wants to hear
- Data-driven abilities built from reusable effects
- Attributes with modifiers: add, multiply, override, with stacking rules
- Tags to handle conditions, immunities and cooldowns
- Clear order of calculation and events
- Networking and prediction if multiplayer
- Debugging tools and performance
Model answer
With hundreds of skills, hard-coding each one would be impossible to maintain, so I would make the system data-driven and composable. An ability is data: costs, cooldown, targeting and a list of effects. Effects are small reusable building blocks, like deal damage, apply a modifier, spawn a projectile or add a tag. Characters have attributes such as health and attack, and effects apply modifiers that add, multiply or override, with defined stacking rules and a fixed calculation order. Gameplay tags handle states like Stunned, immunities and cooldowns, so conditions are simple queries. The system raises events, like on hit, so passive skills can react. In Unreal I would build on the Gameplay Ability System, which also handles network prediction. I would add a debug view showing active effects on any character.
Can you answer it under time pressure?
Take a timed hard round and get scored on every answer.
More hard Game Developer questions
- How would you design the networking for a fast-paced online multiplayer shooter?
- How do you manage memory in a large game that ships on consoles with fixed memory?
- Explain how a modern real-time rendering pipeline draws a frame, and where the common performance costs are.
- How would you reduce cheating in an online game?
- The game averages 60 FPS but players complain about hitches every few seconds. How do you find and fix them?
- How would you build a replay system that lets players rewatch a match, and what makes it hard?
- How would you architect world streaming for a large open-world game?
- How do you use multiple CPU cores in a game without race conditions and with real speed-ups?
- How would you design the backend for an online game with matchmaking and dedicated servers?