Game Blocks

Sheldon J. Pacotti has created a toolset for teaching game development, especially  for “constructing non-linear stories, which in my mind comprise more than talk trees and branching conversations.”

The toolset is build on Byob (which is based on Scratch).

Pacotti explains Game Blocks on video:

Download and tutorials available at: http://www.newlifeinteractive.com/main/index.php?option=com_content&view=category&id=40:cell&Itemid=60&layout=default.

Testing Public Variables in Unity

Edit 2012/12/08: A bug fix (End() did not show correct error count); change reporting: now EndCase() and End() use Debug.LogError() fuction in reporting if there were errors (otherwise Debug.Log() is used).

It is easy to forget to set a public variable of a script in Inspector and it might take some time to figure out where the problem is. The following C# program goes and checks that all public variables in a scene are set.

TestMonoBehaviorPublicVariables.cs

using System.Collections;
using System;
using System.Reflection;
using System.ComponentModel.Design;

public class TestMonoBehaviorPublicVariables : MonoBehaviour { 
    private int errCount;
    private int errCountInScript;

    void Assert(bool status, string message) {
         if(status) { 
             Debug.LogError(" Test case failed: " + message);
             errCount++;
             errCountInScript++;
         }
    }
    void EndCase(string gameObjectName, string scriptName) {
         if(errCountInScript > 0) {
		Debug.LogError(gameObjectName + " - " + scriptName + ": errors=" + errCountInScript.ToString());	
	}
	else {
		Debug.Log(gameObjectName + " - " + scriptName + ": errors=" + errCountInScript.ToString());
         }
         errCountInScript = 0;
    }

    void End(){
         if(errCount > 0) {
            Debug.LogError("Testing MonoBehavior public variable: errors=" + errCount.ToString());
         }
         else {
            Debug.Log("Testing MonoBehavior public variables: errors=" + errCount.ToString());
        }
    }

    void Start () {
         errCountInScript = 0;
         errCount = 0;
         UnityEngine.Object[] all = Resources.FindObjectsOfTypeAll(typeof(GameObject));
         foreach(GameObject go in all) {
             if(go.tag != "DontLook") { 
                 Component[] allComponents = go.GetComponentsInChildren<Component>();
                 foreach(Component c in allComponents) {
                       try{
                           RunCase(c);
                       }
                       catch(Exception e) {
                           Debug.LogException(e, go);
                       }
                 }
             } 
         }
         End();
    }

    void RunCase(Component c) {
         FieldInfo[] myField = c.GetType().GetFields();
         for(int i=0; i<myField.Length;i++) {
             string msg = String.Format("{0} - {1} ({2}): field {3} is not set", c.name, myField[i].Name, myField[i].DeclaringType, myField[i].Name);
             Assert((myField[i].GetValue(c)).ToString()=="null", msg);
         }
         EndCase(c.name, c.GetType().ToString());
    }
}

Create prefab for this script so that you can easily drop it to a scene and test all the objects. The problems are reported as errors in Console (error counts for each object and scrip are also reported as well as total number of found errors).

Drop the prefab to a scene, hit “Play” (and stop immediately), and inspect the Console.

A Piece of Gaming History Reported

Dale Dobson writes on Gamasutra about history of TSR-80 including a look at the notable games in the platform for example

  • Zork, a text-adventure classic (1980)
  • Temple of Ashai (1979)
  • Misadventure #2, an adult text-adventure (1982)
  • Asylum, a first-person adventure game with 3D graphics (1981).

Recommended read to those who are interested in the history of games.

Reference:

Dobson, D., 2012. Games from the Trash: The History of TSR-80. Gamasutra, URL= http://www.gamasutra.com/view/feature/182224/games_from_the_trash_the_history_.php.

Introduction to Unity

 

The introduction tutorial uses accompanied Unity packages:

Update 2013/01/07. file hosting changes and URLs changes to point to the new location.

Update 2012/10/27: The slides and packages now include GameManager and MainScreenGUI prefabs. GameAgents script handles Player adding player object to the scenes so that testing is easier. Tutorial slides reflect these changes.

Unity Examples

EDIT 20130525: updated links to Escape package.

I have created a small Unity package for teaching unity basics. You can download it at

To use this create new unity project (File->New Project…). Select  Toon Shading (and Image Effects if you have Pro) package(s) before creating the project.

Unzip the escape package and add it to the project (Assets->Import Package->Custom Package…).

I will add a tutorial using the prefabs and materials in the package later. Meanwhile, some introduction to the code is available in previous post (these mainly explain the principles, the current package does not match exactly to the codes):

Update1: the package is made with Unity 3.5.6.

Update2: added package that works with free version of Unity.

Video games, youth violence and crime

This study “A longitudinal study of the association between violent video game play and aggression among adolescents.” by Willoughby, Adachi, & Good, (Dev Psychol. 2012 Jul;48(4):1044-57) was today hot topic at Facebook. I am skeptical about simplistic claims (causally) linking violent video games to aggression and violent behavior and did quick search on other related statics. I found today a page http://videogames.procon.org/view.resource.php?resourceID=003627.

The data in that site seems to indicate that there are no link between game sales (I assume that violent video game sales follows same trend that video game sales) and violen crimes, youth violence, and bullying (see figures 13–17).

But what is worrying in these figures are in comparing problem behavior between the players of M-rated games to those who do not play M-rated games. The M-rated game players have statistically higher rates of problem behavior in various areas such as being in fight and stealing (see table 21). However, the amount of students reported to being in fight has not changed much (see figure 20).

I am not sure what make out of this. But here are couple toughs:

  • Kids who play M-rated games are prone to take more risks than those who do not play.
  • Violent games are played more by those that are prone to aggressive behavior.

A rule typology

I have intended to write about rule and algorithms more than a blog post. I think that it is important to understand the qualities of games in more detailed level than just games have rules.

However, I might not need to do this, because Markus Montola provides a nice typology of rules in his dissertation:

  1. Internal rules: the rules or limits that one set for oneself
  2. Social rules: for example, it is impolite to play too slow and keep other waiting)
  3. Formal rules: as in board game rule book
  4. External rules: for example, laws
  5. Materially embodied rules: game systems (including algorithms) in video and physical objects and bodies in a game
  6. Brute circumstances: environment and biology (Montola, 2012, pp. 42-43).

Rule types 2 and 3 relate to agreements and come with possibility of cheating. Rule type 4 is institutionalized form of rules and comes with possibility of breaking the law.  Rule type 5 and 6 are different and they exist and regulate play despite the players will of changing them (of course there are some possibilities to influence these such as doping or modding a game).

Montola, M, On the edge of the magic circle, Tampere: Tampere University Press.  Available at http://urn.fi/urn:isbn:978-951-44-8864-1.

Two New Dissertations on Role-play

J Tuomas Harviainen, Systemic Perspectives on Information in Physically Performed Role-play (to be defended October), http://urn.fi/urn:isbn:978-951-44-8914-3.

Abstract

This dissertation examines information phenomena that take place in, and related to, physically performed pretence play. The emphasis is on one hand on the play experience and the elements constituting it, but underneath that all exist information processes which essentially define the perimeters of what can be done during play and how.
Being primarily a metatheoretical work, the dissertation draws on the empirics of earlier researchers and practitioners, further supported with the author’s own experiments and field observations. References are analyzed with the use of systematic analysis, a hermeneutical method for finding their key essences, which are then compared with other works. Through this process, new data emerges from the combinations of the old, as seemingly disparate concepts are shown to actually discuss the same things.
[…]

Markus Montola, On the Edge of the Magic Circle: Understanding Pervasive Games and Role-Playing (to be defended September), http://urn.fi/urn:isbn:978-951-44-8864-1.

Abstract

On the Edge of the Magic Circle studies two threads of contemporary western gaming culture: Role-playing and pervasive games. Recreational role-playing includes forms such as tabletop role-playing games, larps and online role-playing games, while pervasive games range from treasure hunts to alternate reality games. A discussion on pervasive role-playing connects these strands together.

The work has four larger research goals. First, to establish a conceptual framework for understanding role-playing in games. Second, to establish a conceptual framework for understanding pervasive games. Third, to explore the expressive potential of pervasive games through prototypes. And fourth, to establish a theoretical foundation for the study of ephemeral games.

The central outcome of the work is a theory complex that explains and defines role-playing and pervasive gaming, and allows them to be understood in the context of the recent discussion in game studies.

In order to understand these two borderline cases of games, the work establishes a theoretical foundation that highlights gameplay as a social process. This foundation combines the weak social constructionism of John R. Searle with the recent game studies scholarship from authors such as Jesper Juul, Jane McGonigal, Katie Salen and Eric Zimmerman.

Computer Games and Emotions

Petri Lankoski

Authoritative version is published in Sageng, Fossheim & Larsen (eds.), The Philosophy of Computer Games, Springer, pp. 39–55,  DOI=10.1007/978-94-007-4249-9_4.

Introduction

An intriguing question in the philosophy of fiction is on how can we be moved by the fates of the fictional characters or how we fear a fictional monster? This question, in the context of literature and film, has been addressed, for example, by Lamarque (2004/1981), Carroll (1990, pp. 61–96), and Walton (1990, pp. 240–289). This same question is relevant in the context of computer games: how can players be afraid in the game events when obviously, for example, a monster in a horror game cannot threaten the players?

Continue reading “Computer Games and Emotions”