Badges in Social Media: A Social Psychological Perspective

Posted in Sociology, Software Development on March 21st, 2011 by Russ Tarleton

XBox360 Achievements and PS3 Trophies

 

A short paper was just published by Yahoo Research about the use of Achievements and Badges in games and social websites. Here is a direct link to the PDF. It is a quick read at 4 pages and I found a few parts to be of interest:

Regarding Goal Setting: “The fun and interest of goal seeking is often the primary reward itself. The notion of conceptual consumption is essential to understanding badges because, of course, ultimately the user is left with no physical goods, only the experience and memory which is embodied by a badge.”

Regarding Status: “The interplay between status and affirmation is important because it highlights how badges can be engaging from both an individual and a group point of view. Some users are likely to attend more to the individual benefits of badges while others are more likely to attend to the social ones.”

Regarding Usage: “Evidence suggests that badges are not universally appreciated, understood, or attended to.”

I stumbled across Maslow’s hierarchy of needs a while ago, seen below, and I’ve found it to be relevant to game development. I think it is interesting to look at game elements and identify which of our needs might be fulfilled by them.

Maslow's hierarchy of Needs

As I see it, achievements potentially satisfy a need for:

  1. Safety – Morality:  Moral reassurance, if the achievement reflects a value we embrace.
  2. Belonging – Friendship: If an achievement is an indicator of level of investment, it could help us feel more associated with others of like investment level.
  3. Esteem – Self-Esteem: Assuming the achievement portrays the user in a positive light then it could serve as a reminder of something worked hard at and succeeded in.
  4. Esteem – Achievements: Although virtual, it is still a representation and reminder of an accomplishment.
  5. Esteem – Respect by Others: Assuming the achievement is publicly viewable, it could shape other’s opinions and level of respect, especially if it represents a shared value (see 1).
  6. Self-Actualization – Problem Solving: A reminder that the user was once capable of solving a particular challenge and, more importantly, has the potential to do it again.

The War of the Worlds for iPad

Posted in New Technology, Software Development on March 1st, 2011 by Russ Tarleton

I am happy to announce that a project I worked on is live on the app store: The War of the Worlds for iPad.

My role was to develop a re-usable text parsing, justification, and rendering engine that was then adapted for the project. Give it a look; I’m really pleased with how it turned out.

CityVille Maximum Decoration Payout Bonus Tables for 3×3 and 4×4 Plots – Free and Paid Versions

Posted in Software Development on January 10th, 2011 by Russ Tarleton

CityVille, Zynga’s latest casual social networking game on Facebook gained 80 million registered users in its first month; with over 10 million more users than FarmVille, that now makes CityVille the most popular game in the world… See: Top 25 Facebook Games – January 2011. I’m a fan of most 4x games (explore, expand, exploit, exterminate) and I haven’t played anything sim’ish since Ikariam so when I saw an ad for CityVille a few weeks ago I decided to check it out.

One of the interesting parts of CityVille is that most decorations you put in your city also increase the amount of money you harvest from surrounding businesses and homes within a 3 grid radius of the edge of the decoration. Businesses and Homes come in two sizes: 3×3 and 4×4 grid sizes. Decorations come in all sorts of sizes and payoff amounts.

This pretty much begs the question, what is the maximum bonus you could possibly apply to a single 3×3 or 4×4 business or home from all of the given decorations? Furthermore, since there are items you can pay for with real-life money that also give bonuses, what would the maximum bonus be without using these “paid” decorations and only “free” decorations. The only constraint is that each business or home you wish to collect from must be connected by at least a single 3×3 road piece. However, to optimize the maximum amount of nearby decorations, that road piece may be placed further away if you connect it to smaller 1×1 sized sidewalk pieces that ultimately reach the business. Finally, for any road or sidewalk to be considered connected, one of its sides, not corners, must be touching the other. Fun logic puzzle!

 

FREE SETUPS

Max Bonus from Free Decorations Applied to a 3×3 Plot is +252%

Max Bonus from Free Decorations Applied to a 4×4 Plot is +291%

 

PAID SETUPS

Max Bonus from Paid Decorations Applied to a 3×3 Plot is +658%

Max Bonus from Paid Decorations Applied to a 4×4 Plot is +814%

 

PDF download of the above images.

OpenOffice Spreadsheet Source – Please let me know if you would like to re-post or re-distribute. Thanks!

 

Enjoy and Happy Gaming!

Detecting shakes on a Flash 10.1 enabled Android Device using ActionScript

Posted in Software Development on May 26th, 2010 by Russ Tarleton

How to detect a Shake

Pre-requisite: Install AIR SDK into CS5 (Must be a part of the Public Beta)

  1. Login to prerelease.adobe.com
  2. Browse to Home > AIR for Android Developer Prerelease > Documentation > Documentation [05/20/10]
  3. Click on “AIR Android ReleaseNotes 0520.html”
  4. Click on “How to Update Flash CS5 to Use the AIR SDK
  5. Follow the 7-step instructions to install the Flash extension file


Reference API

Accelerometer: http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/sensors/Accelerometer.html
AccelerometerEvent: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/AccelerometerEvent.html


Code

// Import the correct classes – if Flash returns an error for either of these, then you have not correctly installed the AIR API yet.
import flash.events.AccelerometerEvent;
import flash.sensors.Accelerometer;

// Add this constant to your class – it determines how often the shake should do something (currently every half a second)
private static const _SHAKE_WAIT = 500;

// Add these two private variables to your class
private var _accl                 : Accelerometer;
private var _lastShake             : Number = 0;

// Put this where you initialize your class – it detects if accelerometer is supported on the device and adds the listener
if (Accelerometer.isSupported)
{
_accl = new Accelerometer();
_accl.addEventListener(AccelerometerEvent.UPDATE, onAccelerometer);
}

// Put this where you destroy your class – it detects if accelerometer is supported on the device and removes the listener
if (Accelerometer.isSupported)
{
_accl.removeEventListener(AccelerometerEvent.UPDATE, onAccelerometer);
}

// Add this method to your class – it is the callback for the accelerometer
private function onAccelerometer(e:AccelerometerEvent) : void
{
if (getTimer() – _lastShake > _SHAKE_WAIT && (e.accelerationX >= 2 || e.accelerationY >= 2 || e.accelerationZ >= 2))
{
doShake(); // Replace “doShake();” with a call to the method you wish to execute when the shake occurs.
_lastShake = getTimer(); // Reset the timer so that this code block doesn’t happen again until _SHAKE_WAIT milliseconds later.
}
}

Changing default “__MyCompanyName__” in XCode

Posted in Software Development on April 6th, 2010 by Russ Tarleton

If you want to change the default “__MyCompanyName__” that appears within new header file comments in XCode, do the following:

Project -> Edit Project Settings -> General Tab -> Enter Name in “Organization Name” Box

Closing the dialog box will save the information automatically. Also, this is now project based instead of globally which is great when working on iPhone projects for different companies.

CS4 – Enabling warnings for missing type delarations

Posted in Software Development on February 8th, 2009 by Russ Tarleton

Turns out it’s the same procedure as doing it for CS3:

  1. With notepad, edit C:\Program Files\Adobe\Adobe Flash CS4\en\Configuration\ActionScript 3.0\EnabledWarnings.xml
  2. Search for the line:     <warning id=”1008″ enabled=”false” label=”kWarning_NoTypeDecl”>Missing type declaration.</warning>
  3. Change “false” to “true”. 
  4. Save the file and restart Flash

AS3 Email Validator using regexp

Posted in Software Development on October 17th, 2008 by Russ Tarleton

Quick and dirty way to validate email addresses:
http://www.stimuli.com.br/trane/2007/sep/13/email-validation-actionscript-3/

Here’s my short version:

public function isValidEmail(pEmail : String) : Boolean
{

var emailRegexp : RegExp = /^[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}$/i;
return Boolean(pEmail.match(emailRegexp));

 

}

Getting the AS3 ScrollPane Component to automatically scroll to the bottom

Posted in Software Development on October 1st, 2008 by Russ Tarleton

Here’s my updated AS3 method that forces the ScrollPane to scroll all the way to the bottom in order to show the newest entry. It’s important to remember that there is a delay in AS3 after doing an addChild() call so this method should only be called after you can ensure your new dynamic content has been added to the ScrollPane source via an addedToStage listener or checking loop.

import fl.containers.ScrollPane;
public function updateScroller() : void
{

/*
Pre-Conditions:
1. scrollContainer is an instance of ScrollPane on the stage
2. commentContainer is a movieClip containing dynamic content on the stage
3. All Elements to be added have finished being added to commentContainer
*/

scrollContainer.source = commentContainer;
scrollContainer.update();
scrollContainer.verticalScrollPosition = scrollContainer.maxVerticalScrollPosition;

}

AS3 Date Class – correctly parsing to UTC milliseconds

Posted in Software Development on September 29th, 2008 by Russ Tarleton

The other day I was trying to parse a date value via Date.parse(date:String) but I kept getting an odd negative number as a result. I didn’t realize what was going on until I checked what the return type of Date.parse was and saw that it was “Number” instead of “int”. Oops. After changing all my millisecond variables from int to Number, everything worked fine. Apparently int doesn’t allocate enough memory – I should have known this.

Lesson learned: Use variables of type Number when trying to get the UTC milliseconds from Date.parse()

var myDate : Date = new Date();
var myInt : int = Date.parse(myDate);
trace(myInt); // Incorrect: -1333562360
var myNum : Number = Date.parse(myDate);
trace(myNum); // Correct: 1222732117000

Getting rid of jagged fonts in the Flash CS3 ComboBox Component

Posted in Software Development on September 26th, 2008 by Russ Tarleton

I was working with the CS3 ComboBox component yesterday and my fonts inside the component kept looking more jagged than the designer’s comp. After some testing, I found there were a few things I needed to do in order to fix the problem:

  1. Toggle embedFonts to true only after items are added to the combobox.
  2. There are two separate parts of the component where you embed fonts: the main textField and dropdown text fields.
  3. If applying a larger font size to the text format, the dropdown list also needs to have its “rowHeight” increased in order to see the resulting larger font – in my case I was testing at 25pt for a more dramatic test and wasn’t seeing the font at all due to it shifting down.

Here’s the resulting code (stripped out package/class info):

// Remember to Import TextField and ComboBox
import flash.text.TextField;
import fl.controls.ComboBox;

// Setup the Text Format to use Arial, 12pt, Bold, Black
var myTextFormat : TextFormat = new TextFormat();
myTextFormat.font = “Arial“;
myTextFormat.size = 12;
myTextFormat.bold = true;
myTextFormat.color = 0x000000;

// Embed the font in the ComboBox dislpay and dropdown
// Pre-condition: myCB is a ComboBox component on the stage
// and all items have already been added to it

myCB.textField.setStyle(“embedFonts“, true);
myCB.textField.setStyle(“textFormat“, myTextFormat);
myCB.dropdown.setRendererStyle(“embedFonts“, true);
myCB.dropdown.setRendererStyle(“textFormat“, myTextFormat);
myCB.dropdown.rowHeight = 25;