SIMULATING TURN-BASED RPG USING SYSTEM DYNAMICS AS A BALANCING TOOL: AUTOMATING PLAY TESTING

1ERVINA WIJAYA, 2ARYA ANTAPUTRA, 3YUSUF ISLAM

Human Computer Interaction Surya University Tangerang, Indonesia E-mail: [email protected]

Abstract- Designing game balancing by game designers are tedious work where they need to design the statistics using spreadsheet, and playtest them manually in many iterations. Finished balancing will be state of the game to deliver as intended by its game designer. In order to reach the said state, game designer must spend a good deal of time doing playtesting. Therefore, this paper proposes a game balancing tool which functions to automate playtesting by simulating model of battle RPG using utilized system dynamics. The purpose is to help game designer cuts playtesting time to collect insights on how their current balancing works. This paper explores the possibility of creating and using system dynamics to model RPG, especially battles, to be used as game balancing tool to help building strategies in design direction.

Keywords- playtesting, simulation, system dynamics model, turn-based RPG, game balancing tool

I. INTRODUCTION is one of the oldest genre of game, examples of RPGs are , , Pokemon, etc. The Role playing games (RPG) incorporates various key elements of RPGs are where the player as main numbers inside their game mechanics. The character who is either a hero or a pokemon trainer, relationships between players and enemies are going on an adventure to complete quests. During the connected by battle mechanism. As game designers adventure, player will be faced by enemies and need to design balancing to those numbers to make battles where player needs to beat the enemies before every game from scratch. Ideally, a game is getting beaten, win the battle, and then gradually get considered balanced when it does drive most of target experience points to gain more levels as they progress players to quit before the game reaches its final. The through the game. The relationship between core aim of is to create a fun experience points needed each level is called entertainment/game for players [1]. progression relationship. The other is tradeoff The complexity of considering how the numbers relationship where number of certain item is traded affect each other often hinders game development. with another item. The simple example is trading Currently there exist several enemy/monster statistics gold with potion items. These progression and generators to help the designing, but they have tradeoff relationships affect on how balanced a game limitations. Once being merged into a whole game, is when player is interacting with game components playtesting session is still needed to test the balancing. [4]. A research about game balancing tool found several feature requirements by asking game designers. One The basic numbers that are part of most RPGs are: (a) of them was the ability to do live-edit playtesting that level, (b) exp (experience point), (c) attack, (d) concerned to avoid time wasting by stopping and defend, (e) randomness. The relationships between editing back and forth [2]. two number elements can be represented as curve. There are several types of curve: identity, linear, In the other hand, there is a method that is used to exponential, logarithmic, triangular, or even custom model, simulate, analyze complex real-world systems crafted curves. called system dynamics [3]. As game is also being able to be perceived as a system, this paper’s objective B. Randomness is to fill the gap by using system dynamics as the Random is needed in not only RPG, but most game in backbone and the demand of playtesting automation. order to create a realistic point of view. For example, This research starts with literature review of RPG in reality during a battle, damage produced by a balancing includingnumerical relationship, character cannot be always constant; even robots don’t progression, and system dynamics. Then, continuing produce 100% same output all time. Constant conceptualization of simulation model, which finally relationships will make the game feels static and the simulation will be run based on a scenario in everything becomes predictable; which will become imaginary case study. boring for players. That is why game designers like to implement randomness in their game, but in such a II. LITERATURE REVIEW way to avoid wild randomness. A. Numerical Relationships Several ways to implement randomness in calculation Game is consisted of numbers and mechanic that is by using dice roll or using normal/uniform governs how each number relates to the others. RPG distribution. When designing randomness in game,

Proceedings of 117th IASTEM International Conference, Jakarta, Indonesia, 30th-31st May 2018 45 Simulating Turn-Based RPG Using System Dynamics as a Balancing Tool: Automating Play Testing designer needs to understand the probabilities of III. METHODOLOGY winning and losing the game [5]. A. Case Study C. Enemy Random Encounter v.s. StaticEncounter The case study used to design this tool is using a Single player RPGs usually need bot monsters called scenario of persona of a game designer for RPG who mob to fight in forest/dungeon to help gain level, usually works on games using RPG Maker. unlike multiplayer RPGs. Currently, there are two At early game development, a game designer wants to possibilities of designing enemy encounter type for a design her RPG to have this difficulty of having 2-3 game [6]: turn to take out enemy at first forest, then raised until 1. Random encounter: when player is walking 5-7 turn for entering new dungeon of more powerful through a dungeon, they will encounter enemy. As player travels through dungeon and invisible enemy which are spawned by gaining more level, when they are out of dungeon counting how many steps are taken. (after beating 20 enemies), player can re-enter 2. Static encounter: Another one usually this dungeon and fight with same set of monsters which type of encounter consists of visible enemies will be faster; decreasing turn count to 3-5. where player can see the enemy position in the Game designer looks for feedback data of whether the map. Battle will be engaged when player enemies are balanced enough for player in each state touches the enemy, while also able to walk past battle to make further amendments for enemies’ the enemy by avoiding contact. This method statistics to reach the balancing she wants. will require designer to position enemy over the map. B. System Dynamics System dynamics is a methodology to analyze D. RPG Maker structure and how a system behaves developed by RPG Maker is specific for RPG MIT [8]. By dividing a system into variables and development. RPG Maker currently has several series model their relationships, the audience will be able to for witch the popular versions now are RPG Maker understand the behavior of certain variables. VX, RPG Maker VX Ace, and RPG Maker MV. RPG Relationships are modelled by using mathematical Maker has created hundreds of games; both traditional equation involving related variables by analyzing the RPG and nontraditional such as visual novel horror referenced system itself. RPG genre [7]. System dynamics models’ purposes is to: (a) teach RPG Maker has features which are designed audience how a system works and learning its specifically toward the ease of RPG development, and behaviors, (b) creating a predictive simulation to test that makes it a good to reflect on how RPG out policy makings. System dynamics could be structures are usually and generally built. represented as qualitative and quantitative modeling. RPG Maker implements elements of RPG into: Qualitative modeling takes form of causal loop 1. Maps: filled with items, NPCs, and enemies diagram, while quantitative modeling uses stock-flow in a specific position in a space. diagram [9]. During development, it is 2. Actors: actors are basically playable recommended to use stock-flow diagram in the characters. They have statistic template formulation stage [8]. consisted of 9 elements: EXP curve, Max HP, System dynamics is used to model RPG battle Max MP, Attack, Defend, M.Attack, simulation in this paper because game is also a system M.Defend, Agility, and Luck. These elements that has related variables. are saved as element-to-level curve, which there’s a feature to generate the curve based IV. IMPLEMENTATION AND on growth speed. EXPERIMENTATION 3. Enemies: a database of enemy troops. Each enemy also has 9 elements actors have, in After literature studies to understand balancing in addition to EXP Drop and behaviors. These RPG, developing the system dynamics model was behaviors represent enemy’s actions and its divided into 4 stages. There was also studies on how a probability to act. turn-based RPG is usually made in order to create a 4. Items:a database of items accessible during balancing tool that could work with wide variety of battle. Items includes potions, having amount turn-based RPG. The studies and observations of restoration point. collected will help designing game rules and 5. Skills: a database of skills, including physical elements’ relationship. Followed stage is developing attack. RPG maker uses a default damage the system dynamics model using framework formula: consisted of: (a) problem identification (b) conceptualization (c) formulation (d) testing. All stages are done in chronological order using iteration (1)develo pment process. Each iteration’s feedbacks were

Proceedings of 117th IASTEM International Conference, Jakarta, Indonesia, 30th-31st May 2018 46 Simulating Turn-Based RPG Using System Dynamics as a Balancing Tool: Automating Play Testing used to improve the model in the next iteration. Few conceptualization points will be explained in model’s discussion.

A. System Dynamics Model 1) Model Framework System dynamics model was developed using stock and flow diagram developed using Vensim PLE by Ventana Software. As shown in Fig. 1the result model is composed of two main modules: battle system module and experience building module. Fig. 1. Model framework.

Fig. 2. Battle system dynamics model.

This simulation model uses “turn” as referenced time fixed value of health points. On the other hand, unit in order to generate variables dependent to a enemy’s turn action is always attacking the player. situational turn.Considering that attacks are done Assumption 2: Delivered damage per normal within time window of turn, it is more intuitive to attack action is calculated using random normal of immediately use turn as time unit rather than using ATK, DEF, and variance. This calculation refers to second or minute of time unit. In addition, turn count RPG Maker formula of attack. also indicates level of challenge/difficulty [10]. By Assumption 3: A queue of monsters that player using Vensim PLE, the simulation result for every will face sequentially in the game is needed to be level and auxiliary variables are able to be observed inputted into the simulation. This model assumes that by graph and table window. the designed RPG uses static encounter type. Assumption 4: The simulation will continue 2) Battle System Module creating new battle every time player wins a battle. Battle module’s purpose is to simulate battle process However, when player loses, simulation will stop through a set of determined enemies into turns of generating new battle simulation as player doesn’t action. Whether is the battle won by player or enemy, recover anymore. depends by enemy current HP and player current HP. Assumption 5: difficulty curve represented in this Player and enemies attack each other, dealing a model mainly stems from the number of turn count in number of damage. The battle proceeds first by defeating the enemies. The resulted graph was meant player’s turn and then enemy’s turn, which then to show designer if the statistics are balanced visually. repeats until one side loses. After that new battle starts Variable graph can be shown after each simulation by with the next enemy in list as opponent. There are selecting the variable, then choose graph quick output several assumptions made in the model design: buttons on the left-hand toolbar. For showing table to Assumption 1: The player’s turn action is chosen examine detailed value of a variable through time, between attacking or healing using potion by referring choose table[11]. to current player HP. Low HP below certain percentage point will trigger potion usage in the turn. The main equation used in calculating total damage in This model assumes potion to always restore a same battle system module is shown by function (2).

Proceedings of 117th IASTEM International Conference, Jakarta, Indonesia, 30th-31st May 2018 47 Simulating Turn-Based RPG Using System Dynamics as a Balancing Tool: Automating Play Testing from model design andconceptualization are shown on Table II. Table II. Initial Values

(2) The major input variables in this simulation model for game designer to use are both enemy and player statistics, which are inputted into lookup variables listed in Table I. C. Simulation After collecting statistics data for both player and Table I.Lookup Variables enemies, simulation will use the data to run battle simulation to give results of battle statistics. Collected data consist of character statistics and enemy set statistics. Enemy sequence of dungeon starts from 6th to 29th with dungeon boss placed on 26th.Results will include character level growth over time and also how many turns player performs in each battle. Turn counts information will give insight to designer about the current balancing to player. By skipping manual playtesting, this results information will play role as

game designer’s reference to make changes to actor 3) Experience Building Module statistics. Experience building module’s focus is to simulate character’s experience growth based on when and how According to case study scenario, entering a new much experience points dropped by defeated enemy. dungeon and fight a new monster can be a sudden Experience points will up in a level variable jump of difficulty [10]. Similar jump can be observed called Player Exp. The variable affects the player level from Fig.4a-c after fifth battle. Not only that, fighting and indirectly affects other player statistics lookup dungeon later after 20 fights still did not reduce turn variables.Balancing of player’s power will be counts. Several observations were made and statistics determined by the level-exp curve designed. were improved using iteration development and then simulated again to compare results.

In first iteration, player’s level at the end of simulation was level four as shown in Fig. 4a. After increasing the experience dropped from enemies and switching the enemy position, player ended up a level higher at the end of simulation.Fig. 4b showsturn count overshoots at dungeon startwith value two times previous enemies. This apparent imbalance jump could be improved by lowering the enemy power. We can also observe that dungeon boss was faced by player in level 4 instead level 3 of iteration 1.

Fig. 3. Experience building system dynamics model.

B. Initial Model Simulation Based on the purpose of model, several initial values of the simulation can be inputted as game designer’s designed variables and statistics. Because the model is simplified has not yet able to represent a real complex RPG system, actors’ statistics used are HP, attack, defend, and experience point. For player experience point is the number of experience needed to reach next level, while experience point of enemies are number of experience given to player after player’s to defeat the enemy. In addition to retrieved values from game designer, there rest of initial values are assumed (a)

Proceedings of 117th IASTEM International Conference, Jakarta, Indonesia, 30th-31st May 2018 48 Simulating Turn-Based RPG Using System Dynamics as a Balancing Tool: Automating Play Testing

(b) (c) Fig. 4. a. Player level and turn-count prebattle over time using iteration 1 enemy statistics. b. Using iteration 2 enemy statistics. c. Using iteration 3 enemy statistics

Fig. 5. Player current HP level variable over time graph.

So to improve the overshoots observed previously, (1) Simulation’s behaviors are discrete which is another enemy rearrangement was done to introduce caused by the nature of all discrete variables the weaker dungeon monster to the earliest part of used. Unlike the usual implementations of dungeon. By looking at Fig. 4c we can see the system dynamics that use continuous reduction of overshooting. Last iteration balancing variables and continuous time unit. brought player to level 5 after 23 fights. If we look at (2) Putting strong enemies at the beginning can Fig. 5, we can also see the player HP graph and find result in quicker time to gain level especially out how many potions used during this scenario. In in early start of game. This will make player addition, almost other variables like enemy HP can become easily used to fight the similar also be graphed out and compared to player HP to enemies and feel stronger for finishing them understand how the battles’ balance. more quickly.

V. RESULT AND DISCUSSION CONCLUSION AND LIMITATIONS

Based on results of the simulations above, we are able By shown results, apparently it is possible to simulate to observe the turn-based RPG system dynamics RPG playtesting using system dynamics model, even model simulation’s characteristics: though the current model lacks complexities of a full

Proceedings of 117th IASTEM International Conference, Jakarta, Indonesia, 30th-31st May 2018 49 Simulating Turn-Based RPG Using System Dynamics as a Balancing Tool: Automating Play Testing featured RPG. Playtesting simulation tool to help [4] Brathwaite, Brenda and Scheiber, Ian (2018). You did 250 game balancing is barely available to designers, since Damage! (or,Numerical Relationships). Manuscript in preparation. it is difficult for computer to define fun for human. [5] Brathwaite, Brenda and Scheiber, Ian (2018). Probability The current finding opens possibility of creating a tool and Randomness. Manuscript in preparation. mainly to give insights to game designer in order to [6] Perez, D. (2016). Beginning RPG Maker MV (pp. 114- decide what measures to take to improve the numbers. 121). New York, US: Springer. [7] Perez, D. (2016). Beginning RPG Maker MV. New York, Despite being simplified, this tool could be useful in US: Springer. early development when complexity is still low. In the [8] M. P., & Čerić, V. (n.d.). DEVELOPING SYSTEM future, several versions of more complex model could DYNAMICS MODELS WITH "STEP-BY-STEP" be achieved and be used to analyze other components APPROACH. Journal of Information and Organizational Sciences; Vol 31, No 1 (2007). that are helpful to understand how balanced a game is. [9] Pruyt, E. (2012). Small system dynamics models for big issues: Hop, step and jump towards real-wold dynamic ACKNOWLEDGEMENT complexity: SPM2313(pp. 33-40). [10] Brathwaite, Brenda and Scheiber, Ian (2018). Progression in PvE Games. Manuscript in preparation. We thank Ian Schreiber for supporting us with his [11] Hillman, D. (n.d.). Systems Dynamics Using Vensim book material and insights about game balancing. We Personal Learning Edition (PLE) [PDF]. also thank Nelson Gustav Wisana, senior game designer of Agate International, for his insights, thoughts and viewsas a practitioner. We are also very thankful to our colleagues whom we had discussed with and had insights from.

REFERENCES

[1] Fullerton, T. (2008). Game Design Workshop: A Playcentric Approach to Creating Innovative Games (2nd ed.). USA: Elsevier Inc. [2] Eriksson, J. (2014). The Making of a Conceptual Design for a Balancing Tool. Retrieved December 2017, from http://sh.diva-portal.org [3] Homer, J. B., & Hirsch, G. B. (2006). System Dynamics Modeling for Public Health: Background and Opportunities. American Journal of Public Health,96(3), 452-458. doi:10.2105/ajph.2005.062059



Proceedings of 117th IASTEM International Conference, Jakarta, Indonesia, 30th-31st May 2018 50