arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.08088cs.GRcs.HC
收藏

数据驱动动画控制器:Godot游戏引擎中解耦动画逻辑的优先级视觉系统

Data-Driven Animation Controller: A Prioritized Visual System for Decoupled Animation Logic in Godot Game Engine

Islamic Azad University, Karaj, Iran(伊斯兰阿扎德大学)

Abtin TorabNezhad, Azam Bastanfard, Ashkan Rezaei

AI总结:

本文提出数据驱动动画控制器(DDAC),通过数据驱动方法实现动画逻辑与核心游戏脚本的解耦。该控制器将动画控制外化为可编辑资源,采用规则定义方式,通过优先级算法确保互斥,提升可维护性和开发效率。

摘要:

本文介绍数据驱动动画控制器(DDAC),一种专门的Godot组件,通过数据驱动方法实现动画逻辑与核心游戏脚本的解耦。动画控制通常集中于核心角色脚本中,依赖隐式的有限状态机(FSMs)。这种做法导致紧密耦合且难以维护的代码库。DDAC组件将这些指令外化为易于在检查器中编辑的资源,使动画逻辑成为声明式。规则通过读取任何节点上的任何变量的条件并执行动作(设置目标动画)来定义。DDAC还使用相同的简单规则设置管理次要视觉状态设置,如动画速度缩放和水平/垂直精灵翻转。该工作的最高贡献是使用优先级解决算法来强制互斥,确保当多个规则匹配时,只有最高优先级的规则执行。该框架允许设计师快速迭代角色状态可视化而无需修改代码,同时显著提高可维护性和减少核心开发者的认知负担。

英文摘要:

This paper introduces the Data-Driven Animation Controller (DDAC), a specialized Godot component that achieves robust decoupling of animation logic from core gameplay scripts through a data-driven approach. Animation control is typically centralized and imperatively defined within core character scripts, often relying on implicit Finite State Machines (FSMs). This practice leads to tightly coupled and difficult-to-maintain codebases. The DDAC component externalizes these instructions into easily inspector-editable resources, effectively making the animation logic declarative. Rules are defined by reading Conditions from any variable on any external node and executing Actions (setting the target animation). The DDAC also manages secondary visual state settings, such as Animation Speed Scaling and Horizontal/Vertical Sprite Flipping, using the same simple rule-based setup. The highest contribution of this work is the use of a Prioritized Resolution Algorithm to enforce mutual exclusion, ensuring that when multiple rules match, only the highest-priority rule executes. This framework allows designers to quickly iterate on character-state visualization without modifying code, while significantly improving maintainability and reducing cognitive load on core developers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑