Dallinger / Griduniverse

Welcome to the Griduniverse.
7 stars 3 forks source link

"Currently Carrying" displays same item for all players #282

Closed emieczkowski closed 6 months ago

emieczkowski commented 7 months ago

Problem When deploying a multiplayer version of the experiment (recruiter = hotair for debugging purposes), I found that "Currently carrying" displays whichever item player with ID 1 is carrying, and not the item that the player specific to that instance is carrying. For example, if Player 1 picks up a carrot, then every player sees "carrot" as the item they are currently carrying. When a different player tries to pick up an item, they see that correct item name briefly flashed on the screen, but the correct item quickly disappears and is once again replaced by the item that Player 1 is carrying.

Configs (1) config.txt

[Experiment Configuration]
mode = debug
auto_recruit = true
network = FullyConnected
max_participants = 2
num_rounds = 1
time_per_round = 300
block_size = 20
columns = 50
rows = 50
window_rows = 30
window_columns = 30
use_identicons = true
show_chatroom = true
recruiter = hotair
difi_question = true 
pseudonyms = false 

[HIT Configuration]
title = Griduniverse
description = Play a game
keywords = Psychology, game, play
base_payment = 1.00
lifetime = 24
duration = 0.1
us_only = true
approve_requirement = 95
contact_email_on_error = griduniverse@mailinator.com
ad_group = Griduniverse
organization_name = Monsters University
browser_exclude_rule = MSIE, mobile, tablet

[Database Parameters]
database_url = postgresql://postgres@localhost/dallinger
database_size = standard-0

[Server Parameters]
dyno_type = standard-2x
num_dynos_web = 1
num_dynos_worker = 1
host = 0.0.0.0
clock_on = false
logfile = -

(2) game_config.yml

---
player_config:
  probability_distribution: "center_bias" 

  # Griduniverse uses different colors to represent player groups or teams
  available_colors:
    BLUE: [0.50, 0.86, 1.00]
    YELLOW: [1.00, 0.86, 0.50]
    ORANGE: [0.91, 0.50, 0.02]
    RED: [0.64, 0.11, 0.31]
    PURPLE: [0.85, 0.60, 0.85]
    TEAL: [0.77, 0.96, 0.90]

item_defaults:
  item_id: default
  item_count: 8
  calories: 0
  crossable: true # Can a player co-occupy the grid block this item is sitting on?
  interactive: true # Explicitly interact via button, or automatically consume? 
  maturation_speed: 0.0
  maturation_threshold: 0.0
  n_uses: 1
  name: Item
  plantable: false
  planting_cost: 1
  portable: true # Can a player pick up and carry this item? 
  probability_distribution: "random"
  public_good_multiplier: 0.0
  respawn: false
  limit_quantity: false
  seasonal_growth_rate: 1.0
  spawn_rate: 1.0 # 1.0 = item count will not grow over time
  sprite: "color:#8a9b0f,#7a6b54"

transition_defaults:
  visible: seen
  actor_end: null
  actor_start: null
  target_end: null
  target_start: null
  last_use: false
  modify_uses: [0, 0]

items:
  - crossable: true
    interactive: true
    name: Stone
    item_id: stone
    portable: true
    spawn_rate: 1.0
    item_count: 10
    sprite: "image:https://github.githubassets.com/images/icons/emoji/unicode/1faa8.png?v8"

  - crossable: true
    interactive: true
    name: Diamond
    item_id: diamond
    portable: true
    spawn_rate: 1.0
    item_count: 10
    sprite: "emoji:šŸ’Ž"

  - calories: 1
    crossable: true
    interactive: true
    name: Carrot
    item_id: carrot
    portable: true
    spawn_rate: 1.0
    item_count: 10
    sprite: "emoji:šŸ„•"

  - calories: 2
    crossable: true
    interactive: true
    name: Wood
    item_id: wood
    portable: true
    spawn_rate: 1.0
    item_count: 10
    sprite: "emoji:šŸŖµ"

  - calories: 1
    crossable: true
    interactive: true
    name: Wheat
    item_id: wheat
    portable: true
    spawn_rate: 1.0
    item_count: 10
    sprite: "emoji:šŸŒ¾"

  - calories: 5
    crossable: true
    interactive: true
    name: Pie
    item_id: pie
    portable: true
    spawn_rate: 0.0
    item_count: 0
    sprite: "emoji:šŸ„§"

  - calories: 10
    crossable: true
    interactive: true
    name: Bread
    item_id: bread
    portable: true
    spawn_rate: 0.0
    item_count: 0
    sprite: "emoji:šŸž"

  - calories: 5
    crossable: true
    interactive: true
    name: Wrench
    item_id: wrench
    portable: true
    spawn_rate: 0.0
    item_count: 0
    sprite: "emoji:šŸ”§"

  - calories: 10
    crossable: true
    interactive: true
    name: Crown
    item_id: crown
    portable: true
    spawn_rate: 0.0
    item_count: 0
    sprite: "emoji:šŸ‘‘"

transitions:
  - actor_start: stone
    actor_end: null
    target_start: diamond
    target_end: crown
    visible: always
    last_use: false
    modify_uses:
      - 0
      - 0

  - actor_start: diamond
    actor_end: null
    target_start: stone
    target_end: crown
    visible: always
    last_use: false
    modify_uses:
      - 0
      - 0

  - actor_start: wheat
    actor_end: null
    target_start: carrot
    target_end: pie
    visible: always
    last_use: false
    modify_uses:
      - 0
      - 0

  - actor_start: carrot
    actor_end: null
    target_start: wheat
    target_end: pie
    visible: always
    last_use: false
    modify_uses:
      - 0
      - 0

  - actor_start: wheat
    actor_end: null
    target_start: wood
    target_end: bread
    visible: always
    last_use: false
    modify_uses:
      - 0
      - 0

  - actor_start: wood
    actor_end: null
    target_start: wheat
    target_end: bread
    visible: always
    last_use: false
    modify_uses:
      - 0
      - 0

  - actor_start: stone
    actor_end: null
    target_start: wood
    target_end: wrench
    visible: always
    last_use: false
    modify_uses:
      - 0
      - 0

  - actor_start: wood
    actor_end: null
    target_start: stone
    target_end: wrench
    visible: always
    last_use: false
    modify_uses:
      - 0
      - 0
jessesnyder commented 6 months ago

Fixed; closing