网络游戏中代码味的探索性研究
An Exploratory Study of Code Smells in Web Games
摘要:
随着互联网市场的不断增长,游戏在全球范围内越来越受欢迎。然而,游戏市场竞争的加剧要求开发人员在性能,安全性和维护方面编写更高效的游戏。软件系统的不断发展及其日益增加的复杂性可能会导致糟糕的设计决策。研究人员分析了游戏对认知、行为和社会的影响。此外,游戏性和游戏机制一直是提高游戏性的研究领域,但就我们所知,几乎没有任何研究工作研究游戏开发中的不良编码实践。因此,通过我们的研究,我们试图分析和识别可能导致游戏质量问题的不良编码实践(称为代码气味)的存在。为了实现这一点,我们创建了一个包含361个用JavaScript编写的网页游戏的数据集。在这个数据集上,我们运行了一个JavaScript代码气味检测工具JSNose,来发现网页游戏中代码气味的发生和分布。此外,我们对9款网页游戏进行了手动研究,以发现违反现有游戏编程模式的行为。我们的研究结果表明,现有的工具大多是特定于语言的,在游戏的上下文中是不够的,因为它们不能检测到反模式或游戏特定的不良编码实践,从而激发了对游戏特定代码气味检测工具的需求。
英文摘要:
With the continuous growth of the internet market, games are becoming more and more popular worldwide. However, increased market competition for game demands developers to write more efficient games in terms of performance, security, and maintenance. The continuous evolution of software systems and its increasing complexity may result in bad design decisions. Researchers analyzed the cognitive, behavioral and social effects of games. Also, gameplay and game mechanics have been a research area to enhance game playing, but to the extent of our knowledge, there hardly exists any research work that studies the bad coding practices in game development. Hence, through our study, we try to analyze and identify the presence of bad coding practices called code smells that may cause quality issues in games. To accomplish this, we created a dataset of 361 web games written in JavaScript. On this dataset, we run a JavaScript code smell detection tool JSNose to find the occurrence and distribution of code smell in web games. Further, we did a manual study on 9 web games to find violation of existing game programming patterns. Our results show that existing tools are mostly language-specific and are not enough in the context of games as they were not able to detect the anti-patterns or bad coding practices that are game-specific, motivating the need of game-specific code smell detection tools.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。