ALGORITHMS AND METHODS OF PROCEDURAL GENERATION AND ADAPTIVE DIFFICULTY IN PLATFORMER GAMES

Authors

DOI:

https://doi.org/10.35546/kntu2078-4481.2025.4.3.12

Keywords:

procedural generation; Perlin noise; fractal noise; adaptive difficulty; 2D platformers; Unity; C++

Abstract

The article focuses on the study of algorithms and methods for procedural generation of game content and adaptive difficulty in 2D platformers. The relevance of approaches combining modular architecture with dynamic difficulty adjustment based on player actions is substantiated, aiming to ensure variability, replay value, and maintain the dynamism of game content. The paper proposes a layered model of level design, where basic environmental elements (ground, platforms, obstacles) are generated sequentially, while higher layers (enemies, traps, decorations) are governed by consistent placement rules. A key role in creating natural geometry and controlled randomness is played by Perlin noise and its fractal extensions (octaves): combining multiple frequencies and amplitudes allows large-scale contours to merge with fine terrain details. The proposed adaptive difficulty system is integrated into the generator by modifying noise parameters (scale, persistence, octaves) and enemy behavioral attributes (speed, attack frequency, quantity), determined by the player’s performance index. The practical implementation was carried out in the Unity engine using the C# programming language and the Tilemap approach; code examples for heightmap generation and adaptive controller integration are provided. The developed algorithms and methods are engine-agnostic and can be easily integrated into C++ environments, particularly Unreal Engine and Cocos2d-x, demonstrating their cross-platform applicability and scalability. It is shown that the combined approach maintains a balance between unpredictability and control, reduces the cost of manual level design, and enhances user engagement through personalized gameplay experiences. The obtained results can be applied in educational prototypes, indie projects, and serve as a foundation for further research involving machine learning methods in generative game design.

References

Горєлов, В. О., Іляш, Ю. Ю., Ровінський, В. А. (2018). Методи ущільнення даних та перетворення форми інформації у комп’ютерних іграх. Управління розвитком складних систем. № 35 c. 93-104.

Shaker, N., Togelius, J., & Nelson, M. J. (2016). Procedural content generation in games.: A Textbook and an Overview of Current Research. Springer. DOI: 10.1007/978-3-319-42716-4

Sepulveda, G. K., Besoain, F., & Barriga, N. A. (2019, November). Exploring dynamic difficulty adjustment in videogames. In 2019 IEEE CHILEAN Conference on Electrical, Electronics Engineering, Information and Communication Technologies (CHILECON) (pp. 1-6). IEEE. DOI: 10.1109/CHILECON47746.2019.8988068

Hunicke, R. (2005, June). 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). DOI: 10.1145/1178477.1178573

Zohaib, M. (2018). Dynamic difficulty adjustment (DDA) in computer games: A review. Advances in Human‐Computer Interaction, 2018(1), 5681652. DOI: 10.1155/2018/5681652

Biemer, C. F. (2023, October). Dynamic difficulty adjustment via procedural level generation guided by a Markov decision process for platformers and roguelikes. In Proceedings of the AAAI Conference on Artificial Intelligence and Interactive Digital Entertainment (Vol. 19, No. 1, pp. 436-439). DOI: 10.1609/aiide.v19i1.27540

Togelius, J., Yannakakis, G. N., Stanley, K. O., & Browne, C. (2011). Search-based procedural content generation: A taxonomy and survey. IEEE Transactions on Computational Intelligence and AI in Games, 3(3), 172-186. DOI: 10.1109/TCIAIG.2011.2148116

Summerville, A., Snodgrass, S., Guzdial, M., Holmgård, C., Hoover, A. K., Isaksen, A., … & Togelius, J. (2018). Procedural content generation via machine learning (PCGML). IEEE Transactions on Games, 10(3), 257-270. DOI: 10.1109/TG.2018.2846639

Risi, S., & Togelius, J. (2020). Increasing generality in machine learning through procedural content generation. Nature Machine Intelligence, 2(8), 428-436.

González-Duque, M., Palm, R. B., Ha, D., & Risi, S. (2020, August). Finding game levels with the right difficulty in a few trials through intelligent trial-and-error. In 2020 IEEE Conference on Games (CoG) (pp. 503-510). IEEE. DOI: 10.1109/CoG47356.2020.9231548

Perlin, K. (1985). An image synthesizer. ACM Siggraph Computer Graphics, 19(3), 287-296. DOI: 10.1145/325165.325247

Dustler, M., Bakic, P., Petersson, H., Timberg, P., Tingberg, A., & Zackrisson, S. (2015, March). Application of the fractal Perlin noise algorithm for the generation of simulated breast tissue. In Medical Imaging 2015: Physics of Medical Imaging (Vol. 9412, pp. 844-852). SPIE. DOI: 10.1117/12.2081856

Risi, S., & Togelius, J. (2020). Increasing generality in machine learning through procedural content generation. Nature Machine Intelligence, 2(8), 428-436.

Published

2025-12-31