A LLM-enhanced ARPG Developed by Unreal Engine

Deng Zhaoqi/Wang Canhao/Li Ruofu/Xu Ziqi

The University of Hong Kong

Introduction

We Integrate LLM into ARPG!

Our core goal is to infuse intelligence into action games using LLM. To this end, we’ve integraded LLM into NPC’s decision trees to make them smarter. Moreover, we’ve developed an LLM-driven game controller, fixing traditional action games’ fixed-difficulty drawback. This enables dynamic difficulty adjustment (DDA), adapting to players’ skills for a personalized gaming experience.

Inovation

Breaking through the limitation of traditional LLM applications in NPC dialogues, applying LLM to global game experience regulation

Action Game

Our game offers a rich action combat system with smooth combos, varied weapon interactions, and smart enemy AI for an immersive gaming experience.

User Value

Lowering the threshold for casual players and increasing challenges for hardcore players, allowing every player to get the best game experience.

What We Done

ARPG Combat System

We developed a core CombatComponent responsible for handling all combat-related logic, including attack, hit, death, and other states.

Combo System

Up to 5 consecutive attack combos with distinct animations for each strike.

Block Mechanism

 Defend against enemy attacks and counter-attack after a successful block.

Dodge Mechanism


Agile dodging maneuvers with brief invincibility frames.

Targeting System


Precision enemy targeting for accurate attacks and evasions.

Item System


Interactive items that restore key numerical values

Stamina System

Stamina is consumed by various player actions and regenerates over time.

AI-Enhanced NPC Controlling

We implemented an NPC behavior tree system based on the Athena AI , enabling intelligent responses to environmental changes.

1. Considerations

Monitor various state parameters of NPCs, such as numerical data including health, stamina, and enemy encounter status.

3. Calculating Task Scores

Combine the weight values of all consideration factors related to the task to obtain the final score for each task.


2. Applying Curve Tables

Look up the corresponding weight values under different scenarios in the importance curve table based on the standardized values.

4. Execute the Task with Highest Score

Carry out the task that has the highest score calculated in the previous step. By prioritizing and executing the task with the top score, the NPC can dynamically adapt its actions to the environment in a logical and efficient manner.

LLM-based Spawn Controller

Regulation Process

  1. Player Behavior Collection
    The Log Mananger conllects game data like attack frequency and hit count.
  2. Game State Analysis
    After a game round, the LLM analyzes the current game state according to the information from the Log Manager.
  3. LLM Decision Generation
    LLM generates JSON format spawn commands based on preset rules.
  4. Command Execution
    The JSON commands are parsed by the UE system, then controller spawns monsters and interactable items
Team Members

All team members are students from the Computer Science program at The University of Hong Kong

Deng Zhaoqi (Leader)

Compat System

Wang Canhao

NPC Controlling

Li Ruofu

LLM Integration

Xu Ziqi

Game Design