Cyberball 5

Technical Manual

Script Author: David Nitz, Millisecond

For questions about this script, please contact support@millisecond.com.

Created: January 02, 2021

Last Modified: January 26, 2025 by K. Borchert (katjab@millisecond.com), Millisecond

Script Copyright © Millisecond Software, LLC

Background

This script implements Kip Williams's Cyberball game (version 5) used in research on ostracism, social exclusion, rejection, bullying, or discrimination.

Announcement page for Cyberball 5. https://www3.psych.purdue.edu/~willia55/Announce/cyberball.htm

NOTE: Due to technical limitations, chat/message functionality is NOT available in this implementation.

References

Cyberball 5 Manual, App version 5.4.0.2, Manual version 1.3, last updated 1/9/2019. Retrieved from https://www.empirisoft.com/cyberball/Manuals/Manual_for_Cyberball_5_v5402.pdf.

Cyberball App version 5.4.0.2 source code retrieved from https://www.empirisoft.com/cyberball.aspx.

Williams, K. D., Cheung, C. K. T., & Choi, W. (2000). CyberOstracism: Effects of being ignored over the Internet. Journal of Personality and Social Psychology, 79, 748-762.

Williams, K. D., & Jarvis, B. (2006). Cyberball: A program for use in research on ostracism and interpersonal acceptance. Behavior Research Methods, Instruments, and Computers, 38, 174-180.

Hartgerink, C. H. J., van Beest, I., Wicherts, J. M., & Williams, K. D. (2015). The ordinal effects of ostracism: A meta-analysis of 120 Cyberball studies. PloSONE, 10. e0127002. doi: 10.1371/journal.pone.0127002

Duration

3 minutes

Description

Cyberball is a virtual ball-tossing game that can be used in research on ostracism, social exclusion, or rejection. It has also been used to study discrimination and prejudice (in these instances, Cyberball ball toss choices are used as Dependent Variable).

Procedure

(1) Task:
- Participants engage in a ball-toss game with between 2 to 8 other (virtual) players.
- The virtual players' behavior can be configured in numerous ways, e.g. to exclude the participant or any of the
virtual players, to include all players, and anything in between.

(2) End of Task:
- The task ends when the configured number of ball tosses has been reached.

(3) Instructions
- Instructions can be easily changed under EDITABLE INSTRUCTIONS.
- Some stimuli can be easily changed under EDITABLE STIMULI.

(4) Dependent Variables/Scores:
Data files record who threw the ball to whom, including the choices made by the human participant and
computer-controlled players (NPCs), how long each throw was delayed, as well as general game settings and the
type of schedule administered.

Typically, Cyberball is used as an independent variable, i.e. experimental manipulation to induce varying
degrees of social inclusion or exclusion (ostracism). As such, it does not have traditional scores or dependent
variables to report.

When used as a dependent variable in studies of empathy, altruistic behavior, prejudice or discrimination, the
variable of interest is the human player's throwing behavior (cf. Williams & Jarvis, 2006, p. 177).

Instructions

Instructions are as provided in the original Cyberball 5 application.
Instructions can be easily changed in script cyberball5_instructions_inc.iqjs

Summary Data

File Name: cyberball5_summary*.iqdat

Data Fields

NameDescription
inquisit.version, inquisit.version The specific Inquisit version used (the 'build') to collect the data.
computer.platform Device platform: win | mac |ios | android
startDate Date the session was run
startTime Time the session was run
subjectId Participant ID
groupId Group number
sessionId Session number
elapsedTime Session duration in ms
completed 0 = Test was not completed
1 = Test was completed
Parameter Values
showAvatars Whether avatar images should be shown. Default is false.
Avatar images can be customized under item.playeravatars.
showStats Whether basic on-screen throw statistics should be shown
(throws taken & made by the human player, total throws).
Default is false.
nPlayers Number of players in the given game. Default is 3.
The script supports 3- to 9-player games.
nThrows Number of throws to be made during the game.
spectate Whether the human player should only "watch" the game being played.
When set to true, the computer takes over controlling player 2,
making random throws to the other players. A "spectate" condition is often
used as a control condition. Default is false.
scheduleType Whether the script should administer an "ostracize", "include", or "custom"
schedule.
ostracismTarget Applies when running an "ostracize" schedule. Number of the player being
excluded by the other players. Default is 2 (human player).
ostracismMode Applies when running an "ostracize" schedule. Determines the degree to which
the target is ostracized.
0 = target receives 0 throws from the NPCs.
1 = target receives 1 throw from the NPCs, early in the schedule.
2 = target receives 2 throws frm the NPCs, early in the schedule.
You may set higher Make sure to increase nThrows commensurate
with the chosen setting. E.g. for a schedule comprising only 10 throws, it may
not be possible to actually achieve two throws to the target early on. Achieving
5 throws to the target would be downright impossible and would also make the
schedule something that is not actually an ostracism schedule.
customScheduleNumber Index number of the custom schedule; applies when scheduletype is set to "custom".
Default is 1. For information on how to assign different custom schedules to different
between-subjects conditions, see section SCHEDULING LISTS and the example expt elements
#4 and #5 in this script.
throwMode "speed" or "duration"
"speed" => ball travels at constant speed
A throw will take longer between two players that are farther apart than between two
players that are closer together, since the ball will have to travel a longer (relative)
distance.
"duration" => ball travels with constant duration
Throws between players that are farther apart take the same amount of time as throws between
two players that are closer togehter, i.e. the ball will travel at higher relative speed
between the two more distant players.
Default is "duration".
throwSpeed Relative speed of the ball when throwMode is set to "speed".
Expressed as fraction of horizontal display area traversed per second.
0.25 => quarter of horizontal screen aread traversed in one second.
0.5 => half the horizontal screen area traversed in one second.
1 => entire horizontal screen area traversed in one second.
Default is 0.45.
throwDuration Constant duration of a throw when throwMode is set to "duration".
Given in milliseconds. Default is 900.
Data
player2Received Count of times player 2 (human) received the ball.
player2thrown Count of times player 2 (human) threw the ball.
throwCount Count of realized throws.
deprecated Count of throw deprecations during the administration of the schedule.
generatedThrowSchedule A text string recording the generated throw schedule, or -- in the case of custom schedules --
the experimenter-entered custom schedule (plus potential padding).
For details, see section SCHEDULING LISTS.
realizedThrowSchedule The realized throw schedule, including the choices maded by the human player, across
the progression of the game.
player1label to
player9Label Labels assinged to players 1 to 9. Default is "Player 1" to "Player 9".
widthMM Width of the used screen area in mm.
heightMM Height of the used screen area in mm.

Raw Data

File Name: cyberball5_raw*.iqdat

Data Fields

NameDescription
inquisit.version, inquisit.version The specific Inquisit version used (the 'build') used to collect the data.
computer.platform Device platform: win | mac |ios | android
date, time, Date and time script was run
subject, group, session With the current subject id/group number/session number.
Parameter Settings
showAvatars Whether avatar images should be shown. Default is false.
Avatar images can be customized under item.playeravatars.
showStats Whether basic on-screen throw statistics should be shown
(throws taken and made by the human player, total throws).
Default is false.
nPlayers Number of players in the given game. Default is 3.
The script supports 3- to 9-player games.
nThrows Number of throws to be made during the game.
spectate Whether the human player should only "watch" the game being played.
When set to true, the computer takes over controlling player 2,
making random throws to the other players. A "spectate" condition is often
used as a control condition. Default is false.
scheduleType Whether the script should administer an "ostracize", "include", or "custom"
schedule.
ostracismTarget Applies when running an "ostracize" schedule. Number of the player being
excluded by the other players. Default is 2 (human player).
ostracismMode Applies when running an "ostracize" schedule. Determines the degree to which
the target is ostracized.
0 = target receives 0 throws from the NPCs.
1 = target receives 1 throw from the NPCs, early in the schedule.
2 = target receives 2 throws frm the NPCs, early in the schedule.
You may set higher Make sure to increase nThrows commensurate
with the chosen setting. E.g. for a schedule comprising only 10 throws, it may
not be possible to actually achieve two throws to the target early on. Achieving
5 throws to the target would be downright impossible and would also make the
schedule something that is not actually an ostracism schedule.
customScheduleNumber Index number of the custom schedule; applies when scheduletype is set to "custom".
Default is 1. For information on how to assign different custom schedules to different
between-subjects conditions, see section SCHEDULING LISTS and the example expt elements
#4 and #5 in this script.
throwMode "speed" or "duration"
"speed" => ball travels at constant speed
A throw will take longer between two players that are farther apart than between two
players that are closer together, since the ball will have to travel a longer (relative)
distance.
"duration" => ball travels with constant duration
Throws between players that are farther apart take the same amount of time as throws between
two players that are closer togehter, i.e. the ball will travel at higher relative speed
between the two more distant players.
Defaults is "duration".
throwSpeed Relative speed of the ball when throwMode is set to "speed".
Expressed as fraction of horizontal display area traversed per second.
0.25 => quarter of horizontal screen aread traversed in one second.
0.5 => half the horizontal screen area traversed in one second.
1 => entire horizontal screen area traversed in one second.
Default is 0.45.
throwDuration Constant duration of a throw when throwMode is set to "duration".
Given in milliseconds. Default is 900.
blockNum, blockCode The number and name of the current block (built-in Inquisit variable).
trialNum, trialCode The number and name of the currently recorded trial (built-in Inquisit variable).
trialNum is a built-in Inquisit variable; it counts all trials run; even those
that do not record data to the data file such as feedback trials. Thus, trialNum
may not reflect the number of main trials run per block.
response The participant's response (player selection).
latency The response latency in milliseconds.
receivedFrom Whom the current ballholder received the ball from.
ballAt The current ballholder.
throwTo Whom the current ballholder chose to throw the ball to.
throwDistanceMM Distance covered by the current throw in mm.
throwDurationS Duration of the current throw in seconds.
throwSpeedMmS Realized throw speed in mm/s.
delay Delay after which the throw was executed.
player2Received Running count of times player 2 (human) received the ball.
player2thrown Running count of times player 2 (human) threw the ball.
throwCount Running count of realized throws.
deprecated Running count of deprecated throws.
generatedThrowSchedule A text string recording the generated throw schedule, or -- in the case of custom
schedules -- the experimenter-entered custom schedule.
For details, see section SCHEDULING LISTS.
realizedThrowSchedule The realized throw schedule, including the choices maded by the human player, across
the progression of the game.
widthMM Width of the used screen area in mm.
heightMM Height of the used screen area in mm.

Parameters

The procedure can be adjusted by setting the following parameters.

NameDescriptionDefault
nPlayers Number of players in the given game. Default is 3.
The script supports 3- to 9-player games.
nThrows Number of throws to be made during the game. Default is 30.
spectate True or false. Whether the human player should only "watch" the game being played.
When set to true, the computer takes over controlling player 2,
making random throws to the other players. A "spectate" condition is often
used as a control condition. Default is false.
scheduleType Whether the script should administer an "ostracize", "include", or "custom"
schedule.
ostracismTarget Applies when running an "ostracize" schedule. Number of the player being
excluded by the other players. Default is 2 (human player).
ostracismMode Applies when running an "ostracize" schedule. Determines the degree to which
the target is ostracized.
0 = target receives 0 throws from the NPCs.
1 = target receives max. 1 throw from the NPCs, early in the schedule (1st 25% of throws).
2 = target receives max. 2 throws from the NPCs, early in the schedule (1st 25% of throws).
You may set higher values. Make sure to increase parameters.nThrows commensurate
with the chosen setting. E.g. for a schedule consisting of only 10 or 15 throws, it may
not be possible to actually achieve two throws to the target early on. Achieving
5 throws to the target would be downright impossible, apart from transforming the
schedule into something that is not actually an ostracism schedule.
customScheduleNumber Applies when running a "custom" schedule. The script can support multiple, different
custom schedules used in different between-subjects condition. When multiple custom
schedules are present, this parameter must be set to the appropriate schedule number
onexptbegin in the given between-subjects condition. See section SCHEDULING LISTS and
the example expt elements #4 and #5 in this script.
throwMode "speed" or "duration"
"speed" => ball travels at constant speed
A throw will take longer between two players that are farther apart than between two
players that are closer together, since the ball will have to travel a longer (relative)
distance.
"duration" => ball travels with constant duration
Throws between players that are farther apart take the same amount of time as throws between
two players that are closer togehter, i.e. the ball will travel at higher relative speed
between the two more distant players.
throwSpeed Relative speed of the ball when parameters.throwMode is set to "speed".
Expressed as fraction of horizontal display area traversed per second.
0.25 => quarter of horizontal screen aread traversed in one second.
0.5 => half the horizontal screen area traversed in one second.
1 => entire horizontal screen area traversed in one second.
Default: 0.4
throwDuration Constant duration of a throw when parameters.throwMode is set to "duration".
Given in milliseconds. Default: 900
showAvatars True or false. Whether avatar images should be shown. Default is false.
Avatar images can be customized under item.playeravatars.
showStats True or false. Whether basic on-screen throw statistics should be shown
(throws taken & made by the human player, total throws).
Default is false.
player1Label-player9Label Labels for players 1 to 9.
player1LabelColor-player9LabelColor Colors of the labels for players 1 to 9.