自动测试游戏 [英] Automated testing a game

查看:22
本文介绍了自动测试游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

您将如何为游戏添加自动化测试?

How would you go adding automated testing to a game?

我相信您可以对游戏引擎的许多功能(网络、对象创建、内存管理等)进行单元测试,但是否可以自动测试实际游戏本身?

I believe you can unit test a lot of the game engine's functionality (networking, object creation, memory management, etc), but is it possible to automate test the actual game itself?

我不是在谈论游戏元素(比如 Protoss 会在地图 X 中击败虫族),而是在谈论游戏和引擎之间的交互.

I'm not talking about gameplay elements (like Protoss would beat Zerg in map X), but I'm talking about the interaction between the game and the engine.

简介

在游戏开发中,引擎只是游戏的一个平台.您可以将游戏引擎视为操作系统,将游戏视为操作系统将运行的软件.游戏可以是脚本的集合,也可以是游戏引擎中的实际子程序.

In game development, the engine is just a platform for the game. You could think of the game engine as an OS and the game as a software the OS would run. The game could be a collection of scripts or an actual subroutine inside the game engine.

可能的答案

我的想法是这样的:

您需要一个确定性的引擎.这意味着给定一组输入,输出将完全相同.这将包括使用相同输入播种的随机生成器.

You would need an engine that is deterministic. This means that given one set of input, the output would be exactly the same. This would inlude the random generator being seeded with the same input.

然后,创建一个简单的关卡,其中包含一些虚拟形象/用户可以与之交互的对象.从小处着手,随着更多交互的发展,将对象添加到关卡中.

Then, create a bare-bone level which contains a couple of objects the avatar/user can interact with. Start small and then add objects into the level as more interactions are developed.

创建一个遵循路径的脚本(测试寻路)并与不同的对象交互(存储结果或预期行为).该脚本将是您的自动化测试.一段时间后(比如一周),运行脚本以及引擎的单元测试.

Create a script which follows a path (tests pathfinding) and interact with the different objects (store the result or expected behavior). This script would be your automated test. After a certain amount of time (say, one week), run the script along with your engine's unit tests.

推荐答案

这篇文章 at Games From Within 可能是相关的/有趣的.

This post at Games From Within might be relevant/interesting.

这篇关于自动测试游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆