Part 1: Getting Started
Last updated
Was this helpful?
Last updated
Was this helpful?
Although it won't do too much, Empirica works straight out of the box. The first step to customizing your Empirica app is to launch a test game so you can see your edits in action.
Follow the guide and
Start your app by running the command meteor
Then, visit your admin panel
Log in using the password generated in the command line by step 2
Click configuration
in the upper right corner to access app settings. This is where you'll define all your experimental conditions.
Click factors
in the menu bar at the top. This is where you set the most
basic parameters for your experiment. The only default parameter is
playerCount. Add a new factor by clicking the +
button. Set the name to
one
and the value to 1
, then click Create Factor Value
.
Click treatments
. This is where you combine factors to create an
experimental condition. Create a new treatment using the factor you just
created and name whatever you want.
Click Lobby Configurations
and create a new lobby configuration using the default settings.
Click monitoring
in the upper right corner to toggle your admin panel from configuration to monitoring. This is where you'll interact with all the
Empirica features that have to do with actually running experiments.
Click New Batch
in the batches panel, select the treatment you just
created, and click Create Batch
.
Press the â–º Start
to start the batch.
Follow through the consent, identification (this would be, e.g., an MTurk/Prolific ID, but you can enter whatever you want right now), instruction pages, and attention check (you have to answer correctly).
You're running an experiment! This is the default app, just a slider with 10
rounds of input. We're going to edit that.
The client/main.html
is the html point of entry for the React code that determines what a participant sees when they are in your experiment. You should NOT change anything in this file except for the text in between the <title></title>
tags. There you can put the title you want to appear at the top of the tab when people are using your experiment (e.g., "My First Experiment").
The styling of an Empirica experiment is set in .client/main.less
. Less is very similar to CSS.
The default styling of the experiment is a bit complicated to understand, and to make our experiment look good we want to tweak a few things. Let's start by replacing the code in main.less
with this code:
As you go about your first experiment, it might help to try and get a global understanding of what an Empirica Experiment is.
The Empirica framework provides powerful tools to create singleplayer and multiplayer games.
You have the frontend in the /client
folder. This is where you determine what the users will see when they come to your experiment: which components you build your game with and what they look like.
The backend in the /server
folder. This is where you determine the structure of your game.
You have an admin panel
in the browser that allows you to create factors and treatments as well as monitor the games you are running. For now, everything is running locally for your to test out, but the admin panel will look similar once deployed to recruit participants online.
Empirica is a framework that builds on top of a Meteor.js and React.js app. Meteor does the backend and generally building of the app whilst React is used for the front end.
You can find some tutorial online for both technologies. However, you do not need any knowledge of these technologies for this tutorial.
Navigate to (or click the â–º Open App
button on the top right) .
For more information about testing the experiment locally, see our .
Our might help.