Encyclopedia of Computer Graphics and Games Newton Lee Eds Download
Encyclopedia of Computer Graphics and Games Newton Lee Eds Download
https://ebookbell.com/product/encyclopedia-of-computer-graphics-
and-games-newton-lee-eds-6616140
https://ebookbell.com/product/encyclopedia-of-computer-graphics-and-
games-1st-edition-newton-lee-54860072
https://ebookbell.com/product/encyclopedia-of-computer-science-and-
technology-revised-harry-henderson-23507708
https://ebookbell.com/product/encyclopedia-of-computer-science-and-
technology-second-edition-volume-i-second-edition-laplante-9952770
https://ebookbell.com/product/encyclopedia-of-computer-science-and-
technology-second-edition-volume-ii-second-edition-laplante-9952772
Encyclopedia Of Computer Science And Technology Volume 2 Second
Edition Laplante
https://ebookbell.com/product/encyclopedia-of-computer-science-and-
technology-volume-2-second-edition-laplante-9955254
https://ebookbell.com/product/encyclopedia-of-computer-science-and-
technology-volume-16-index-first-edition-belzer-9955258
https://ebookbell.com/product/encyclopedia-of-computer-science-and-
engineering-benjamin-w-wah-5527076
https://ebookbell.com/product/wiley-encyclopedia-of-computer-science-
and-engineering-5volume-set-1st-edition-benjamin-w-wah-1209244
https://ebookbell.com/product/encyclopedia-of-human-computer-
interaction-illustrated-edition-claude-ghaoui-919348
M
Synonyms
Definition
Modeling and Mesh Processing for Games, Figure 1 starting from a cube (left), use split (middle) and extrude (right)
operations to model a shape
Modeling and Mesh Processing for Games, Figure 2 Simplify (left) and subdivide (right) an input mesh (middle)
Mesh processing refers to applying certain Error Metric,” (Garland et al. 1997) which mea-
operations on a mesh to turn it into a desired sures the change of geometric shape by an easy-
one. Thus, some modeling methods can also be to-compute quadric form in terms of the vertex
viewed as mesh processing. For games, simplifi- positions. Other measurements could take the
cation (left of the inset) (Fig. 2) and subdivision change of normal distribution, texture, and other
(right of the inset) could be the most important factors into account. During the simplification,
processing over an input mesh (center of the one could also apply application-dependent
inset), which adjust the mesh to balance the accu- restrictions to the procedure, such as maximal
racy and performance. edge length, minimal angle, and sharp feature
Simplification turns a mesh into an approxi- preserving, etc.
mated one with less number of faces, which sac- On the contrary, subdivision increases the
rifices the quality to reduce the storage and number of faces for better accuracy. It uses a set
rendering cost. The common strategy to simplify of topological rules to change and add more ele-
a mesh is to recursively remove basic elements ments into a mesh and then put the updated verti-
(e.g., vertices, edges, or faces) in order. The order ces into certain positions according to geometric
is critical and usually determined according to the rules. Recursively refining a mesh can result in a
error introduced by removing the elements. The sequence of mesh with finer and finer resolution.
error can be measured in many different ways. The limit one is smooth almost everywhere and
A typical measurement is named as “Quadric tightly related to B-spline and other algebraic
Modeling and Mesh Processing for Games 3
Modeling and Mesh Processing for Games, Figure 3 parameterization turns a 3D surface mesh (left) to a 2D planar
one (middle), which helps to map a texture image back to the mesh (right)
surface. The most simple and widely used subdi- deformation and animation, keep the detail but
vision schemes include Catmull-Clark (Stam change the overall shape. Many state-of-the-art
1998), Doo-Sabin (Doo and Sabin 1978), and deformation and animation methods also found
Loop (Loop 1987). The above subdivision the base on Laplacian of the mesh and adopt
schemes refine the mesh in a whole and may many differential geometry concepts to character-
introduce too many elements unnecessarily. The ize the “detail” to be preserved (Huang et al. 2006)
adaptive subdivision strategy only refines part of (Fig. 3).
the model that needs more elements. Modern
graphics processing unit (GPU) is able to perform
subdivision very efficiently. Therefore, to render a
high quality surface, one can just send a simplified
mesh with a small number of faces into GPU, and
let GPU tessellate it into a high-quality mesh with
a large number of faces. Integrating simplification
and subdivision does not only help rendering, but
can also be helpful in network environment.
Mesh processing also includes a lot of other
operations, which does not change the topology
but only changes the vertex positions, such as
smoothing and enhancement. These two opera-
tions change the detail of the mesh but roughly
keep its shape. Such operations view the shape
represented by mesh as a signal and modify the
high frequency part. Such types of mesh
processing are usually related to Laplacian-based
methods and tightly related to spectral analysis
General mesh processing even includes some
(Taubin 1995). For example, the smoothing oper-
operations that neither change the topology nor
ation reduces high frequency details from the
geometry. Take parameterization as an example
input mesh (left of the inset), which is similar to
(Hormann et al. 2007), it computes a mapping
a low-pass filter and results in a mesh with
(middle of the inset) from a planar domain to a
smoother shape (right of the inset). On the con-
mesh (left of the inset) so that a planar signal can
trary, some of the mesh processing, such as
4 Modeling and Mesh Processing for Games
be transported onto the mesh (right of the inset). Hormann, K., Lévy, B., Sheffer, A.: Mesh parameteriza-
Texturing is a typical application of parameteriza- tion: theory and practic. In: ACM SIGGRAPH 2007
Courses (SIGGRAPH ’07) (2007)
tion, which enhances the appearance of a mesh by Huang, J., Shi, X., Liu, X., Zhou, K., Wei, L.-Y., Teng,
mapping an image onto the mesh. S.-H., Bao, H., Guo, B., Shum, H.-Y.: Subspace gradi-
ent domain mesh deformation. ACM Trans. Graph.
25(3), 1126–1134 (2006)
Loop, C.: Smooth Subdivision Surfaces Based on Trian-
References gles. M.S. Mathematics thesis, University of Utah
(1987)
Stam, J.: Exact evaluation of Catmull-Clark subdivision
Doo, D., Sabin, M.: Behavior of recursive division surfaces
surfaces at arbitrary parameter values. In: Proceedings
near extraordinary points. Comput. Aided Des. 10(6),
of the 25th Annual Conference on Computer Graphics
356–360 (1978)
and Interactive Techniques (SIGGRAPH’98) (1998)
Garland, M., Heckbert, P.S.: Surface simplification using
Taubin, G.: A signal processing approach to fair surface
quadric error metrics. In: Proceedings of the 24th
design. In: Proceedings of the 22nd Annual Conference
Annual Conference on Computer Graphics and Inter-
on Computer Graphics And Interactive Techniques
active Techniques (SIGGRAPH’97) (1997)
(SIGGRAPH’95) (1995)
D
Decoupling Game Tool GUIs from on the game engine side: engines have become
Core Editing Operations more and more flexible and reusable.
But problems remain. One big issue with game
Nicusor Nedelcu level editors is complexity and manageability.
7thFACTOR Entertainment Studios, Brasov Once you have added many features to the editor,
County, Romania it will grow in source code size and complexity
and become harder and harder to maintain and
extend. Another problem is that you have to
Synonyms choose a GUI toolkit to create your interface.
That can become a headache if you ever decide
Decoupling systems; Plugin system; Command to switch to another GUI toolkit, since many
system; Editor architecture; Game level editor editing operations are tied in with the UI code
itself.
To address the issue of changing GUI toolkits
Definition in these fast and ever-shifting times, we present a
method of decoupling the visual user interface
A software architectural method of decoupling code from the non-GUI editing operations code
the game editing operations from the actual GUI in the game level editor or other tools. By sepa-
of a game level editor. rating the UI from core editing functions, you can
Since the early days of video game develop- change to another GUI toolkit in no time, leaving
ment when the programmer had to write the code the editing operation code almost untouched. The
and design and create the levels without the aid of decoupling operation can be accomplished via
a game editor, the tools to create games have C++ editor core functionality code and various
evolved into the must-have game development editor user interfaces using GUI toolkits like Qt,
software we use today. Now the level editors are MS WinForms, WPF, MFC, HTML5/JavaScript,
built into the development kits, and the devel- or even a command line editor UI, all using the
oper’s job is much easier but still filled with same editor functionality code as a common hub.
potential pitfalls. Communication between the editor functions and
In the past few years, it has become common the visual interface is achieved through a com-
to decouple game level editor operations and mand system (basically the command pattern).
functionality from game-specific features, so We will also explore the architecture of a plug-
that the editor can be reused for more games in system using this command communication
and game types. The same thing has happened approach.
# Springer International Publishing Switzerland 2015
N. Lee (ed.), Encyclopedia of Computer Graphics and Games,
DOI 10.1007/978-3-319-08234-9_2-1
2 Decoupling Game Tool GUIs from Core Editing Operations
transporter between the calling application and simpler, since the user can’t use the pointer itself
the editor core internals. This will keep things anyway (see Listing 1).
We will also need a Version structure to be validations we will have for the editor API and
used in the various version comparisons/ plug-in versions (see Listing 2).
After this, a central point of the editor core commands and also by the main editor skeleton
API is the main editor interface (see Listing 3), application, which will manage those plug-ins.
which will provide command, plug-in, and event
methods to be used by plug-ins and their
virtual IParameterDefinitions*
CreateParameterDefinitions() = 0;
virtual bool Call(
const char* pCommandName,
IParameterValues* pParams) = 0;
virtual void WriteLog(
ELogMsgType aType,
const char* pModule,
const char* pFormat, . . .) = 0;
};
This is the main editor interface at a glance. commands in the editor’s ecosystem and provide
Its methods are quite self-explanatory, the most information about these commands through a
used methods being the Call(. . .) method, which manifest file associated with the plug-in’s DLL.
is used to execute commands by their name and A core editor plug-in consists of two files:
requires a parameter “bag” (optional), and the
IParameterValues interface, created before the • A C++ DLL file, the plug-in code (Example.
call by the user using the CreateParame- dll)
terValues() method and then filling up the param- • A manifest file (Example.plugin.xml), having
eter values for the command to use. the same base file name as the plug-in’s DLL
(Example), containing information about it
<plugin
name="Example"
description="The example editor plugin"
author="Nicusor Nastase Nedelcu"
url="http://some.com"
guid="31D91906-1125-4784-81FF-119C15267FC3"
version="1.0.0"
minEditorVersion="1.0.0"
maxEditorVersion="2.0.0"
icon="example.png"
unloadable="true">
<dependencies>
<depends nameHint=”OtherPlugin”
guid=”DAA91906-1125-4784-81FF-319C15267FC3” />
<depends nameHint=”SomeOtherPlugin”
guid=”F51A2113-1361-1431-A3EA-B4EA2134A111” />
</dependencies>
6 Decoupling Game Tool GUIs from Core Editing Operations
<commands>
<command name=”get_some_thing”
info=”This command get something”>
<param name=”someParam1” type=”int32”
info=”this is parameter 1” />
<param name=”someParam2” type=”float”
info=”this is parameter 2” />
</command>
</commands>
</plug-in>
Of course, you can choose any format for plug-in or its commands. Only the manifest file
the manifest file, like JSON or a custom text holds that information.
format. The important thing is that the plug-in’s Plug-ins can be located in a directory structure
DLL does not contain any information about the as shown in Listing 5.
\Plugins
\Example1
Example1.dll
Example1.plugin.xml
\Example2
Example2.dll
Example2.plugin.xml
EditorCore.dll (the editor code library)
EditorUI.exe (the main editor application)
One reason we have chosen to store the As you can see from the plug-in manifest, we
plug-in information inside external files is that have added information about the name, descrip-
plug-ins can be listed (with all their details) in tion, author, and other useful properties but also
the editor’s plug-in manager without being about the plug-in’s dependencies (other plug-in
loaded into memory. In this way, we can avoid GUIDs). Optionally, there should be information
loading some plug-ins we do not need to load but about the commands, like name, description,
still have information about them. For example, parameters, and return values, since we do not
there can be special editor configurations for store this information in the C++ source files.
lighting artists, programmers, or level designers, This information can be used by a debug layer
and these configuration files can be shared among to check the command syntax at runtime and help
users. the discovery of incorrect command calls during
development.
Decoupling Game Tool GUIs from Core Editing Operations 7
Listing 7. The Interface That Describes a Plug-in (from the Plug-in Manifest).
struct IPluginInfo
{
virtual ~IPluginInfo(){}
virtual const char* GetName() const = 0;
virtual const char* GetDescription() const = 0;
virtual const char* GetAuthor() const = 0;
virtual const char* GetWebsiteUrl() const = 0;
virtual PluginGuid GetGuid() const = 0;
virtual Version GetVersion() const = 0;
virtual Version GetMinEditorVersion() const = 0;
virtual Version GetMaxEditorVersion() const = 0;
8 Decoupling Game Tool GUIs from Core Editing Operations
The plug-in interface methods are easy to The simple creation process of new plug-ins
understand, but we can say more about the and commands should be the crux of this system;
GetMinEditorVersion() and GetMaxEditorVersion thus, coding new command sets hosted in the
(). These methods are used to check whether the plug-ins should be straightforward. In the editor
plug-in can be loaded into the current editor and core API, there is an interface each plug-in must
help avoid loading plug-ins that are not supposed to implement on its side, called IPlugin, as shown in
run under newer or older editor versions. Listing 8.
struct IPlugin
{
virtual ~IPlugin(){}
virtual void Initialize(IEditor* pEditor) = 0;
virtual void Shutdown() = 0;
virtual bool IsCommandEnabled(TPfnCommand pCmdFunc)= 0;
};
to define the parameter type, direction, and parameter set that is aware of the data types at the
description. This information is read from the moment of setting the values. In Listing 9 we
plug-in’s manifest file, but it’s optional since the declare the IParameter interface.
calling of commands is accomplished through a
struct IParameter
{
enum EDataType
{
eDataType_Unknown,
eDataType_Int8,
eDataType_Int16,
eDataType_Int32,
eDataType_Int64,
eDataType_Float,
eDataType_Double,
eDataType_Text,
eDataType_Handle
};
enum EDirection
10 Decoupling Game Tool GUIs from Core Editing Operations
{
eDirection_Input,
eDirection_Output,
eDirection_InputOutput
};
virtual ~IParameter(){}
virtual const char* GetName() const = 0;
virtual const char* GetDescription() const = 0;
virtual EDataType GetDataType() const = 0;
virtual EDirection GetDirection() const = 0;
virtual bool IsArray() const = 0;
};
struct IParameterDefinitions
{
virtual size_t GetCount() const = 0;
virtual IParameter* Get(size_t aIndex) const = 0;
virtual bool Add(
const char* pName,
IParameter::EDataType aDataType,
const char* pDescription,
IParameter::EDirection aDirection,
bool bArray) = 0;
};
When calling the commands, we need to #define extravaganza or templates to declare sev-
pass the parameters. For this, we will use an eral command call forms with from one to ten
IParameterValues value “bag,” which can set/get parameters in their declaration. Listing 11 shows
parameters and store the values. You can use the parameter value interface.
other approaches for passing parameters, like
Decoupling Game Tool GUIs from Core Editing Operations 11
For debugging and auto-documentation command description from the plug-in manifest
purposes, the editor core API can provide file, plus the command callback function pointer,
detailed command information through the as shown in Listing 13.
ICommand interface, which can hold the
struct ICommand
{
virtual ~ICommand(){}
virtual const char* GetName() const = 0;
virtual const char* GetDescription() const = 0;
virtual const char* GetIconFilename() const = 0;
virtual TPfnCommand GetCommandFunc() = 0;
virtual const IParameterDefinitions*
GetParameterDefinitions() const = 0;
};
Direct Editor API Command Calls wrapper tool for another language like C#
(SWIG). To call the commands in C++, we can
You can call the editor core interface for execut- use the code shown in Listing 14.
ing commands directly from C++ or use a
Remote Editor API Command Calls though C# can also be supported using Mono on
platforms other than Windows). This editor will
We can use sockets for calling the commands be an empty skeleton that contains a plug-in
remotely, since they’re cross-platform and rela- manager dialog and nothing else, since all the
tively easy to use from any language or environ- functionality will be brought in by the plug-ins.
ment. On the editor core DLL side, we will have a Once again we need to emphasize the separation
network server executable, and on the editor UI of the plug-in systems. They are two systems, one
side, we will have a network client sending and for the UI and one for the editor core commands.
receiving command data. UI plug-ins will use the commands found in the
Communication can be accomplished through editor core plug-ins (see Fig. 1 at the beginning of
reliable UDP or TCP. For a local editor on the this article). The main UI editor can even do
same machine, TCP would be okay even for LAN without a plug-in system if it’s so intended, but
scenarios. If you are not so keen on using TCP the editor core command plug-ins will still exist.
because you consider it slow, UDP should suffice
to send commands. All logic remains the same in
Implementing a Plug-in with Commands
this networked scenario, but this setup opens the
To ensure that you have a simple way of
doors to online collaboration of multiple clients
implementing new commands, the method of
operating on the same data on the server. We’re
declaring commands and plug-ins must be
not going to discuss this here, since it’s a subject
straightforward.
for a whole article (a challenging and interesting
In the editor core API, the IPlugin is the inter-
one!).
face a plug-in must implement. To help rapid
Networked editing is also feasible for
plug-in development, you can write a series of
debugging and remote in-editor live tutorials.
macros. In our sample plug-in, implementing a
few commands would look like the code shown in
Listing 15.
Putting It All Together
#include “EditorApi.h”
void example_my_command1(IParameterValues* pParams)
{
// get our calling parameter values
int numberOfHorses =
pParams->GetInt32("numberOfHorses");
std::string dailyMessage =
pParams->GetText("dailyMessage");
// do something important here for the command. . .
Decoupling Game Tool GUIs from Core Editing Operations 15
Note that BEGIN_PLUGIN and is used to verify whether a command has the status
END_PLUGIN are macros hiding the start/end of “enabled” so it can be called/executed.
of the IPlugin interface implementation. The Ini- Be sure to name the commands in a way that
tialize method is called when the plug-in is loaded avoids conflicts. Usually some sort of group nam-
into the editor. We are also registering the plug- ing, like the name of the plug-in and the actual
in’s commands by just referring invoking the command action name, should be enough, like
global functions example_my_command1 and assets_reload, assets_set_tag, assets_delete, or if
example_my_command1. The Shutdown method you prefer camel-case style, Assets_SetTag.
is called when the plug-in is unloaded (no need to The generated plug-in will be named example.
call the unregister commands; this can be tracked dll and will be accompanied by its manifest file,
and executed by the editor core itself, since it example.plugin.xml. Of course the plug-in must
knows the IPlugin pointer when the commands export a CreatePluginInstance global function so
are registered). The IsCommandEnabled method
16 Decoupling Game Tool GUIs from Core Editing Operations
The IEventSink::OnEvent method is called event sinks. The method receives a pointer to the
whenever an event is triggered by other plug-ins triggered event interface (see Listing 17).
or their commands and broadcast to the registered
// we declare an event
struct MyEvent: IEvent
{
virtual const char* GetName()
{
return “MyCoolEvent”;
}
// this will be called when the event is triggered,
// before being broadcast to all the event sinks
// so the event can even modify the user data
virtual void OnTrigger(void* pUserData)
{
// modify or store the pUserData
m_pData = pUserData;
}
virtual void* GetUserData()
{
return m_pData;
}
uint8 m_pData;
} s_myEvent;
// we register an event (usually in the Initialize method
// of the plug-in)
...
REGISTER_EVENT(&s_myEvent);
...
// in some command, we trigger the event
void my_command(IParameterValues* pParams)
{
uint8* pSomeData;
// ....... do things with pSomeData
g_pEditor->TriggerEvent(
&s_myEvent,
IEventSink::eTriggerContext_After,
pSomeData);
}
18 Decoupling Game Tool GUIs from Core Editing Operations
In Fig. 3, you can see a demo application of and used for a wide range of projects, the editor
this system, with the editor skeleton having just itself being quite agnostic to the game type and
one menu item, and a setting dialogue where even the engine used. The solution presented here
plug-ins are managed. can be implemented in many ways, from the
command system interfaces to the UI or plug-in
system. In all cases, one thing remains constant:
Conclusion the use of UI-independent editing operations is
separated from the tools’ GUI using the com-
Decoupling the UI from core editing functional- mand layer. I hope this article inspires you to
ity helps the development and fast feature-set make the right choices when creating extensible,
iteration of game creation tools, since fewer elegant solutions for your game development
hard-coded dependencies and monolithic tools.
schemes are used. The tools can be extended
Decoupling Game Tool GUIs from Core Editing Operations 19
Decoupling Game Tool GUIs from Core Editing Operations, Fig. 3 Skeleton editor UI application and settings
dialog, with the plug-in manager (made with Qt)
P
Definition
Design
A plug-in-based asset compiling solution for
game development where each plug-in handles a The underlying plug-in loading system can be a
data file format and outputs an optimized form for “traditional” dynamic link library (DLL) loading
a specific hardware/software platform. and querying for the proper interfaces. We will be
From the beginning of the game creation pro- using the Windows dynamic link library API, but
cess to the end, development revolves around two the code is almost the same for other operating
main subjects: code and data (game art and other systems. The DLL can export a special function
type of assets). In the past, data was formatted that will return an instance of the converter inter-
specifically for the one platform the game was face (see Listing 1). The same goes for other
about to run on. Now we have to format the platforms (OS/X, Linux), using their specific
same data for many different platforms. In order dynamic link library API implementations.
to satisfy this new requirement, we need access to
source assets that can be compiled into a variety of Listing 1. Creating the asset converter instance
targets. More work has to be done, since special using the exported DLL function
care has to be taken for each format.
However, there are ways to reduce the pain DLL_EXPORT AssetConverter*
involved in this more complex pipeline. To make createAssetConverter();
# Springer International Publishing Switzerland 2016
N. Lee (ed.), Encyclopedia of Computer Graphics and Games,
DOI 10.1007/978-3-319-08234-9_3-1
2 Plug-in-Based Asset Compiler Architecture
The interface of the asset converter would look that converts third party JPG/PNGs and compiles
like Listing 2. to a custom format like.TEX).
The convert method is the one called by the
Listing 2. The asset converter interface asset compiler executable when the given com-
mand line arguments are passed to it and they
class AssetConverter match the file extensions returned by the supporte-
{ dExtensions() method. This function should
public: return something like a file mask such as *.jpg,
enum EType *.tga, *.png, or *.texture, so even a simple
{ substring matching test can select the right con-
eType_Unknown = 0, verter(s).
eType_Compiler = 0>>1, The command line arguments are shared for all
eType_Importer = 1>>1, the converters; each one can pick up its own
eType_ImporterCompiler arguments and their values.
= (eType_Compiler | By convention, the converters will be called
eType_Importer) first on the given assets, and after that we will call
}; the compilers. Since we (probably) generated/
converted assets from the previous step, now we
AssetConverter(){} can compile those intermediate formats into final
virtual ~AssetConverter(){}; binary optimized ones for specific platforms.
virtual bool convert(const char* The main asset compiler executable will load
pSrcFilename, const char* all plug-in DLLs from either a specific folder or
pDestPath, const Args& rArgs) = 0; the same folder as the executable. We can use any
// Args class is a command line kind of plug-in loading scheme. For example, we
argument parser, not shown here. can have those DLLs with their extensions named.
Basically holds a list of arguments plugin,.converter, etc. In this way, we dynami-
and their values cally load only the eligible ones, skipping the
virtual const char* unsupported/unknown DLLs.
supportedExtensions() const = 0; Once a plug-in is loaded, we retrieve the
virtual EType type() const = 0; address of the DLL exported createAsset-
}; Converter() function and instantiate the converter.
Then, with all plug-ins loaded, we match each
The asset converter has a type that represents what input asset filename with the return string of the
the converter does with the given input file: com- supportedExtensions() of each converter. If the
piles or converts. We make this distinction match is true, then we call the converter to take
between compilers and converters because we care of that file type. After that we can continue to
would like to use compilers to compile data from pass the filename to be handled by other matching
our intermediate format to the final platform- converters, or we could come up with a stop
optimized format and converters to convert from boolean return value so the file will be handled
third party formats to our intermediate format. An only once by a single converter and not by further
example compiler would be: cube.json (the inter- matching converters if the return value is false.
mediate format) to cube.mesh (final optimized Even further, we could have some sort of depen-
format) or an example converter: cube.fbx to dency tree, when converters would be called after
cube.json. others have finished converting assets.
We can also have a compiler and a converter in Obviously, another thing that speeds up the
one implementation (flag eType_Importer- compilation/conversion process is multithreading.
Compiler) that can handle third party and inter- In a first phase, we can schedule groups of files to
mediate formats (for example, a TextureConverter be converted on separate threads. Then, when we
Plug-in-Based Asset Compiler Architecture 3
convert a few files, the converters could spawn output files. The class also has some worker
several threads to take care of a single asset. We threads for multithreaded processing of the input
must be sure, however, that the available cores are assets.
used/spread evenly, whether on a CPU or GPU.
Multithreading asset compilation can be a little
tricky when dependencies are involved, so for this Example
process to be safe, and to avoid problems arising
from two threads concurrently modifying the We can show, for example, a texture converter/
same resource, we should build a dependency compiler plug-in. The code could look like
tree and put each main branch and its subbranches Listing 4.
and/or leaves on their own thread. Various
methods for thread synchronization can be used, Listing 4. The texture converter and compiler
like mutexes, semaphores, each operating system
having its own API for that. class TextureConverter : public
The main compiler class would look like AssetConverter
Listing 3. {
public:
Listing 3. The asset compiler class TextureConverter();
~TextureConverter();
class AssetCompiler
{ bool convert(const char*
public: pSrcFilename, const char*
AssetCompiler(); pDestPath, const Args& rArgs);
virtual ~AssetCompiler(); const char* supportedExtensions()
const
bool compile(const Args& rArgs); {
void compileFolder( return “*.jpg *.png *.psd *.tex”;
AssetConverter::EType }
aConverterType, EType type() const
const char* pMask, {
const char* pExcludeMask, return eType_ImporterCompiler;
const char* pCompileFolder, }
const char* pDestFolder); };
protected:
vector<AssetCompilerWorker> The texture converter plug-in class will return all
m_workerThreads; supported file extensions and its type, so the main
....................... compiler class will select it when appropriate.
}; Inside the convert method, the code will check
the input filename and dispatch the logic to the
The main asset compiler class has the compile specific image format handler.
(. . .) method (synchronous call; it will wait until This class can reside in a DLL, which contains
every asset compile thread finishes), which will a single converter, but one can also have as many
take the actual command line arguments. The converter classes in a DLL as it is needed. In that
compileFolder(. . .) method (asynchronous call; case, the query function will just have to change to
it will just start the threads) will process a given support multiple classes. See Listing 5.
folder for a specific converter type, with a
filename mask, an excluding mask, the actual Listing 5. A plug-in with multiple converter clas-
compile folder, and destination folder for the ses inside a single DLL
4 Plug-in-Based Asset Compiler Architecture
// this class must be implemented by ability to extend and debug the tool, and happy
the plug-ins third party developers, who will use the tools
class AssetCompilerPlugin since they can implement new converters/com-
{ pilers for their custom data file formats.
virtual int getClassCount() = 0; Keep in mind optimizations like
virtual AssetConverter* multithreading; dependency trees; CUDA/
newClassInstance(int aIndex) = 0; GPGPU operations to speed things; a
} CRC-based last-modified file info database so
DLL_EXPORT AssetCompilerPlugin* we can skip assets that have not changed; and
createPluginInstance(); even safely running many compiler executables
on the same data folders.
The exported createPluginInstance() will create The solution can be implemented in various
the plug-in’s class instance, which will take care ways. The converter ecosystem can be detailed
of instantiating converter classes. as needed so it will fit perfectly into the game
Other converter plug-in examples include an engine’s pipeline.
FBX converter, mesh compiler, prefab compiler,
shader compiler, MP3/OGG/WAV converter,
level compiler, etc. The plug-in system can be
References
developed further with class descriptors, such
that information can be retrieved about the con- [DLL] Wikipedia. “Dynamic Link Library.” http://en.
verter classes without having to instantiate them wikipedia.org/wiki/Dynamic-link_library
unless they are needed. [Dynlink] Wikipedia. “Dynamic Linker.” http://en.
wikipedia.org/wiki/Dynamic_linker
[Multithreading] “Multithreading.” http://en.wikipedia.
org/wiki/Multithreading_(computer_architecture)
Conclusion
Game Development Leadership Tips There is still one factor that is decisive for the
success of failure of the vast majority of games:
Paulo Zaffari the people who make those games. While many
Hoplon Infotainment S.A., Florianopolis, Brazil games had great ideas and teams behind them,
capable of producing all a great game needs,
many of them still failed to deliver as a good
Synonyms product.
There are certainly many explanations for why
Administration; Conduction; Direction; Management they failed. When hearing such teams, they will
often refer to the lack of a common vision, com-
munication problems, micromanagement, and
Definition other problems which are clearly not related to
the game itself (DeMarco and Lister 1999). This
Leadership is the craft of inspiring and guiding category of problems is game production related.
people to achieve an objective. In game develop- Among the many things needed for a game
ment, this objective is completing a game within production process to succeed, leadership is a
time using the allocated budget while presenting major facilitator. In this text, a few leadership
great quality. tips will be presented in order to give a head start
to any leader working in the game industry or
person seeking education on the topic. Those
Introduction tips are pieces and bits of information and
ideas I came up with during my 10 years of
Video game development has deeply technical experience in leadership positions in game
details inherently related to it. The most basic of development.
them is the hardware on which the game will run.
It will shape, in part, the software and often
artistic assets. Tip 1: Love
There are also more subjective points related
to it like: how fun is it, how beautiful are its The love in question is much similar to the one
graphics, how good is its music or sound, and parents, more often than not, have for their chil-
how good is the composition of all the above dren: They want their children to grow and to
items. The game story and the many subtleties achieve their dreams. They will provide whatever
of the craft can also be summed to these elements. subsidies on their reach.
# Springer International Publishing Switzerland 2015
N. Lee (ed.), Encyclopedia of Computer Graphics and Games,
DOI 10.1007/978-3-319-08234-9_5-1
2 Game Development Leadership Tips
More reason for this the similarity with paren- tools are programming languages, digital content
tal love being a working technique and value for generation tools, source control systems, and
leadership is the psychological mechanism of IDEs. Once promoted to a leadership position,
transference and countertransference. Leaders this can change overnight: The working instru-
will be in a position where their approval to ments of a leader are the people.
their subordinates will effectively affect (Stone This change has often deep implications:
et al. 2000), if not their chances of survival (Stone Where once a person’s job was to implement
et al. 2000) or quality of life, at least their work some feature or create content, the leader is now
life. This has a strong similarity to the relation- responsible for getting some other person to do
ship between parents and their children. so. This requires a fundamental change in the
The people working under the leaders will kinds of skill used and sometimes mentality.
often, therefore, try replicating the relationship Instead of answering how something should
they had with their parents with their leaders, due be done, a more appropriate question for a leader
to the transference mechanism. This means their to answer is: Who would be the best person or
expectations, at least in a subconscious level, will people to do it at this time? Answering this ques-
be similar to those they had with their parents. tion requires the leader to understand the talents
Sometimes their relationships are or were of each individual on his or her team. The leader
troubled, causing some degree of hostility toward should be able to answer: “What is a person good
the leader. Often those relationships were based at?”
on love and trust. Still, answering properly who is the best per-
Leaders acknowledging this should be pre- son to do a given task takes more than just under-
pared to gracefully handle hostility and manage standing the skills of each individual. Sometimes
the expectations of their subordinates. The hos- even highly skilled team members will not per-
tility handling may have positive impacts on the form well on assigned tasks.
person often going beyond the work environ- One of the common causes for it is motivation,
ment, similar to the effects of a therapy session. or rather the lack of it. Determining what moti-
Once the leader gets through with it, which may vates a person is, therefore, also a key factor for
not be always possible, strong bonds are often being a good leader. While motivation factors can
formed. vary from person to person, there are some which
Loving the people they command is a value are commonly reported and, for this reason, can
some successful leaders have. More than a prac- be addressed proactively by the leader.
tice, this value guides leaders into intuitively One such motivation element exists when
relating well to many people as well as shaping someone doesn’t understand the goal of a given
policies and actions that foster a healthy work task; this person will often be unable to evaluate
environment. how good a solution is or, at times, even if the
Finally, it’s not without a reason that love is solution is correct. While some individuals will
the central value within religions. It had deep ask for the information required to clarify what
appeal for the human psyche, and it’s a strong they need, a good leader cannot assume this to be
element that leaders should keep in mind. the case. Proactively ensuring people have
enough context is a crucial part of the job.
Another factor is that one has to work with
Tip 2: People people he or she prefers not to. This might, at
least, put strain on the shoulders of those doing
A very common mistake committed by new team it. Understanding the affinities of a team and
leaders, especially those from an engineering dealing with them can be a vital part of distribut-
background, is not figuring out their work instru- ing tasks and, thus, of being a leader in game
ments changed. Someone working in the game development.
industry will often be a person whose working
Game Development Leadership Tips 3
Also, even when the leader chooses the right One possible point to start with, regarding com-
person for a task at a given time, circumstances munication, is the tone of voice used. Much of what
may change during its execution (DeMarco and humans communicate is nonverbal, and the tone of
Lister 1999). From unpredicted technical diffi- voice, for instance, is a very important factor. Care
culties to personal dramas, there is a whole uni- must be taken to pass the correct information.
verse around this chosen person which can Apart from the tone of voice, a leader must ask
change. A good leader should always be attentive for feedback and give feedback whenever possi-
to his or her team members, being always ready to ble (Acton 2014). It’s usual for a team member to
help them whenever possible. be passive on giving or asking for feedback. The
As a reminder, dealing with people involves leader should be prepared to proactively work
far more than logic, algorithms, task allocation, around it.
or aesthetic sense. It involves questions like self- A good instrument for feedback is having
esteem, sensitivity, sense of righteousness, pride, periodic one-on-one meetings with each and
and many others to be listed. The tool to deal with every team member periodically Stone et al.
all of them is communication. 2000; DeMarco and Lister 1999). Their objective
should be having a human exchange, to prevent
possible latent tensions from rising.
Performance feedback should, ideally, be
Tip 3: Communication
given in a task basis, or even in a subtask basis
for long tasks, especially if this means for the
When working with people, the most important
leader to demonstrate multiple times a day
tool to use is communication (DeMarco and
approval for a well-done job. Showing disap-
Lister 1999; Acton 2014). It should be done far
proval is just as important: The earlier the leader
more often than what would feel natural to a
shows it, the earlier the team member can correct
leader: Many things which are obvious to the
the cause of it. A good leader should always keep
leader may be even counterintuitive to some
in mind that when he or she does not communi-
team members.
cate criticism, it is denying a chance to the person
Other times, people will simply not tell the
receiving it to improve.
leader when they disagree or have problems
Finally, if a leader gives enough context to the
with something. Considering the issues tolerable,
team members, passing information about the
they will often prefer to avoid conflict in order not
projects and about the company, they will be far
to look bad in front of the leader or even do it in
more likely to understand their contribution to the
attempt to become the boss (Stone et al. 2000).
big objectives. This practice provides great help
This is often a problem, as it may lead into grow-
in motivating people: Humans, as shown by reli-
ing tension over an accumulated set of small
gions, feel the need to be part of greater plans and
things.
have higher purposes.
Worse yet, what may feel like a small problem
to some of the team members can, in fact, be
perceived as something big for the leader. Also,
Tip 4: Responsibility
possibly even more worrying is the opposite case:
when something small for the leader feels big for
Another sudden change for those who become
the team member. As there is an undeniable
leaders is the scope of their responsibility. Before
power relationship, this can make the subordinate
being in a leadership position, each individual is
feel fear.
accountable for his or her work alone. This is
No good relationship, personal or profes-
obviously different for leaders. Still, there are
sional, comes from fear. So, it is an important
not so obvious changes worth mentioning.
part of leadership to handle communication prop-
A typical situation which exposes these differ-
erly: both in the sense of content and form.
ences is the case when the newly appointed leader
4 Game Development Leadership Tips
is confronted by his or her boss regarding some dear to them dying: This certainly dwarfs any bad
issue on the project. Any good leader will under- news a job in the game industry can bring. Going
stand who was responsible for the part which had further, when presented with difficulties those
issues. The sometimes the counterintuitive part is people may help in finding good solutions to it
deciding on how to proceed from this point. or, when not possible, either start coping with the
Many beginner leaders will, sometimes in the issue or accepting the loss.
human act of self-preservation, explain to their Still, a caring leader will have concerns about
bosses that the issues are coming from a specific how a person will feel after criticism is delivered.
team member (Stone et al. 2000). This is an A caring leader won’t want to hurt people’s feelings
inappropriate approach. or self-esteem. He or she will deliver the criticism
The leader is responsible for the results, making it clear that the problem is not the person,
regardless of the circumstances. The leader but the action, behavior, or result achieved.
should take responsibility for the current state of
the project at all times. If a team member is
underperforming, it is the responsibility of the Tip 6: Trust
leader to deal with it before it becomes a problem
to the project. Trust is an absolute key element when working
Moreover, in the cases where the leader with people (Sinek 2009). It is one of the foun-
doesn’t have the appropriate people or resources dations of human society: When humanity was
to handle a task, it is his or her responsibility to young, threat was all around. There were no cities
inform it to the boss as soon as this information where you could be safely away from predators.
becomes available. Carnivores such as wolves, bears, and big felines
were a common threat. Sleeping was particularly
dangerous for humans in the wild.
Tip 5: Sincerity Survival required cooperation (Sinek 2009).
There had to be people awake during the night
One of the most important traits of a leader is to alert the others of possible attacks, and the
sincerity. The people working with a leader are lives of the entire group would depend on these
intelligent adults. More often than not, the team people doing their jobs. The group had to trust
members will notice when the leader is not being them completely and reciprocate, or else this
sincere. equilibrium would eventually fail.
More than just noticing, people will first try to This was the reality of the human race for a
understand why the leader is being insincere. And period far longer than recorded history up until
often they will pay back behaving the same way: when this text was written for the first time. This
being insincere as well. This is not the trust envi- is not just a fad, a modern behavior; this is some-
ronment expected from the successful teams. thing so old that it is likely even recorded in
Some new leaders sometimes will consider human genes: Humans are programmed to coop-
they have good reasons to be less than sincere erate with each other, but this cooperation
with their teams. Sometimes they actually want to requires trust.
protect them from criticism from other people or Let’s now take these ideas what most would
teams; other times there are bad news such as consider a somewhat safer environment: the
possible layoffs ahead and the leaders don’t office of a game studio. The central idea remains:
want the team to lose focus. Still, a leader should A good leader should understand that if he or she
understand that if he or she can cope with it, so do wants to be trusted, the first thing to be done is to
the team members. trust the people with whom he or she works.
As intelligent adults, they most likely faced And what does trusting someone mean? It
bad news before (Stone et al. 2000). Most of them means primarily that the leader will delegate
had a broken heart; most of them heard of people work as one of his or her main activities.
Game Development Leadership Tips 5
Moreover, this should be done trusting that the individuality: for this reason, even the best of the
people receiving the tasks will be able to accom- professionals or the most self-demanding one
plish them well. Also, just like a loving parent, a will inevitably have vulnerabilities, even if they
leader, especially if he or she is a good engineer, come from one of the team members.
should understand that it’s time for the team Still, it’s far more usual for leaders to have
members to shine and his or her to support it. their own vulnerabilities (Brown 2010).
A natural consequence of this line of A common one for the newly hired or promoted
reasoning is the inherent absurdity of microman- is not being acknowledged as a leader by the team
agement. It not only simply doesn’t work with or some of the team members, usually the most
engineers but also increases turnover. Microman- senior ones. Another usual vulnerability is being
agement screams out loud: “I don’t trust you can simply less technically knowledgeable, if at all,
do your work well and on time.” Any leader than the team members.
seeking trust must absolutely forget It is of vital importance for the leader to cor-
micromanagement. rectly access the situation he or she is in and
Returning to the concept of reciprocity, for a understand his or her vulnerabilities. More spe-
leader to have team members who will answer cifically, a leader should understand what he or
honestly, the leader should first answer honestly. she cannot do.
If a leader wants the team members to take risks, Either facing a limitation or struggling to
the leader should be the first to take those risks avoid mistakes, the key element to take away is
and take them for the sake of the team. asking for help. The leader is not expected to
For example, if the leader disagrees with some know it all; he or she is not expected to be a
decision, he or she should state so while super programmer or super artist. The leader is
reminding that still his or her role is to uphold not expected to be able to solve all problems from
this decision. The team members will reciprocate a team. The leader is expected to care for the team
up to the point they believe a leader will go for and for the goals, and having help from others is
them, and they will just believe by seeing the the best way to do it.
leader to it first. A good way for a leader to access if he or she is
There are, also, situations when a team mem- doing properly on this topic is the feeling of being
ber loses the trust of the leader. If this happens, a fraud. A leader who feels he or she is a fraud is
action should be taken by the leader. Often much more likely to access his or her vulnerabil-
involving the team on deciding which action to ities correctly. As the philosopher Socrates said:
take is a good option. A leader trying to dodge “All I know is that I know nothing.”
this kind of problem will pass a message that Feeling as a fraud, of course, is not a necessary
there are no consequences to breaking the trust, condition. But it’s easy to feel like one when doing
which can potentially undermine the trust of the right. A good leader should not only care for his or
entire team. her team members to achieve their goals and, just
as importantly, strive to grow the team members
into becoming independent of him or her.
Having a team independent of the leader leads
Tip 7: Vulnerability
into his or her mind the natural questioning of
how much he or she is needed by the company.
A common issue new leaders have, especially
Having this question in mind, while being well
those who were excellent doers, is dealing with
regarded by his or her peers or being able to
their own vulnerabilities. In the game industry,
repeatedly grow independent teams (just like
often a doer is evaluated by his or her individual
being able to raise independent children), is a
capacity to generate code or assets. Leaders, on
great sign for a leader.
the other hand, are not evaluated only by their
6 Game Development Leadership Tips
Tip 8: Challenge The bottom line is: a good leader should chal-
lenge tasks and arguments but should understand
While a leader must inherently trust his or her that winning a discussion doesn’t make the win-
team members, it is critical for the job to ascertain ner’s ideas correct.
the right problems are being solved (Acton 2014).
A common tool for this task is periodically
checking what a team member is doing and chal- Tip 9: Commitment
lenging tasks when planning for them.
In order to maximize the chance of the prior- Commitment is a key element in successful game
ities and plans being right, the leader can use a projects (Acton 2014). Committed people tend to
very important tool: asking questions (aka chal- deliver work on time and with better quality.
lenge). There are two main questions: What prob- More often than not, therefore, successful teams
lem do we want to solve with a given task and are also committed teams: a good leader should
why are we solving this problem? foster this trait.
While both questions are important, the “why” A key element on this context is having people
question is by far more relevant: a bad answer to a agree on what should be done and, in many cases,
“why” might indicate that performing a given task is how it should be done. An effective means to
plain senseless. Going further, it happens quite often achieve it is letting the team decide by itself
that questions in game development have several those two points: it’s far easier to convince some-
layers of complexity: to reach the primary reason one of his or her own ideas than of ideas coming
why some tasks are required may need a series of from anyone else.
“whys” asked on top of each other’s contexts. Obviously there are requirements for this idea
The idea behind this analysis is similar to the to work: the team should be well informed of the
Socratic philosophy. Asking sufficient “whys” is sought objectives, it should not be formed only by
a good way to understand where one knowledge juniors, and the leader should be ready to chal-
ends and beliefs begin. lenge the proposed plans. All of those elements,
There is a risk into this approach, though: in most environments, are under control of the
reaching a wrong conclusion. A reason for this leader. A positive side effect of it is making them
to happen is that proving a decision is based on a feel useful.
belief makes it easy for someone to discredit an Once the agreement on what and how a plan
argument as most people want to make decisions should be done is reached, the proper scheduling
seemingly based on reason. of the tasks is another critical element to achieve
Still, it’s likely that most people will not apply commitment. If the team members consider a
the same technique on possible counterargu- schedule unreasonable, they are likely to be
ments. Also there is a good chance that the people right and unlikely to commit to it.
the leader is talking to, especially if they are To support this argument, the people working
engineers, will have poor communication skills in the game industry, no matter who is their
meaning that they won’t be able to properly artic- leader, are often professionals. Sometimes they
ulate the answer to the “whys” leading to an are even specialists on their craft. They are most
incorrect analysis. Apart from this, sometimes, likely better aware of their own capacity than
people, for many reasons, will simply prefer not anyone else. Going against it often justifies lack
to verbalize some arguments. of commitment, as itself is often a lack of com-
One way to help in avoiding some of the risks of mon sense.
challenging arguments is, when possible, give peo- Still, just planning with the team what should
ple time to think about the questioning avoiding be done, how it should be done, when on time it
taking decisions during the challenging of an argu- should be done, and by whom it should be done is
ment. This allows people to rethink about the not enough to achieve proper commitment.
answers they gave and improve their arguments. A leader should also be ready to face a dire
Game Development Leadership Tips 7
reality: intermediate steps of plans fail a lot. This leader and his or her team have the chance to
often happens quite early in projects. create a grand strategy for the company.
Delegating responsibilities over a plan’s area A common element of winning visions inside
to an individual or a group is the next step a leader companies is market disruption. This can happen
can take into fostering commitment, especially through new business or monetization models,
on what regards fail contingency measures. new technology, inventing a new gameplay
Doing this, even when something unpredicted genre, finding an undersupplied niche, or
happens, people will understand who should reaching out for people who weren’t previously
solve it and the impact it will have on others: gamers.
their primitive trust mechanism is more likely to A good leader, therefore, should be ready to
trigger, generating commitment. provide his or her team with the company vision.
On the other hand, if plans are given to the If none exists, he or she should create one.
team instead, they are much more likely to dis-
agree upon its feasibility. People will feel forced
instead of committed. Tip 11: Self-Improvement
whenever confronted with a different one. Lis- his or her emotions. Emotional stability inspires
tening is a key element for it. trust on the people you lead.
A good leader should also understand that he It’s, therefore, much easier to be a good leader
or she is often dealing with incomplete informa- when in a good state of mind. This requires the
tion, especially when it regards people. The result leader to take care of himself or herself. A happy
of it is that decisions which may seem obviously leader is much more likely to be a good leader,
right can be the very opposite. Listening to peo- and having a life outside work can be of great
ple, especially the team members, is, therefore, a benefit for it.
crucial element for improving a leader’s capacity Moreover, a great leader should go beyond
when regarding specific teams. merely the work/life balance. Having good rela-
Finally, even more important for a leader than tionships outside work is of immense help. This
his or her own self-improvement is fostering this means that many of the things applied to be the
value for the team he or she leads. A good leader leader of a team should apply to the people out-
should not only be able to create a self-sufficient side the office.
team but also a team capable of improving itself Above all, love should guide the relationships
over time. outside work with other people. Conflicts should
be faced and resolved through communication
(Stone et al. 2000), instead of endured.
Tip 12: Yourself There should be no fear in sincerely showing
vulnerability (Brown 2010): trust people, but be
Being a leader is hard. A leader is expected to ready to challenge any and all beliefs. Commit to
always put the needs of the team above his or goals and to other people, and be accountable for
hers. This can be very taxing, as there is a single it (Acton 2014). Do so with a vision of yourself.
person having to care for many, having to worry And always seek self-improvement.
about the results of many, having to worry even if In the end life is complicated because we are
their life outside work is going well. always dealing with people: the same thing
A common mistake novice leaders do is leaders have to deal with every day in their work.
succumbing to the sheer amount of things to
care for and start having an unbalanced life.
This is particularly true for the work/life balance. References
The problem of this approach is that the less a
person has a life outside work, the less this person Acton, M.: Lead Quick Start Guide. Gamasutra (2014).
http://gamasutra.com/blogs/MikeActon/20141112/22
will come refreshed to the office. This is a usual
9942/Lead_Quick_Start_Guide.php
way through which stress builds up, and in the Brown, B.: The Power of Vulnerability. TED (2010).
game industry this can be often perceived on http://www.ted.com/talks/brene_brown_on_vulnerability
crunch periods, particularly the longer ones. DeMarco, T., Lister, T.: Peopleware: Productive Projects
and Teams, 2nd edn. Dorset House Publishing, New
When under stress, especially over longer
York (1999)
periods of time, people tend to make poorer deci- Sinek, S.: How Great Leaders Inspire Action. TED (2009).
sions. They tend to be less tolerant, be irritated http://www.ted.com/talks/simon_sinek_how_great_leade
over small things, and often overreacting. In the rs_inspire_action
Stone, D., Patton, B., Heen, S.: Difficult Conversations:
work environment, due to the power relations
How to Discuss What Matters Most. Penguin Books,
between the leader and the team, this can be New York (2000)
disastrous. A good leader must always control
M
Synonyms
Structure of MCTS
MCTS; Monte-Carlo Tree Search; UCT
MCTS usually starts with a tree containing only
the root node. The tree is gradually grown by
Definition
executing the selection, play-out, expansion,
and backpropagation steps. Such an iteration is
Monte-Carlo Tree Search (MCTS) (Coulom
called a full simulation. After a certain number of
2007; Kocsis et al. 2006) is a best-first search
simulations, a move is chosen to be played in the
method that does not require a positional evalua-
actual game. This final move selection is based on
tion function. It is based on a randomized explo-
the highest score or alternatively the number of
ration of the search space. Using the results of
times being sampled. The detailed structure of
previous explorations, the algorithm gradually
MCTS is discussed by explaining the four steps
builds up a game tree in memory and succes-
below.
sively becomes better at accurately estimating
the values of the most promising moves. MCTS
consists of four strategic steps, repeated as long Selection
as there is time left (Chaslot et al. 2008b). The Selection chooses a child to be searched based on
steps, outlined in Fig. 1, are as follows: previous information. It controls the balance
between exploitation and exploration. On the
1. In the selection step, the tree is traversed from one hand, the task consists of selecting the
the root node downward until a state is chosen, move that leads to the best results so far
which has not been stored in the tree. (exploitation). On the other hand, the less prom-
2. Next, in the play-out step, moves are chosen in ising moves still have to be tried, due to the
self-play until the end of the game is reached. uncertainty of the simulations (exploration).
# Springer International Publishing Switzerland 2015
N. Lee (ed.), Encyclopedia of Computer Graphics and Games,
DOI 10.1007/978-3-319-08234-9_12-1
2 Monte-Carlo Tree Search
Repeated X times
A selection strategy is One simulated One or more nodes The result is propagated
used to traverse the tree game is played are created back in the tree
Monte-Carlo Tree Search, Fig. 1 Outline of Monte-Carlo Tree Search (adapted from Chaslot et al. 2008b; Winands
et al. 2010)
Several selection strategies (Browne the end of the game is reached. This task might
et al. 2012) have been suggested for MCTS such consist of playing plain random moves
as BAST, EXP3, and UCB1-Tuned, but the most or – better – semi-random moves chosen
popular one is based on the UCB1 algorithm according to a simulation strategy. Smart simu-
(Auer et al. 2002), called UCT (Upper Confi- lation strategies have the potential to improve the
dence Bounds applied to Trees) (Kocsis level of play significantly. The main idea is to
et al. 2006). UCT works as follows. Let I be the play interesting moves based on heuristics. In the
set of nodes immediately reachable from the cur- literature this play-out step is sometimes called
rent node p. The selection strategy selects the the roll-out or simulation.
child b of node p that satisfies Formula 1:
rffiffiffiffiffiffiffiffiffi Expansion
lnnp Expansion is the procedure that decides whether
b argmaxi I vi þ C (1)
ni nodes are added to the tree. Standard the follow-
ing expansion strategy is sufficient in most cases:
where vi is the value of the node i, ni is the visit one node is added per simulation (Coulom 2007).
count of i, and np is the visit count of p. C is a The added leaf node L corresponds to the first
parameter constant, which can be tuned experi- state encountered during the traversal that was
mentally (e.g., C = 0.4). The value of vi should lie not already stored. This allows to save memory
in the range [0, 1]. In case a child has not been and reduces only slightly the level of play.
stored in the tree or has not been visited yet, a
default value is assumed. For example, the max-
Backpropagation
imum value that a node could obtain by sampling
Backpropagation is the procedure that propa-
(i.e., vmax = 1) is taken.
gates the result r of a simulated game t back
from the leaf node L, through the previously
Play-Out traversed nodes, all the way up to the root. If a
When in the selection step a state is chosen, game is won, the result of a player j is scored as
which has not been stored in the tree, the play- rt,j = 1, in the case of a loss as rt,j = 0, and a draw
out starts. Moves are selected in self-play until as rt,j = 0.5. To deal with multiplayer games, the
Monte-Carlo Tree Search 3
result is backpropagated as a tuple of size N, a full board evaluator) has been beneficial in a few
where N is the number of players. For instance, games such as Chinese Checkers and Lines of
if Player 1 and Player 3 both reach a winning Action. When domain knowledge is not readily
condition in a 3-playergame,then the result r is available, there exist various domain-independent
returned as the tuple 12 , 0, 12 . Propagating the techniques to enhance the quality of the play-outs,
values back in the tree is performed similar to including the Move-Average Sampling Technique
maxn (Sturtevant 2008). (MAST), Last-Good-Reply Policy, and N-Grams
To compute the value vi of a node i, a (Tak et al. 2012). The principle of these techniques
backpropagation strategy is applied. Usually, it is that moves good in one situation are likely to be
is calculated by taking the average of the results good in other situations as well.
of all simulated games made through this node The basic version of MCTS converges to the
(Coulom 2007), i.e., vi Ri,j/ni, where j is the game-theoretic value, but is unable to prove it.
player to move in its parent node p and The MCTS-Solver technique (Winands et al.
X
Ri , j r the cumulative score of all the 2010) is able to prove the game-theoretic value
t t, j
simulations. of a state with a binary outcome (i.e., win or loss).
It labels terminal states in the search tree as a win
or loss and backpropagates the game-theoretic
result in a maxn way (Nijssen and Winands
MCTS Enhancements 2011). For games with multiple outcomes (e.g.,
win, loss, or draw), the technique has been
Over the past years, several enhancements have extended to Score Bounded Monte-Carlo Tree
been developed to improve the performance of Search (Cazenave and Saffidine 2011).
MCTS (Browne et al. 2012). First, there are many Finally, to utilize the full potential of a multi-
ways to improve the selection step of MCTS. The core machine, parallelization has to be applied in
major challenge is how to choose a promising an MCTS program. There exist three different
node when the number of simulations is still parallelization techniques for MCTS: (1) root
low. Domain-independent techniques that only parallelization, (2) leaf parallelization, and
use information gathered during the simulations (3) tree parallelization (Chaslot et al. 2008a). In
are Transposition Tables, Rapid Action Value root parallelization, each thread has its own
Estimation (RAVE), and Progressive History MCTS tree. When the allotted search time is up,
(Childs et al. 2008; Gelly et al. 2012; Nijssen the results of the different trees are combined. In
and Winands 2011). Techniques that rely on leaf parallelization, one tree is traversed using a
hand-coded domain knowledge are, for instance, single thread. Subsequently, starting from the leaf
Move Groups, Prior Knowledge, Progressive node, play-outs are executed in parallel for each
Bias, and Progressive Widening/Unpruning available thread. Once all threads have finished,
(Chaslot et al. 2008b; Childs et al. 2008; Gelly the results are backpropagated. When using tree
et al. 2012). The used heuristic knowledge may parallelization, one tree is shared, in which all
consist of move patterns and even static board threads operate independently. For shared mem-
evaluators. When a couple of these enhancements ory systems, tree parallelization is the natural
are successfully incorporated, the C parameter of approach that takes full advantage of the avail-
UCT becomes usually very small or even zero. able bandwidth to communicate simulation
Next, the play-outs require a simulation strat- results (Enzenberger and M€uller 2010).
egy in order to be accurate. Moves are chosen
based on only computationally light knowledge
(Gelly et al. 2012) (e.g., patterns, capture poten- Historical Background
tial, and proximity to the last move). Adding com-
putationally intensive heavy heuristic knowledge Classic search algorithms such as A*, ab search,
in the play-outs (such as a 1- or 2-ply search using or Expectimax require an evaluator that assigns
4 Monte-Carlo Tree Search
MCTS does not require a positional evaluation Abramson, B.: Expected-outcome: A general model of
static evaluation. IEEE Trans. Pattern Anal. Mach.
function, overcoming partially the knowledge
Intell. 12(2), 182–193 (1990)
acquisition bottleneck. It is therefore a promising Arneson, B., Hayward, R.B., Henderson, P.: Monte Carlo
method when an agent has to play a wide range of Tree Search in Hex. IEEE Trans. Comput. Intell. AI
games as is fostered in the General (Video) Game Games 2(4), 251–258 (2010)
Auer, P., Cesa-Bianchi, N., Fischer, P.: Finite-time analy-
Playing competitions. However, for MCTS to
sis of the multiarmed bandit problem. Mach. Learn.
work effectively, search-control knowledge is 47(2–3), 235–256 (2002)
required to guide the simulations. Domain- Balla, R.K., Fern A.: UCT for tactical assault planning in
independent techniques are able to boost the deci- real-time strategy games. In: Boutilier, C. (ed.) Pro-
ceedings of the Twenty-First International Joint Con-
sion quality of an MCTS engine, but for achiev-
ference on Artificial Intelligence (IJCAI-09),
ing expert level hand-coded domain knowledge is pp. 40–45. AAAI Press, Menlo Park, CA, USA (2009)
incorporated to grasp high-level context. Instead Billings, D., Peña, L., Schaeffer, J., Szafron, D.: Using
of being hand-coded by the programmer, a future probabilistic knowledge and simulation to play poker.
In: Hendler, J., Subramanian, D. (eds) Proceedings of
research direction is to automatically discover,
the Sixteenth National Conference on Artificial Intel-
extract, represent, and tune this control knowl- ligence and Eleventh Conference on Innovative Appli-
edge during online search. cations of Artificial Intelligence, pp. 697–703. AAAI
MCTS has been quite successful in abstract Press/The MIT Press, Menlo Park, CA, USA (1999)
Björnsson, Y., Finnsson, H.: CadiaPlayer: A simulation-
games; however, the number of successful appli-
based General Game Player. IEEE Trans. Comput.
cations in modern video games with high fidelity Intell. AI Games 1(l), 4–15 (2009)
is rather limited. There are three challenges for Bouzy, B., Helmstetter, B.: Monte-Carlo Go develop-
applying MCTS in these games. (1) In these ments. In: van den Herik, H.J., Iida, H., Heinz,
E.A. (eds.) Advances in Computer Games 10: Many
video games, the action space is large if not
Games, Many Challenges. IFIP Advances in Informa-
infinite, and the state space is often continuous. tion and Communication Technology, vol.
For MCTS to work effectively, the game world 135, pp. 159–174. Kluwer, Boston (2004)
has to be abstracted automatically in such a way Browne, C.B., Powley, E., Whitehouse, D., Lucas, S.M.,
Cowling, P.I., Rohlfshagen, P., Tavener, S., Perez, D.,
that (i) the number of possible moves is limited
Samothrakis, S., Colton, S.: A survey of Monte Carlo
and (ii) the number of moves required to finish Tree Search methods. IEEE Trans. Comput. Intell. AI
the game is reduced as well. (2) These games Games 4(1), 1–43 (2012)
have a high degree of uncertainty, not only due Cazenave, T., Saffidine, A.: Score bounded Monte-Carlo
Tree Search. In: van den Herik, H.J., Iida, H., Plaat,
to non-determinism (the outcome of a move can-
A. (eds.) Computers and Games (CG 2010). Lecture
not be predicted) or imperfect information Notes in Computer Science, vol. 6515, pp. 93–104.
(certain information is hidden for a player) but Springer, Berlin (2011)
also because of incomplete information (the Chaslot, G.M.J.-B., Winands, M.H.M., van den Herik, H.
J.: Parallel Monte-Carlo Tree Search. In: van den
behavior of the physics engine may be unknown).
Herik, H.J., Xu, X., Ma, Z., Winands, M.H.M. (eds.)
For non-determinism and imperfect information, Computers and Games (CG 2008). Lecture Notes in
MCTS enhancements have been investigated to a Computer Science, vol. 5131, pp. 60–71. Springer,
limited number of abstract games (Cowling Berlin (2008a)
Chaslot, G.M.J.-B., Winands, M.H.M., van den Herik, H.
et al. 2012), but even less for video games. Deal-
J., Uiterwijk, J.W.H.M., Bouzy, B.: Progressive strat-
ing with incomplete information in the MCTS egies for Monte-Carlo Tree Search. New Math. Nat.
framework is a largely unexplored terrain. Comput. 4(3), 343–357 (2008b)
(3) Due to the real-time property the amount of Childs, B.E., Brodeur, J.H., Kocsis, L.: Transpositions and
move groups in Monte Carlo Tree Search. In:
deliberation time is limited. MCTS has to gener-
Hingston, P., Barone, L. (eds.) Proceedings of the
ate a sufficient number of simulations in a short 2008 IEEE Symposium on Computational Intelligence
time as otherwise the decision quality is quite low and Games, pp. 389–395. IEEE, Piscataway, NJ, USA
(Björnsson and Finnsson 2009). (2008)
6 Monte-Carlo Tree Search
Ciancarini, P., Favini, G.P.: Monte Carlo Tree Search in IEEE Trans. Comput. Intell. AI Games 5(1), 57–68
Kriegspiel. AI J. 174(11), 670–684 (2010) (2013)
Coulom, R.: Efficient selectivity and backup operators in Nijssen, J.A.M., Winands, M.H.M.: Enhancements for
Monte-Carlo Tree Search. In: van den Herik, H.J., multi-player Monte-Carlo Tree Search. In: van den
Ciancarini, P., Donkers, H.H.L.M. (eds.) Computers Herik, H.J., Iida, H., Plaat, A. (eds.) Computers and
and Games (CG 2006). Lecture Notes in Computer Games (CG 2010). Lecture Notes in Computer Sci-
Science, vol. 4630, pp. 72–83. Springer, Berlin (2007) ence, vol. 6151, pp. 238–249. Springer, Berlin (2011)
Cowling, P.I., Powley, E.J., Whitehouse, D.: Information Nijssen, J.A.M., Winands, M.H.M.: Monte Carlo Tree
set Monte Carlo Tree Search. IEEE Trans. Comput. Search for the hide-and-seek game Scotland Yard.
Intell. AI Games 4(2), 120–143 (2012) Trans. Comput. Intell. AI Games 4(4), 282–294 (2012)
Enzenberger, M., M€uller, M.: A lock-free multithreaded Pepels, T., Winands, M.H.M., Lanctot, M.: Real-time
Monte-Carlo Tree Search algorithm. In: van den Herik, Monte Carlo Tree Search in Ms Pac-Man. IEEE
H.J., Spronck, P. (eds.) Advances in Computer Games Trans. Comput. Intell. AI Games 6(3), 245–257 (2014)
(ACG 2009). Lecture Notes in Computer Science Perez, D., Samothrakis, S., Lucas, S.M.: Knowledge-
(LNCS), vol. 6048, pp. 14–20. Springer, Berlin (2010) based fast evolutionary MCTS for general video
Enzenberger, M., M€uller, M., Arneson, B., Segal, R.: game playing. In: Proceedings of the IEEE Conference
Fuego – an open-source framework for board games and on Computational Intelligence and Games (CIG 2014),
Go engine based on Monte Carlo Tree Search. IEEE pp. 68–75 (2014)
Trans. Comput. Intell AI Games 2(4), 259–270 (2010) Ruijl, B., Vermaseren, J., Plaat, A. van den Herik, H.J.:
Gelly, S., Kocsis, L., Schoenauer, M., Sebag, M., Silver, Combining simulated annealing and Monte Carlo Tree
D., Szepesvári, C., Teytaud, O.: The grand challenge Search for expression simplification. In: ICAART
of computer Go: Monte Carlo Tree Search and exten- 2014, pp. 724–731 (2014)
sions. Commun. ACM 55(3), 106–113 (2012) Schadd, M.P.D., Winands, M.H.M., Tak, M.J.W.,
Ginsberg, M.L.: GIB: Steps toward an expert-level bridge- Uiterwijk, J.W.H.M.: Single-player Monte-Carlo
playing program. In: Dean, T. (ed.) Proceedings of the Tree Search for SameGame. Knowl.-Based Syst. 34,
Sixteenth International Joint Conference on Artificial 3–11 (2012)
Intelligence (IJCAI-99), vol. 1, pp. 584–589. Morgan Sheppard, B.: World-championship-caliber Scrabble.
Kaufmann, San Francisco, CA, USA (1999) Artif. Intell. 134(1–2), 241–275 (2002)
Hennes, D., Izzo, D.: Interplanetary trajectory planning Sturtevant, N.R.: An analysis of UCT in multi-player
with Monte Carlo Tree Search. In: Yang, Q., games. ICGA J. 31(4), 195–208 (2008)
Wooldridge, M. (eds.) Proceedings of the Twenty- Tak, M.J.W., Winands, M.H.M., Björnsson, Y.: N-Grams
Fourth International Joint Conference on Artificial and the last-good-reply policy applied in general game
Intelligence (IJCAI 2015), pp. 769–775. AAAI Press, playing. IEEE Trans. Comput. Intell. AI Games 4(2),
Menlo Park, CA, USA (2015) 73–83 (2012)
Kocsis, L., Szepesvári, C.: Bandit based Monte-Carlo Tesauro, G., Galperin, G.R.: On-line policy improvement
Planning. In: F€urnkranz, J., Scheffer, T., Spiliopoulou, using Monte-Carlo search. In: Mozer, M.C., Jordan,
M. (eds.) Machine Learning: ECML 2006. Lecture M.I., Petsche, T. (eds.) Advances in Neural Informa-
Notes in Artificial Intelligence, vol. 4212, tion Processing Systems, vol. 9, pp. 1068–1074. MIT
pp. 282–293. Springer, Berlin (2006) Press, Cambridge, MA, USA (1997)
Lorentz, R.J.: Amazons discover Monte-Carlo. In: van den Winands, M.H.M., Björnsson, Y., Saito, J.-T.: Monte
Herik, H.J., Xu, X., Ma, Z., Winands, M.H.M. (eds.) Carlo Tree Search in Lines of Action. IEEE Trans.
Computers and Games (CG 2008). Lecture Notes in Comput. Intell. AI Games 2(4), 239–250 (2010)
Computer Science, vol. 5131, pp. 13–24. Springer, Zhu, G., Lizotte, D., Hoey, J.: Scalable approximate pol-
Berlin (2008) icies for Markov decision process models of hospital
Nguyen, K.Q., Thawonmas, R.: Monte Carlo Tree Search elective admissions. Artif. Intell. Med. 61(1), 21–34
for collaboration control of Ghosts in Ms. Pac-Man. (2014)
D
Detecting and Preventing Online by charging users a subscription fee and selling
Game Bots in MMORPGs virtual items to them. Among the various types of
games, MMORPGs (Massively Multiplayer
Huy Kang Kim and Jiyoung Woo Online Role Playing Games) make up one of the
Graduate School of Information Security, Korea most popular genres.
University, Seongbuk-Gu, Seoul, Republic of As online games gain economic and social
Korea importance, various forms of threats emerge.
A variety of methods have developed to parasitize
and gain unfair advantages in online games. In
Synonyms this chapter, we focus on cheating actions using
the game bot, which is one of the most prevailing
Cheating; Detection; Game bot; MMORPGs reasons why users get banned from the game
company.
Game users cheat to level up and accumulate
Definition cyber assets in an easy and fast way without
sufficient effort. Game items and game money
Game users cheat to level up and accumulate are critical to increasing the survivability of
cyber assets in an easy and fast manner without in-game characters by improving their power
sufficient effort. One of the most widely used tools and reputation. In particularly, MMOPRGs are
for cheating in online games is the game bot, designed such that players take prescheduled
which enables users to cheat in a convenient way courses to achieve high-level characters and
by automatically performing the required actions. become rich in cyber assets. These courses require
Therefore, game companies employ various secu- the users to spend a considerable amount of time
rity solutions for the detection and prevention of on repetitive play.
game bots. To skip these time-consuming processes for
achieving high-level characters and acquire more
cyber assets within a short period of time, users
Introduction begin to cheat. One of the most frequently used
tools for cheating in online games is the game bot.
Online gaming is one of the successful Internet The game bot enables users to cheat in a conve-
services. In the past few years, online games have nient way by automatically performing the
become popular and have been generating huge required actions. A typical game bot is an auto
profits. Online game companies generate profits program that plays the game instead of a human.
# Springer International Publishing Switzerland 2015
N. Lee (ed.), Encyclopedia of Computer Graphics and Games,
DOI 10.1007/978-3-319-08234-9_13-1
2 Detecting and Preventing Online Game Bots in MMORPGs
Some users are eager to achieve a high level eventually the number of players, and shortens
within a short period of time, so they buy virtual the game lifecycle.
goods or higher-level accounts by paying real Online game companies realize the seriousness
money. Game items and currency gained through of the damage caused by a gold farmer group; they
game play can be sold and monetized into real detect game bots and then ban their accounts or
currency. Real money trading of virtual goods is IPs to neutralize the gold farming group. They
also one of reasons why players cheat. The ille- actively hire monitoring personnel, called GM
gitimate activity of gathering virtual goods in (Game Masters), and deploy security solutions
online games primarily for real money is called on both the client side and the network side. In
gold farming (Davis 2009). Gold farming is one of addition, they adopt log analysis systems to detect
the most problematic issues in online games game bot users.
because gold farming is not only performed at an Here, we will discuss some literature on state-
individual level but also by a factory-sized illegal of-the-art game bot detection and prevention
group. “Gold farming groups” are industrialized methods, with the aim to fully understand the
organizations that gather and distribute virtual current prevention techniques and to advance
goods for capital gain in the online gaming countermeasures against the use of game bots in
world (Keegan et al. 2010). Real money trade by online games.
gold farming groups has now become a social
problem in many countries. Real money trade
leads to tax evasion, illegal labor in developing
Literature Review
countries, and damage to the game company.
Gold farmers mainly use game bots for a large-
Technology Trends
scale operation, thus saving on labor costs.
Game bot detection methods have evolved over
Cheating in online games is no longer a per-
the years in the following order:
sonal problem of a player and causes damage to
other players since online games maintain a mas-
• Client-side detection and network side detec-
sive set of players who form social relationships
tion (first generation)
with other players.
• Server-side detection (second generation)
Cheating causes an unfair competition, spoils
• Surgical strike (third generation)
other players’ fun, and makes other players lose
• Proactive detection (advanced surgical strike)
their motivation for the play. For example, bot
users play the game much longer without a
The first-generation methods are signature-
break, while playing continuously for a long
based methods. Client-side bot detection includ-
time is difficult for human players. Since the
ing antivirus programs and CAPTCHA
activities and extraordinary abilities of game
(Completely Automated Public Turing test to tell
bots are noticeable to other players in the game
Computers and Humans Apart) is a first-
world, they can make users feel that the game is
generation method. The first generation of com-
unfair and cause users to leave the game. For
mercial products could be detoured with reverse
companies, the detection and prevention of
engineering. In addition, CAPTCHA can annoy
cheating incur a significant expenditure. When
users.
players use a game bot, they can reach the highest
The second generation is the server-side detec-
level in a shorter period of time than that expected
tion. This method mainly focuses on
by the game designers. Then, the users at the
distinguishing between a bot player and a normal
highest level have no more game contents to
player by analyzing server-side log files. As gold
enjoy and leave the game. Consequentially,
farming becomes industrialized, the detection of
cheating causes various losses to the game com-
all bot users is difficult to implement because of
pany. It reduces the item sales amount, and
the huge number of bot users. It is not efficient
Detecting and Preventing Online Game Bots in MMORPGs 3
because gold farming groups provide standby to solve. Yampolskiy and Govindaraju (2008)
characters against being banned by the game com- proposed the integrated testing procedure as part
pany. Against the endless arm race battle between of the game step performed by the player during
gold farming groups and game companies, we the game in order to distinguish bots from legiti-
need a more efficient and selective detection mate human players. Golle and Ducheneaut
method. The third-generation method is a surgical (2005) demonstrated the CAPTCHA test embed-
strike policy (Woo et al. 2011, 2013a, b). This ding in the game world in order to minimize the
method examines a gold farming group’s ecosys- disruption compared to the out-of-band use of
tem and performs banning to maximize the ban- CAPTCHAs.
ning effect while minimizing the banning However, the first generation of commercial
operation. products could be detoured with reverse engineer-
The current approaches in previous research ing. In addition, the client-side solution has other
rely only on the analysis of behavior patterns. drawbacks. Client-side solutions run on the client
When the players’ activity patterns are distin- computer. This causes a load on the client com-
guishable from the majority, these players are puter and can cause any inconvenience to users.
suspected to be malicious users. Most game com- CAPTCHA can annoy users when they receive
panies take an action that bans bot users’ accounts questions while they are playing.
when they repetitively use a game bot.
Previous detection methods are reactive; they Network-Side Detection Methods
detect bot users only after users have repetitively Network-side detection methods are designed to
exhibited malicious behavior. For a proactive and look into network traffic or network packets gen-
preventative response against malicious users, the erated by the client when the client communicates
social network analysis-based detection methods with the game server. This type of method detects
including the study on the contagion over the network traffic burstiness and anomalies in the
social network are used. command timing, response time, and traffic inter-
val. Some methods are designed to detect different
Client-Side Bot Detection Methods reactions of humans and game bots to changes in
Client-side methods are focused on signature- network conditions such as protocol changes or
based, client-side BOT detection, such as the occurrence of traffic lags.
antivirus programs and CAPTCHA. PunkBuster When a company changes its network proto-
(http://www.punkbuster.com) was the first col, game bots lose their connection and pause to
attempt to avoid cheating on the client side. This update their programs so that they can be fitted to
tool monitors a client machine looking for any the changed protocol. When a company generates
abnormality and sends a screenshot of the client a traffic lag by design, human players react to the
to the game server. Khanh (2010) proposed a change sensitively, for example, by continuously
specifically designed module called GameGuard, clicking their mouse or keyboard buttons until the
which is added to the client to guard against pos- connection resumes, whereas game bots are not
sible cheating attempts from game players. sensitive.
GameGuard hides security-related modules so The network-side solution to a nonclient bot is
that hacking tools cannot see them, by using cer- to ask a question to the user who can give a right
tain system techniques to interfere with some answer when she uses the client software provided
operations of Windows systems. It also places by the game company. The nonclient bot does not
hooks in the Windows kernel mode to examine operate on the client software, so it cannot provide
new processes entering the system and check the right responses for specialized questions.
whether these processes are hacking attempts Similarly, most network-side solutions mainly
or not. adopt a method that frequently changes the net-
CAPTCHA requests the answers that can be work protocol or applies cryptography to encrypt/
easily solved by humans but are difficult for bots decrypt network transmission.
4 Detecting and Preventing Online Game Bots in MMORPGs
For the P2P game, the game company facili- Server-Side Detection Methods
tates a method for participants to reach a consen- Server-side methods use the log collected in the
sus on the current state of the game in a way that server of the company. The company records user
prevents malicious individuals and groups from behaviors as a log in the database. Game bots
cheating. Securing the protocol that delivers mes- display repeated and biased patterns in their
sages when peers communicate is a solution to actions differing from human players. Techni-
this security issue. cally, server-side methods adopt data mining-
The NEO (GauthierDickey et al. 2004) proto- based or statistics-based methods. First, these
col is designed to prevent protocol-level cheating types of methods extract the feature set from the
in P2P games. This protocol enables to accom- log. Then, classification using the feature set is
plish the exchange of update information among performed; classifiers are automatically built
players in an authenticated manner. It verifies the through learning from data by using data mining
identity of the sender and registers updates in or statistical methods.
advance to ensure that every party has chosen its Feature extraction is a critical component of
update for a round before it may read the updates behavior-based detection techniques. First, we
of the other players. It also attempts to ensure build a taxonomy of behavior-based features that
game state consistency by confirming which classifies previous research in a systematic way.
updates have been received by which peers. The Then, we review previous works based on this
details of the NEO protocol (Hu and Liao 2004) taxonomy.
are as follows: It divides the time into uniform User behaviors in the gaming world include
intervals, called rounds, in which each player major activities such as move and play. Other
sends an update to all the other players. Each socializing behaviors are also a good source for
update is encrypted, and in the following round, game bot detection. MMOPRGs are designed to
the players send the corresponding key to each make people interact with others in order to com-
other. plete difficult tasks and then level up their charac-
Corman et al. (2006) invented a more secure ters and have fun playing the game through such
protocol called SEA (Secure Event Agreement). interactions. User behaviors can be categorized
The authors investigated the drawback of the into sole behaviors and social behaviors. The
NEO protocol and then proposed an improved main sole behaviors are movement and play. In
version of this protocol. They focused on the MMORPGs, a play encompasses combat, harvest,
protocol for communications rendering informa- and healing. Social behaviors mainly include
tion such as the position, direction, and action of party play, communication, trade, and community
virtual entities. The SEA protocol signs an entire activity.
event message and binds the message to a partic-
ular round and group. • Party play means that two or more players form
Most of the network-side countermeasures are a group to undertake quests or missions
based on a cryptographic methodology to guaran- together. Users in party play typically share
tee network traffic integrity and confidentiality. To experience points, money, and items acquired
secure network traffic, it is necessary to encrypt upon completion of successful quests. Most
and decrypt the packets. However, this requires a MMORPGs are designed to require party play.
considerable amount of computing power, and the • Players in the game communicate with other
error in this process can spread to all concurrent players by sending text messages or e-mails. In
user connections. This can cause single-point-of- the gaming world, players can trade items. In
failures, so game companies are reluctant to adopt general, players exchange items with other
strong network-side cryptographic methods. items of equivalent value or money. Trade pat-
terns provide a good clue to detect abnormali-
ties, particularly gold farming groups.
Detecting and Preventing Online Game Bots in MMORPGs 5
• In general, players maintain a friend list for behaviors as Hunting, Attack, Hit, Defense,
easy co-play and communication. Player Avoidance, and Recovery; and built a feature
A sends a friend request to player B. When set by using such specified behaviors. The
player B accepts the request from player A, features can be directly retrieved from the
they become friends. They show up in the game log. Further, they developed the feature
friend list of the other party. set from raw features in order to represent how
• Players organize a guild to socialize or achieve efficiently a user plays the game. The devel-
a similar long-term goal. oped features include combat ability, collecting
pattern, and movement pattern.
Previous works focused on movement patterns • Christensen et al. (2013) examined the race
and sole play patterns because they used simula- duration from both the client side and the
tion data obtained by operating game bots. This is server side, and the gap between the duration
an alternative method used when a real game log measured on both sides. They suspected a very
is not available. Bots are programmed, so their short duration time, long duration, and incon-
movement and play patterns are repetitive and sistent duration time between the client side
regular. Bot detection models have been proposed and the server side.
based on this fact. Social behaviors have recently • Platzer et al. (2011) analyzed the sequence of
been adopted in research. Social behaviors cannot play patterns and identified the differences in
be obtained in the absence of the cooperation of a the sequences of bots and human players.
game company. Fortunately, several studies pro- Since bots can make restricted choices when
vide the analysis results of large-scale real data they play the game, they show limited and
under the cooperation with game companies. repetitive behaviors. The authors implemented
Now, we will review key papers in detail. their proposed detection tool on a server-side
Movement-based methods use the fact that and client-side instance and an in-game client-
most bots have preconfigured moving behaviors side add-on that is capable of monitoring its
while humans have random moving patterns own event horizon.
(Kesteren et al. 2009; Mitterhofer et al. 2009). • Lee et al. (2014) proposed a measure that
expresses the extent to which a player behaves
• The longest common path (LCP) is a good repetitively. They analyzed the full action
indicator that measures the regularity in move- sequence of users on a big data analysis plat-
ment patterns. Bots take same paths repeti- form. The differences between the action
tively, so they have high LCP, while human sequences of normal users and bot users were
players show random behavior and thus have determined.
low LCP. Furthermore, bot users can turn the
bot program on and off, which results in a high With respect to social behaviors, party play,
variation in regularity. Human players will communication, and trade have been explored to
have low regularity and a low variation in identify the differences between game bots and
regularity. human players.
Play patterns are widely used for • Kang et al. (2013) focused on party play, which
distinguishing between a bot behavior and a is a group play with several characters, for
human behavior. game bot detection. They pointed out that the
game bot forms a party play with a limited
• Chung et al. (2013) considered all types of number of players, usually other game bots,
behaviors that can be observed in the game and has limited actions biased towards
world. They categorized play patterns into Bat- collecting game money in the party play.
tle, Collect, and Move; specified battle
6 Detecting and Preventing Online Game Bots in MMORPGs
• Kang et al. (2012) proposed a chatting-based based on eigenvector centrality to capture the
bot detection model. They retrieved chatting social influence.
contents and derived features by using text • Keegan et al. (2010) and Ahmad et al. (2011)
mining techniques from the chatting contents. studied the clandestine trade and trust networks
They also derived entropy-based features, of gold farmers, respectively, and described
chatting-pattern based features, and text fea- how gold farmers try to obfuscate their inter-
tures. The proposed detection model assumes action patterns in these networks to evade
that game bots communicate with other bots detection.
through limited messages that humans find • Keegan et al. (2011) discussed the usefulness
difficult to understand. of studying clandestine networks in the virtual
world and their applications to studying their
To detect factory-sized illegal groups that oper- counterparts in the offline world.
ate numerous game bots, i.e., gold farming • Blackburn et al. (2014) introduced an interest-
groups, an understanding of the ecosystem of a ing platform, the Steam Community, an online
gold farming group with respect to the trade pat- social network built on top of the world’s dom-
terns is required. The followings are some surgical inant digital game delivery platform. They
strike approaches. performed a thorough social network analysis
on the players’ social relationships and interac-
• Woo et al. (2011) and Kwon et al. (2015), tions. They found that the cheaters’ network
respectively, identified the ecosystem of gold position is largely indistinguishable from that
farming groups, as shown in the following of fair players.
figure. Gold farmers repeatedly hunt monsters
and harvest craft materials to earn game money More advanced methods are based on the con-
and to save time. The collected items and game tagion process in the players’ social networks.
money are delivered to the merchant charac- This generation method is in an early stage.
ters; merchant characters then sell these items
for game money. The game money from gold • Woo et al. (2013a, b) and Blackburn
farmers and the acquired money by the item et al. (2014) showed that a social contagion of
trade through merchant characters transfer to game bot usage can develop. The first and the
banking characters. Banking characters pos- third study showed that contagion between
sess most of the game money in the GFG to players in a social network exists. The second
sell the game money efficiently. study proposed a modeling method to track the
• Ahmad et al. (2011) considered player charac- contagion process. This modeling method is
teristics and items and detected contraband based on an epidemic model. Modeling of the
networks in terms of players and items. They diffusion process enables one to predict the
analyzed clandestine social networks of devi- future diffusion process and to estimate the
ant players in MMOGs (Massively Multiplayer likelihood of an individual’s bot adoption.
Online Games) along with a network of con- • Ahmad et al. (2013) proposed label propaga-
traband items sold by these players. tion to detect gold farmers. The proposed
• Oh et al. (2013) utilized the fact that game bots model initially sets the label that indicates the
and human players form social networks in gold farmers, and then, propagates these labels
contrasting ways. They constructed a social over highly connected networks, such as the
network on the basis of mentoring relation- mentoring network, housing-trust network,
ships. They derived features from the play and trade network. To reduce false positives
and the trade and added social network-based in which normal users are misjudged as bot
features. These authors proposed new features users, the authors also considered user
similarity.
Detecting and Preventing Online Game Bots in MMORPGs 7
The game company adopts a negative policy groups. Further, the detection methods have
for bot users since banning accounts often causes become more proactive, getting hints from the
a legal issue between the user and the game com- contagion process of the game bot usage on a
pany. If the game company selectively targets social network that can be observed in online
users for banning, it can ban users for minimizing games.
the compliance risk and maximizing the banning Through this survey, several research gaps
effect at the same time. Identifying influentials in have been identified.
the diffusion process of game bot usage will solve First, the surgical strike methods for the detec-
this issue. tion of gold farming groups have not been
explored sufficiently thus far. As gold farming
• Ki et al. (2014) provided the analysis results on increases, efficient and effective detection
a contagion of game bot usage and identified methods are needed and the current literature has
the influentials in the contagion process. Iden- much room for improvement.
tifying the influentials in the diffusion of mali- Second, the server-side methods mostly focus
cious behaviors and understanding the on feature extraction and apply existing machine
diffusion process of the malicious behaviors learning algorithms to build automatic classifiers.
is particularly important, as it will give the However, an algorithm specialized for game bot
game company a new opportunity to act pro- detection has not been developed thus far. An
actively and preventively against malicious algorithm that reflects the characteristics of game
users. bot users or gold farming groups may be more
effective than the existing algorithms.
Third, game bots are evolved to avoid detec-
Conclusions tion, so behavior-based methods become outdated
in a short span of time. More features that reflect
This survey summarized how the game bot detec- the cheater’s psychology and the behavior
tion methods have evolved in the recent years. It lifecycle can be used for generating more genetic
further developed a taxonomy according to the models. In addition, behavior features are gener-
data source for countermeasures and introduced ally game-specific, so generic features also should
the state-of-the-art literature on the game bot be considered.
detection and prevention methods. The game bot This survey will hopefully boost researchers’
detection methods have been developed from interests in this area of study, help in determining
client-side detection and network-side detection the research agenda, and finally, lead to the devel-
methods to server-side detection methods. Client- opment of countermeasures against game bots.
side security solutions that are required to be
installed on the client computer often cause colli-
sions in the operating system, resulting in user
Cross-References
inconvenience. Network-side detection methods
such as network traffic monitoring or network
▶ Secure Gaming: Cheat-resistant Protocols and
protocol changes cause a network overload and
Game History Validation
lags in the game play, a significant annoyance in
the online gaming experience. Server-side
methods that are mainly based on log mining of
user behaviors produce highly accurate rate and References
effective rules to detect game bots and do not
interfere with the game play. With the evolution Ahmad, M.A., Keegan, B., Sullivan, S., Williams, D.,
Srivastava, J., Contractor, N.: Illicit bits: Detecting
of game bot usage, from being used by individual and analyzing contraband networks in massively
users to gold farming groups, server-side methods multiplayer online games, privacy, security, risk and
have been advanced to detect gold farming trust (passat). IEEE third international conference on
8 Detecting and Preventing Online Game Bots in MMORPGs
and 2011 I.E. third international conference on social Kesteren, M., Langevoort, J., Grootjen, F.: A step in the
computing (SocialCom), pp. 127–134 (2011) right direction: Bot detection in Mmorpgs using move-
Ahmad, M.A., Keegan, B., Roy, A., Williams, D., ment analysis. In: Proceedings of the 21st Belgian-
Srivastava, J., Contractor, N.: Guilt by association? Dutch Conference on Artificial Intelligence (2009)
Network based propagation approaches for gold farmer Khanh, Van Nguyen, G.: A Windows-based software archi-
detection, advances in social networks analysis and tecture for protecting online games against hackers. In:
mining (ASONAM). IEEE/ACM International Confer- Proceedings of the 2010 Symposium on Information
ence on, pp. 121–126 (2013) and Communication Technology, pp. 171–178 (2010)
Blackburn, J., Kourtellis, N., Skvoretz, J., Ripeanu, M., Ki, Y., Woo, J., Kim, H.K.: Identifying spreaders of mali-
Iamnitchi, A.: Cheating in online games: a social net- cious behaviors in online games. In: Proceedings of the
work perspective. ACM Trans. Internet Technol. Companion Publication of the 23rd International Con-
(TOIT) 13(9) (2014) ference on World Wide Web Companion, pp. 315–316
Christensen, J., Cusick, M., Villanes, A., Veryovka, O., (2014)
Watson, B., Rappa, M.: Win, Lose or Cheat: The Ana- Kwon, H., Mohaisen, A., Woo, J., Kim, Y., Kim, H.K.:
lytics of Player Behaviors in Online Games, Technical Crime scene reconstruction: online gold-farming net-
report (North Carolina State University. Dept. of Com- work analysis, under review. In: IEEE Transactions on
puter Science), 1–7 (2013) Information Forensics & Security 2015, pp. 1–11
Chung, Y., Park, C.-y., Kim, N.-r., Cho, H., Yoon, T., Lee, (2015)
H., Lee, J.-H.: Game bot detection approach based on Lee, J., Lim, J., Cho, W., Kim, H.K.: In-Game action
behavior analysis and consideration of various play sequence analysis for game bot detection on the big
styles. ETRI J. 35, 1058–1067 (2013) data analysis platform. In: Proceedings of the 18th Asia
Corman, A.B.., Douglas, S., Schachte, P., Teague, V.: Pacific Symposium on Intelligent and Evolutionary
A secure event agreement (sea) protocol for peer-to- Systems, vol. 2, pp. 403–414 (2014)
peer games, availability, reliability and security. The Mitterhofer, S., Platzer, C., Kruegel, C., Kirda, E.: Server-
First International Conference on. 8 (2006) side bot detection in massive multiplayer online games.
Davis, R.: Welcome to the new gold mines. The Guardian. IEEE Secur. Priv. 7, 29–36 (2009)
5, (2009) Oh, J., Borbora, Z.H., Sharma, D., Srivastava, J.: Bot
GauthierDickey, C., Zappala, D., Lo, V., Marr, J.: Low detection based on social interactions in MMORPGs,
latency and cheat-proof event ordering for peer-to- Social Computing (SocialCom). In: 2013 International
peer games. In: Proceedings of the 14th International Conference on, pp. 536–543 (2013)
Workshop on Network and Operating Systems Support Platzer, C.: Sequence-based bot detection in massive
for Digital Audio and Video, pp. 134–139 (2004) multiplayer online games. In: Information, Communi-
Golle, P., Ducheneaut, N.: Preventing bots from playing cations and Signal Processing (ICICS) 2011 8th Inter-
online games. Comput. Entertain. 3, 1–10 (2005) national Conference on, pp. 1–5 (2011)
Hu, S.-Y., Liao, G.-M.: Scalable peer-to-peer networked Woo, K., Kwon, H., Kim, H.-c., Kim, C.-k., Kim, H.K.:
virtual environment. In: Proceedings of 3rd ACM What can free money tell us on the virtual black mar-
SIGCOMM Workshop on Network and System Sup- ket? ACM SIGCOMM Comput. Comm. Rev. 41,
port for Games, pp. 129–133 (2004) 392–393 (2011)
Kang, A.R., Kim, H.K., Woo, J.: Chatting pattern based Woo, J., Kim, H. K.: Survey and research direction on
game bot detection: do they talk like us? KSII Trans. online game security. In Proceedings of the Workshop
Internet Inf. Syst. 6, 2866–2879 (2012) at ACM SIGGRAPH Asia. pp. 19–25 (2012)
Kang, A.R., Woo, J., Park, J., Kim, H.K.: Online game bot Woo, J., Kang, A.R., Kim, H.K.: Modeling of bot usage
detection based on party-play log analysis. Comput. diffusion across social networks in MMORPGs. In:
Math. Appl. 65, 1384–1395 (2013) Proceedings of the Workshop at SIGGRAPH Asia,
Keegan, B., Ahmed, M.A., Williams, D., Srivastava, J., pp. 13–18 (2013a)
Contractor, N.: Dark gold: statistical properties of clan- Woo, J., Kang, A.R., Kim, H.K.: The contagion of mali-
destine networks in massively multiplayer online cious behaviors in online games. In: Proceedings of the
games, social computing (SocialCom). In: IEEE Sec- ACM SIGCOMM 2013 Conference on SIGCOMM,
ond International Conference on, pp. 201–208 (2010) pp. 543–544 (2013b)
Keegan, B., Ahmed, M.A., Williams, D., Srivastava, J., Yampolskiy, R.V., Govindaraju, V.: Embedded
Contractor, N.: Sic Transit Gloria Mundi Virtuali?: noninteractive continuous bot detection. Comput.
Promise and peril in the computational social science Entertain. 5, 7 (2008)
of clandestine organizing. In: Proceedings of the 3rd
International Web Science Conference, vol. 24 (2011)
G
THE END.
PRINTING OFFICE OF THE PUBLISHER.
*** END OF THE PROJECT GUTENBERG EBOOK GUY DEVERELL, V.
2 OF 2 ***
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
ebookbell.com