Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

gregberge/picjam-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PicJam Game

WS API

  • > client to server
  • < server to client

User

< user.update

Emitted when a user is updated.

{
  id: '...',
  username: '...'
}

> me.update

Update our own data.

{
  username: ''
}

Chat

> chat

Send a new chat message.

{
  text: '...'
}

< chat

Emitted when a new message is received.

{
  user: {...},
  text: '...'
}

Game

< game.join

Emitted when you or a user join the game.

{
  game: {
    id: '...',
    users: [{...}, {...}]
  },
  user: {
    id: '...',
    username: '...'
  },
  me: true
}

< game.leave

Emitted when a user leave the game.

{
  game: {
    id: '...',
    users: [{...}, {...}]
  },
  user: {
    id: '...'
  }
}

< game.start

Emitted when the game start.

{
  time: 10
}

< game.end

Emitted when the game end.

{
  ranks: [
    {
      userId: 'xxx',
      score: 'xxx',
      rank: 1
    }
  ]
}

Questions

< question.start

Emitted when a new question is sent.

{
  id: '...',
  time: 30
}

< question.update

Emitted when a question must be updated.

{
  id: '...',
  svg: {}
}

> question.answer

Send an answer to the question.

{
  id: '...',
  questionId: '...',
  text: '...'
}

< question.answer.ack

Emitted to acknowledge the answer to a question.

{
  id: '...',
  valid: true
}

< question.winner

Emitted when a user answer correctly to the question.

{
  question: {...},
  user: {...},
  rank: 1,
  points: 3
}

< question.end

Emitted when the question is finished.

{
  time: 10,
  scores: {
    'userIdxxx': 10
  }
}

About

PicJam game realised during FHacktory 2014.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published