Development of a dynamic difficulty algorithm on unity 6 WebGL platform using pre-trained models
Watana, Siriwat; Tran, Canh Ton (2025)
Watana, Siriwat
Tran, Canh Ton
2025
All rights reserved. This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:amk-2025051210842
https://urn.fi/URN:NBN:fi:amk-2025051210842
Tiivistelmä
The system of Dynamic Difficulty Adjustment (DDA) serves as a key mechanism to enhance player engagement through personalized challenge levels. Traditional static difficulty setting makes them unable to adjust to player skill development which leads to frustrating gameplay experiences. The conventional DDA systems that operate through external servers experience network delays and increase operational costs while raising privacy concerns.
This thesis aimed to develop a serverless DDA system which operates exclusively from within the user's browser. A three-lane endless runner game was created for testing purposes using Unity WebGL as the development platform. The Survival Time metric served to evaluate player performance while a logistic regression model in PyTorch classified users into Unskilled Normal or Skilled categories. The trained model received ONNX conversion before Unity integration through the Barracuda inference engine which enabled real-time obstacle spawn rate adjustments based on predicted player skill. The system achieved a 99.96% accuracy rate in skill classification. Future development should focus on adding more performance metrics to develop an advanced adaptive player modeling system.
This thesis aimed to develop a serverless DDA system which operates exclusively from within the user's browser. A three-lane endless runner game was created for testing purposes using Unity WebGL as the development platform. The Survival Time metric served to evaluate player performance while a logistic regression model in PyTorch classified users into Unskilled Normal or Skilled categories. The trained model received ONNX conversion before Unity integration through the Barracuda inference engine which enabled real-time obstacle spawn rate adjustments based on predicted player skill. The system achieved a 99.96% accuracy rate in skill classification. Future development should focus on adding more performance metrics to develop an advanced adaptive player modeling system.
