A simple save system in Unity

Saving game data is a task that I need regularly. Using serialization and writing data to a file is an approach that I have used much, but that does not work in WebGL builds. Instead, I wrote data in a PlayerPrefs string. In this way I do not need to keep a details about what objects have a save data to delete or find all save data. The XML string stored contains everything.

Continue reading


Measuring aggression, the effects of violent games (and other media)

According to Anderson et al. (2010) there is a link between violent games and aggressive behavior. However, that meta-analysis has been criticized. In addition, studies have found little evidence that violent games relates to violent behavior in real life, for example, as aggravated assault or homicide. (see my previous post). Again, this is not a systematic review, but more notes to myself on the topic.

According to Ferguson and Rueda (2009) modified Taylor competitive reaction time test of aggression (modified TCRTT) is used to violent game effects. The idea of TCRTT is to measure how much painful noise (or in unmodified version electronic shock) participants are willing to induce to another.

However, Ferguson and Rueda note that there is no standardized version of modified TCRTT. Elton (2016) reviewed the use of TCRTT in 130 publications and found that those publications used 156 different quantification approaches. Ferguson and Rueda (2009) argues that lack of standardized version has a serious consequences: “Researchers (or indeed clinicians) could choose outcomes that best suit their hypothesis and ignore outcomes that do not.”

Tedeschi and Quigley, TCRTT  have more fundamental flaw in its design:

Tedeschi and Quigley 1996 note, the iterative nature of the game may encourage aggressive responding for other reasons, such as reciprocity (fairness) and deterrence (social control), rather than desire to harm. There is also the possibility that very competitive participants might use more severe shocks, not because they want to harm theirmopponent, but to negatively affect their reaction rates and so ‘‘win’’ the game. (cited in Ritter and Eslea, 2005.)

If we “define aggression as behavior that is intended to harm another individual who does not wish to be harmed (Baron and Richardson, 1994, cited in Rajiv and Hammond, 2014) intention to harm should be also evaluated. Laboratory research have a great challenge here because participants are most likely aware that research cannot setup study so that participants could harm someone with their actions in an experiment. (C.f. Ritter and Eslea, 2005.) Also, Milgram experiment at 1960s tells a story, at least, how experiment situation can setup so that participants follow instructions, give electric shocks, even when thinking they cause pain to someone; however, the participants apparently lacked intention to harm.

Breuer, et al. (2015) studied the relation of frustration and aggression measuring aggression with modified TCRTT. They conclude:

The current results corroborate previous research and provide further support for the contention that factors other than violent content play a role in the effects of digital games on aggression. (Breuer, et al. 2015)

Elton, et al. show evidence that game speed, for example, can influence aggression measures used in laboratory research:

The results show that game speed, a feature that tends to vary across games and genres, not only interacts with displayed violence, but also has a direct effect on several outcome variables that might otherwise be misleadingly attributed to displayed violence. The findings of this study demonstrate the importance of controlling potentially confounding factors in experimental research on digital games and points to the importance of further systematic research into what other variables of a game may affect player experience and behavior […] (Elson, et al. 2015)

For the future reading: Ritter and Eslea (2005) provides review of main approaches(including TCRTT) to measure aggression in  laboratory settings as well as critique to those.


  • Andreson, et al. 2010. Violent Video Game Effects on Aggression, Empathy, and Prosocial Behavior in Eastern and Western Countries: A Meta-Analytic Review. Psychological Bulletin, 136(2). DOI=0.1037/a0018251.
  • Breuer, J., Scharkow, M. and Quandt, T. 2015, Sore losers? A reexamination of the frustration–aggression hypothesis for colocated video game play, Psychology of Popular Media Culture, 4(2), pp.126-137.
  • Elson, M., Breuer, J., Van Looy, J., Kneer, J. and Quandt, T. 2015, Comparing apples and oranges? Evidence for pace of action as a confound in research on digital games and aggression, Psychology of Popular Media Culture, 4(2), pp.112-125.
  • Elton, M., 2016. Flexible Measures / Competitive Reaction Time Task. Available at http://www.flexiblemeasures.com/crtt/index.php?menu=publications.
  • Ferguson, C.J. and Rueda, S.M.  2009. Examining the validity of the modified Taylor competitive reaction time test of aggression. J Exp Criminol, 5(121). DOI= 10.1007/s11292-009-9069-5.
  • Rajiv, J. and Hammond, T. 2014. Principles of social psychology. Available at https://opentextbc.ca/socialpsychology/.
  • Ritter and Eslea, 2005. Hot Sauce, Toy Guns, and Graffiti: A Critical Account of Current Laboratory Aggression Paradigms. Aggressive Behavior 31, pp.407–419.


Violent game effects?

This is not anything like systematic review, but more notes for myself.

The long debate of how violent games effect on behavior. Anderson, et al. (2010) argue that there are violent games increase aggression and lower empathy:

The evidence strongly suggests that exposure to violent video games is a causal risk factor for increased aggressive behavior, aggressive cognition, and aggressive affect and for decreased empathy and prosocial behavior. Moderator analyses revealed significant research design effects, weak evidence of cultural differences in susceptibility and type of measurement effects, and no evidence of sex differences in susceptibility. Results of various sensitivity analyses revealed these effects to be robust, with little evidence of selection (publication) bias.

Hilgard, Engelhardt and Rouder (2017) provide a reanalysis of Anderson, el al. (2010) meta analysis and reach different conclusion:

First, we detect substantial publication bias in experimental research on the effects of violent games on aggressive affect and aggressive behavior. Second, after adjustment for bias, the effects of violent games on aggressive behavior in experimental research are estimated as being very small, and estimates of effects on aggressive affect are much reduced. In contrast, the cross-sectional literature finds correlations that appear largely unbiased. Third, experiments meeting the original authors’ criteria for methodological quality do not yield larger adjusted effects than other experiments, but instead yield larger indications of bias, indicating that perhaps they were selected for significance.

Ferguson and Kilburn (2010) also criticize Anderson et al. (2010) meta analysis, because  studies included does not study violent aggression. Fergunson (2007) elsewhere states that evidence to publication bias in videogame violence effects publications.

On the other hand, Browne and Hamilton-Giachritsis (2008) states that there are evidence that violent imaginary in games has a short term effect to children (increasing aggressive or fearful behaviour), but inconsistent evident of any long term effect or any kind of effect to teens and adults.

Notably, studies looking at the link between violent videogames and violent real world behaviour has not found an evidence that those two are linked. Markey, et al. (2014) did not find evidence that playing violent games and aggressive assaults and homicides are positively linked. However, Browne and Hamilton-Giachritsis (2008) claim that there is “weak evidence from correlation studies links media violence directly to crime.”

A new intervention study comparing effects of playing violent videogame and non-violent videogames to aggression, by Kühn, et al. (2018a) allows draw causal conclusions. Based on their study where participants played Sims 3 (n=24) or Grand Theft Auto V (n=25) daily for two months (and have third passive control group who did not play any game, n=28), they conclude

The present results thus provide strong evidence against the frequently debated negative effects of playing violent video games in adults and will therefore help to communicate a more realistic scientific perspective on the effects of violent video gaming.

Kühn et al. (2018a) states that the sample size in the study is enough to detect the average effect sizes, r=.18 reported Anderson, et al. (2010).

In fMRI study, Kuhn et al. (2018b) where people were randomly assigned to play Grand Theft Auto V (n=26), Sims 3 (n=24) or non play group (n=30). They did not find “any evidence for desensitization in the empathy network for pain in the violent video game group at any time point”.

EDIT 2018/03/20. There is a reply to Hilgard, Engelhardt and Rouder (2017) by Kepes, Bushman and Anderson (2017) and provide another set of meta analyses and claim “As stated in our title, although the magnitude of the mean effects were reduced by publication bias and outliers, ‘violent video game effects remain a societal concern.'” However, real life impact of the violent games is another question (cf. Browne and Hamilton-Giachritsis, 2008; Markey, et al., 2014).


  • Andreson, et al. 2010. Violent Video Game Effects on Aggression, Empathy, and Prosocial Behavior in Eastern and Western Countries: A Meta-Analytic Review. Psychological Bulletin, 136(2). DOI=0.1037/a0018251.
  • Browne and Hamilton-Giachritsis, 2008. The influence of violent media on children and adolescents: a public-health approach. Lancet, 365(9460). DOI=10.1016/S0140-6736(05)17952-5.
  • Ferguson and Kilburn, 2010. Much ado about nothing: The misestimation and overinterpretation of violent video game effects in Eastern and Western nations: Comment on Anderson et al. (2010). Psychological Bulletin, 136(2). DOI=10.1037/a0018566.
  • Ferguson, 2007. Evidence for publication bias in video game violence effects literature: A meta-analytic review,Aggression and Violent Behavior,  12(4). DOI=10.1016/j.avb.2007.01.001.
  • Hilgard, Engelhardt and Rouder, 2017. Overstated evidence for short-term effects of violent games on affect and behavior: A reanalysis of Anderson et al. (2010). Psychological Bulletin, 143(7). DOI=10.1037/bul0000074.
  • Kepes, S., Bushman, B.J. and Anderson, C.A., 2017. Violent video game effects remain a societal concern: Reply to Hilgard, Engelhardt, and Rouder (2017). Psychological Bulletin,
  • Kühn, Kugler, Schmalen, Weichenberger, Witt, and Gallinat, 2018a. Does playing violent video games cause aggression? A longitudinal intervention study. Molecular Psychiatry. DOI=10.1038/s41380-018-0031-7.
  • Kühn, Kugler, Schmalen, Weichenberger, Witt, Gallinat, 2018b. The Myth of Blunted Gamers: No Evidence for Desensitization in Empathy for Pain after a Violent Video Game Intervention in a Longitudinal fMRI Study on Non-Gamers. Neurosignals, 26. DOI=10.1159/000487217.
  • Markey,, Markey, French, 2014. Violent Video Games and Real-World Violence:  Rhetoric Versus Data. Psychology of Popular Media Culture, 4(4) DOI=10.1037/ppm0000030.





A brief history on how a new thing are bad for you

In 1795, author J. G. Heinzmann insisted that such devotion [to novels] caused “weakening of the eyes, heat rashes, gout, arthritis, hemorrhoids, asthma, apoplexy, pulmonary disease, indigestion, blocking of the bowels, nervous disorder, migraines, epilepsy, hypochondria and melancholy.”Anslow (2016)

Anslow covers stuff that what is claimed to be bad for you from novels to comics and from telephone to VR.

Anslow, L., 2016. What technology are we addicted to this time? Timeline.com. Available at: https://timeline.com/what-technology-are-we-addicted-to-this-time-f0f7860f2fab.

Embodiment in character-based video games

Petri Lankoski

This is author’s version of the paper. The authoritative version is available via ACM.DOI: http://dx.doi.org/10.1145/2994310.2994320.

The paper is presented at AcademicMindtrek’16, October 17-18, 2016, Tampere, Finland (c) 2016 ACM. ISBN978-1-4503-4367-1/16/10… and published in the conference proceedings.


Embodiment is used to denote the sense that something is a part of one’s body. The sense of own body is argued to relate to the sense of agency of one’s own actions and of the ownership of the body. In this sense of own body can incorporate something external to the body, such as simple tools or virtual hands. The premise of the study is that the player-characters and game controllers get embodied in a similar to a tool or a virtual hand. In order to study embodiment, a psychometric scale is developed using explorative factor analysis (n=104). The scale is evaluated with two sets of data (n=103 and n=89) using confirmatory factor analysis. The embodiment scale ended to having two dimensions: controller ownership and player-character embodiment. Finally, the embodiment scale is tested and put into action in two studies with hypotheses 1) embodiment and players’ skills correlate and 2) the sense of presence and embodiment correlate. The data (n=37 and n=31) analysed using mixed effects models support both hypotheses.

Continue reading

Confidence intervals & credible intervals

This is a note for me.

Confidence intervals: “Are the observed data x reasonable given the hypothesised values of θ?” == P(θ| x)


Credible intervals: “What values of θ are reasonable given the observed data x?” == P(x| θ)

Those are related as “P(θ| x) = P(θ)P(x| θ)”

Credible intervals are part of Bayesian approach.


About my formal education & stuff

As there seems to be some interest of my eduction, I thought to add a short note about that so that this is out here.

I have Masters degree in New Media (art & design). That degree includes 60-70% computer science, mathematics, and multimedia (that was at that time formal languages, signal processing, virtual reality, etc.). The rest of my Masters are interactive storytelling, management and game design.

My doctorate is in Art and Design in department focusing on new media which means obligatory studies in the philosophy of art and aesthetics, and some HCI. Of course, research literature & methods part of studies were about games.

Beside my Master studies I worked as software designer for almost five years developing network management systems (e.g. data visualisation and management tools) with C++, X/Motif, SQL, and Perl.

Part of my work in academia, I have been developing games for teaching and research (location-aware mobile games, games/interactive narrative for interactive television, …).

Some notes about the freedom of expression, games & critique

(I was first thinking to write a short essay with this title, but this turned to be loosely related thoughts about the topic.)

  • Freedom of expression has newer covered using expression to harm someones reputation and slander a person.
  • Freedom of expression is threatened if people are afraid to express their opinions, even if they don’t need to be afraid of a government prosecution.
  • While companies should have right to choose what publish (and sell), there are cases where this is not so. Monopolies (even de facto monopolies) or utilities are different when their choices can control what others can publish. For example, Comic Book Association was a in practice working as a censor even the US government was not giving them legal power to prevent certain kinds of expressions in comic books. That said, a website does not need to publish what they don’t want. It would be stretching the concept of censorship to call all editorial decisions not to publish (or edit something out) as censorship. However, there are plenty of cases where editorial rights can be used unethically.
  • A mob going after publication or reviewer when the mob disagree with the reviewer’s opinion (especially if someone in the mob threatens the reviewer) can be part of creating an atmosphere of fear that threatens the freedom of expression.
  • It should be natural that developers can create games as they like and critics can criticize the games as they like (as long as they don’t break laws). Also it is ok to disagree with a critique. However, spamming, threats, and name-calling are not productive forms to show the disagreement. Freedom of expression does not include name-calling (in many cases) or threats.
  • A review is an opinion. A good review provides well-argued point of view to a game. The review is not meant to be a product description. This is how reviews of literature, film, music or comics are by tradition. Game criticism is a young (compared to,especially, literature criticism). The language and approaches used are still developing.