Skip to article
AHFE AHFE Discoveries AHFE International Open Access Journal
AHFE OPEN ACCESS OPEN ACCESS CONFERENCE PROCEEDINGS PAPER

Dynamic Difficulty Adjustment via Dynamic Scripting: An Empirical Study of Player Flow in a Brawler Game

National University, USA ↗
Publication year
Digital Object Identifier10.54941/ahfe1007068

Abstract

Getting the level of challenge right in action games has always been difficult, especially in fast-moving titles where player skill can vary sharply from one person to the next. Fixed difficulty options rarely adjust well to how someone is actually performing in the moment. To explore a more responsive solution, we created a side-scrolling brawler in Unity with two different enemy control setups: one powered by real-time adaptive scripting and another built around a standard, non-adaptive AI. In the adaptive version, enemy actions shifted in priority based on the outcome of earlier encounters, while the underlying finite state machine remained unchanged so that behavior changes felt consistent rather than erratic. The study used a quasi-experimental setup with 42 participants recruited online. Each person filled out a short survey before playing, completed one version of the game, and then responded to a follow-up questionnaire focused on attention, perceived difficulty, and immersion. This approach made it possible to see how players responded as enemy behavior gradually changed during a single play session. The results show how dynamic scripting behaves in a fast-paced game with constant enemy encounters and how players respond when the difficulty shifts during play. For game designers, the patterns in the data argue for testing longer play sessions and not relying on just one way of adjusting difficulty.

INTRODUCTION

Action games place constant pressure on players to react quickly, track multiple threats, and adapt to a changing pace of play. Because players differ widely in experience and skill, designing a difficulty structure that fits everyone remains an ongoing challenge (Dziedzic et al., 2018). Most commercial titles still depend on fixed difficulty modes, yet these modes rarely reflect how the player actually performs once a session begins. A player who selects a difficulty that is too low may lose interest, while another who picks a level that is too demanding may struggle early and disengage (Chanel et al., 2011). This mismatch between projected ability and real in-game performance is a major reason Dynamic Difficulty Adjustment exists (Hunicke, 2005). Rather than locking the experience to a setting chosen at the start, DDA allows the game’s challenge to shift as play unfolds.

96 Gold and Dhou Several approaches to DDA have been explored in prior work, including performance-based tuning, behavior shaping, and reinforcement-style adjustments to AI logic. Andrade et al. (2005) introduced early performance- driven methods that adjusted enemy behavior based on the player’s success rate, while later reviews highlighted the variety of adaptive systems that have been proposed and the need for more empirical testing across genres (Zohaib, 2018). Despite extensive research activity, only a subset of Dynamic Difficulty Adjustment methods have been empirically evaluated with human participants under controlled conditions, with many approaches remaining conceptual or tested in isolated or non-real-time environments (Sepulveda et al., 2019; Zohaib, 2018).

Dynamic scripting is one of the DDA methods that has attracted interest because it adjusts enemy behavior through weighted rule updates while still relying on familiar finite state machine structures. Spronck et al. (2006; 2004) introduced systems in which tactic weights are adjusted using straightforward performance-based measures, along with controls such as weight clipping and top-culling to prevent overly aggressive shifts in behavior. Later studies built on this early work and showed that dynamic scripting can keep enemy behavior stable and readable while still adjusting to how the player performs (Majchrzak et al., 2015; Policarpo et al., 2010; Spronck et al., 2006). That said, most of this work has been tested in controlled settings or in slower- paced games, which means short, high-pressure action encounters have received far less attention (Majchrzak et al., 2015; Zohaib, 2018).

Judging the effect of an adaptive system on players cannot rely on scores alone. What matters just as much is how players remain mentally absorbed as the game pushes back. Flow theory is often used to describe this balance between mental focus, perceived challenge, and the sense of being drawn into the experience (Csikszentmihalyi and Csikzentmihaly, 1990). Game-specific adaptations, such as the EGameFlow instrument (Cruz and Uresti, 2017), make it possible to capture how players interpret their moment-to-moment experience rather than simply how well they perform. Because DDA systems are intended to keep the challenge aligned with the player’s skill, shifts in these aspects of flow should, in theory, reflect whether the system is working as intended (Csikszentmihalyi and Csikzentmihaly, 1990; Hunicke, 2005).

However, little is known about how dynamic scripting behaves in realtime action games where enemies spawn and disappear rapidly and where players have limited time to sense or respond to behavioral changes. Most empirical DDA research has centered on strategy games, puzzles, exergames, or longer play sessions that give the player time to adjust or to build mastery (Ang and Mitchell, 2017; Aponte et al., 2011). This leaves a gap concerning action games that rely on short, repeated encounters—games where adaptive systems may operate on a much tighter timeline.

To address this gap, we developed a small side-scrolling brawler in Unity and produced two versions: one using a dynamic scripting system that updated enemy tactic weights during play, and one with fixed enemy behavior. Aside from the adaptive logic, the two versions were identical. By looking at how players reported their focus, sense of challenge, and level of immersion, we aimed to capture how they responded when enemy behavior shifted in

Dynamic Difficulty Adjustment via Dynamic Scripting 97 the middle of short combat sequences. This perspective helps clarify how dynamic scripting holds up under fast, continuous pressure and highlights several practical issues that designers need to weigh when building adaptive systems for action-heavy games.

METHOD

Game Implementation The game used for this study was a compact side-scrolling brawler developed in Unity. It was intentionally kept simple so that testing conditions could be controlled, but still flexible enough to allow enemy behavior to change during play. Aside from the AI logic, both versions were identical in how they handled movement, attack animations, enemy types, spawn timing, hit detection, and overall visual layout. This ensured that any difference in player experience could be traced back to the behavior logic of the enemies rather than other gameplay elements.

In the adaptive build, enemy behavior followed a dynamic scripting approach inspired by the system described by Spronck et al. (2006; 2004). Each enemy ran on a finite state machine that controlled a small group of core actions, including closing in on the player, initiating an attack, or backing off to create space. Instead of selecting actions with fixed probabilities, the adaptive system assigned weights to each tactic and updated these weights during the encounter. The updates were guided by a simple fitness value that compared the damage dealt by the player to the damage the player received. When certain actions led to better results for an enemy, those actions were given more influence in later encounters, while less successful choices gradually faded in importance. To keep behavior from becoming erratic, these values were restricted to a fixed range so that enemies continued to act in familiar, readable ways. The fixed-AI version used the same finite state machine but without any weight updates. In this version, the action probabilities stayed constant throughout the match. Beyond the adaptive logic, all other variables—enemy health, speed, spawn rate, and attack strength—were identical to the adaptive version. This allowed the dynamic scripting system to be isolated as the only factor distinguishing the two conditions.

Experimental Design This study used a quasi-experimental design with two conditions: one using the adaptive version of the game and one using the fixed-AI version. Participants were recruited through Amazon Mechanical Turk and were required to be at least 18 years old and familiar with basic computer controls. A total of 42 participants completed the full procedure. Each participant was randomly assigned to one of the two game versions through the survey platform, which directed them to the corresponding download link. The data collection process followed a simple sequence to reduce variability. Participants first answered a short pre-test survey measuring their baseline flow using adapted items from the EGame-Flow instrument (Cruz and Uresti, 2017). After completing the pre-test, they downloaded and played the assigned version of

98 Gold and Dhou the game. The session was designed to last only a few minutes, with a fixed number of enemy waves to ensure that everyone experienced roughly the same pacing and encounter structure. When the gameplay portion ended, participants returned to the survey to complete the post-test. The post-test contained the same flow items as the pre-test, but asked players to answer with their experience during the game session in mind. The three dimensions examined—concentration, challenge, and immersion—were selected because they align with aspects of play that are most likely to change when an adaptive system adjusts moment-to-moment difficulty.

No identifying details were gathered at any stage of the study, and participants were not asked to record gameplay footage or submit performance logs. The emphasis remained on how the game felt to play rather than on measuring skill or outcomes. All survey responses were kept anonymous, and any incomplete submissions were removed before the data were reviewed.

DATA ANALYSIS PROCEDURE The analysis focused on comparing changes in flow between the two game conditions. Because the study included pre-test and post-test scores on several related measures, a one-way repeated-measures MANOVA was used as the primary method. This approach allowed concentration, challenge, and immersion to be examined together instead of running separate tests for each dimension. Treating the measures as a group reduces the risk of inflated error rates and better reflects the structure of the data.

Before running the MANOVA, the dataset was checked for common assumptions such as missing values, outliers, and normality. Incomplete responses were removed, leaving a clean dataset of participants who completed both surveys and the full gameplay session. Each flow dimension was calculated by averaging the items associated with that construct, following the structure of the EGameFlow instrument. Pre-test and post- test values were then paired for each participant so that changes could be measured within the same individual.

The independent variable in the analysis was the game version (adaptive vs. fixed). The dependent variables were the post-test flow scores, while the pre-test scores were used as part of the repeated-measures structure to account for baseline differences. Data were examined using commonly accepted statistical tools, with overall group effects tested first and individual factors explored afterward when those results warranted it. This process allowed us to see whether the adaptive system led to meaningful differences in how players experienced the game.

GENERAL DISCUSSION The goal of this study was to understand how a dynamic scripting system behaves in a fast-paced action setting and how players respond when enemy behavior shifts during short combat encounters. Although the adaptive version changed enemy tactics during play, player responses showed that the brief session may not have given enough time for these changes to register at

Dynamic Difficulty Adjustment via Dynamic Scripting 99 a conscious level. In action games, players usually respond on instinct rather than stopping to think through what is happening, so shifts in difficulty often go unnoticed unless they build up over time. This matches earlier findings showing that the effects of dynamic difficulty become easier to spot once players grow familiar with the game’s pace and moment-to-moment mechanics (Ang and Mitchell, 2017; Aponte et al., 2011).

The results also suggest that tightly timed encounters can blur the effects of adaptive AI. While dynamic scripting shifts behavior in small steps, enemies in this game often appear and disappear within seconds, which can limit how strongly those adjustments register as a change in difficulty for the player. In slower-paced genres, adaptive systems often have room to increase or decrease difficulty in ways that shape the overall experience. In contrast, a short brawler session compresses the interaction window, which may limit how far the adaptive system can influence play before the session ends.

Another factor to consider is that flow depends on both challenge and skill increasing together. In a setting where players spend only a few minutes with the game, their skill may not rise enough for the adaptive system to create a noticeable match. Flow measures such as concentration, challenge, and immersion often shift more clearly when players develop a sense of mastery, something not easily achieved in a single brief session. Prior work on flow and engagement in games has shown that stable patterns emerge more reliably when players interact with a game across multiple attempts or longer play cycles (Cruz and Uresti, 2017).

Even so, the study demonstrates that dynamic scripting can function reliably within a fast-paced environment that generates enemies rapidly. The system adjusted tactic weights without causing extreme or erratic behavior, which is a positive sign for designers who want adaptive elements without sacrificing consistency. The results provide a clearer picture of how such systems behave under tight time constraints and point toward several directions for future work, including extended sessions, multiple rounds of play, or integrating dynamic scripting with other adaptive mechanisms that can change the pace or structure of encounters more noticeably.

Another promising research direction is to combine dynamic scripting with virtual human techniques to design enemies or allies whose behavior reflects distinct, human-like play styles, similar to prior work that modeled chess personalities using virtual agents (Caci and Dhou, 2020; Dhou, 2018; 2019; 2020; 2021a; 2021b; 2023; 2025). Such an approach could allow action-game non-player characters to express recognizable personalities while still adapting to player performance, making their behavior easier to read and more engaging.

REFERENCES

Andrade, G., Ramalho, G., Santana, H., Corruble, V.: Extending reinforcement learning to provide dynamic game balancing. In: Proceedings of the Workshop on Reasoning, Representation, and Learning in Computer Games, 19th International Joint Conference on Artificial Intelligence (IJCAI). pp. 7–12 (2005).

100 Gold and Dhou Ang, D., Mitchell, A.: Comparing effects of dynamic difficulty adjustment systems on

video game experience. In: Proceedings of the annual symposium on computer- human interaction in play. pp. 317–327 (2017). Aponte, M.V., Levieux, G., Natkin, S.: Measuring the level of difficulty in single player video games. Entertainment Computing 2(4), 205–213 (2011). Caci, B., Dhou, K.: The interplay between artificial intelligence and users’ personalities:

A new scenario for human-computer interaction in gaming. In: Stephanidis, C., Harris, D., Li, W.C., Schmorrow, D.D., Fidopiastis, C.M., Zaphiris, P., Ioannou, A., Fang, X., Sottilare, R.A., Schwarz, J. (eds.) HCI International 2020 – Late Breaking Papers: Cognition, Learning and Games. pp. 619–630. Springer International Publishing, Cham (2020). Chanel, G., Rebetez, C., Bétrancourt, M., Pun, T.: Emotion assessment from physiological signals for adaptation of game difficulty. IEEE Transactions on Systems, Man, and Cybernetics-Part A: Systems and Humans 41(6), 1052– 1063 (2011). Cruz, C.A., Uresti, J.A.R.: Player-centered game ai from a flow perspective: Towards

a better understanding of past trends and future directions. Entertainment Computing 20, 11–24 (2017). Csikszentmihalyi, M., Csikzentmihaly, M.: Flow: The psychology of optimal experience, vol. 1990. Harper & Row New York (1990). Dhou, K.: An exploration of chess personalities in grandmasters and class-A players

using virtual humans. International Journal of Entertainment Technology and Management 1(2), 126–145 (2021a), https://www.inderscienceonline.com/doi/ abs/10.1504/ IJENTTM.2021.116767. Dhou, K.: An exploration of feared versus fearless attack attitudes using the chess personalities of virtual chess players. In: International Conference on Human- Computer Interaction. pp. 176–185. Springer (2023). Dhou, K.: An exploration of the fear of attack strategy in chess and its influence

on class-a players of different chess personalities: An exploration using virtual humans. In: Fang, X. (ed.) HCI in Games: Experience Design and Game Mechanics. pp. 185–195. Springer International Publishing, Cham (2021b). Dhou, K.: An innovative employment of virtual humans to explore the chess personalities of Garry Kasparov and other class-A players. In: Stephanidis, C. (ed.) HCI International 2019 – Late Breaking Papers. pp. 306–319. Springer International Publishing, Cham (2019). Dhou, K.: A novel investigation of attack strategies via the involvement of virtual

humans: A user study of Josh Waitzkin, a virtual chess grandmaster. In: Stephanidis, C., Harris, D., Li, W.C., Schmorrow, D.D., Fidopiastis, C.M., Zaphiris, P., Ioannou, A., Fang, X., Sottilare, R.A., Schwarz, J. (eds.) HCI International 2020 – Late Breaking Papers: Cognition, Learning and Games. pp. 658–668. Springer International Publishing, Cham (2020). Dhou, K.: Exploring virtual chess personalities: Analyzing class-c players vs.

nimzowitsch and fine virtual grandmasters. In: Chen, J.Y.C., Fragomeni, G., Streitz, N.A., Konomi, S., Fang, X. (eds.) HCI International 2024 – Late Breaking Papers. pp. 311–321. Springer Nature Switzerland, Cham (2025). Dhou, K.: Towards a better understanding of chess players’ personalities: A study using virtual chess players. In: Kurosu, M. (ed.) Human-Computer Interaction. Interaction Technologies. pp. 435–446. Springer International Publishing, Cham (2018). Dziedzic, D., Włodarczyk, W.: Approaches to measuring the difficulty of games

in dynamic difficulty adjustment systems. International Journal of Human– Computer Interaction 34(8), 707–715 (2018).

Dynamic Difficulty Adjustment via Dynamic Scripting 101 Hunicke, R.: The case for dynamic difficulty adjustment in games. In: Proceedings

of the 2005 ACM SIGCHI International Conference on Advances in Computer Entertainment Technology. pp. 429–433. ACE ’05, Association for Computing Machinery, New York, NY, USA (2005), https://doi. org/10.1145/1178477.1178573. Majchrzak, K., Quadflieg, J., Rudolph, G.: Advanced dynamic scripting for figHTing game ai. In: International Conference on Entertainment Computing. pp. 86– 99. Springer (2015). Policarpo, D., Urbano, P., Loureiro, T.: Dynamic scripting applied to a first-person

shooter. In: 5th Iberian Conference on Information Systems and Technologies. pp. 1–6 (2010). Sepulveda, G.K., Besoain, F., Barriga, N.A.: Exploring dynamic difficulty adjustment in videogames. In: 2019 IEEE CHILEAN Conference on Electrical, Electronics Engineering, Information and Communication Technologies (CHILECON). pp. 1–6 (2019). Spronck, P., Ponsen, M., Sprinkhuizen-Kuyper, I., Postma, E.: Adaptive game AI with

dynamic scripting. Machine Learning 63(3), 217–248 (2006). Spronck, P., Sprinkhuizen-Kuyper, I., Postma, E.: Difficulty scaling of game AI. In: Proceedings of the 5th International Conference on Intelligent Games and Simulation (GAME-on 2004). pp. 33–37 (2004). Zohaib, M.: Dynamic difficulty adjustment (DDA) in computer games: A

review. Advances in Human-Computer Interaction 2018(1), 5681652 (2018).

Cover of the proceedings volume Intelligent Human Systems Integration (IHSI 2026): Disruptive and Innovative Technologies

Explore the complete digital volume

Intelligent Human Systems Integration (IHSI 2026): Disruptive and Innovative Technologies

Read this individual research paper free through the original publisher, or explore the full digital proceedings book.

ISBN 978-1-964867-76-2

Explore this ISBN in the AHFE Bookstore Listed in the July 2026 bookstore catalogue; search by ISBN to confirm current availability · Digital book purchase optional

Explore Related Research

Related research 8 matches

More papers from this volume

← Back to Research ExplorerBrowse the full library →