You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
dependabot[bot] 358292840b
Bump axios from 0.20.0 to 0.21.1 in /back
6 months ago
..
src Making HTTP and GRPC ports configurable in API server 6 months ago
tests Fixing unit tests in back 7 months ago
.dockerignore Fixing Dockerfiles 1 year ago
.eslintrc.json Enabling stricter lint: forbidding usage of any 1 year ago
.gitignore Add io socket message to share user position. 1 year ago
Dockerfile Fixing pusher build + building in CI 7 months ago
LICENSE.txt Changing license to AGPL + Commons Clause 1 year ago
README.md Fix typo 1 year ago
jasmine.json added jasmine in the back 1 year ago
package.json Bump axios from 0.20.0 to 0.21.1 in /back 6 months ago
server.ts Making HTTP and GRPC ports configurable in API server 6 months ago
tsconfig.json Merge branch 'develop' of github.com:thecodingmachine/workadventure into feature/global-message 9 months ago
yarn.lock Bump axios from 0.20.0 to 0.21.1 in /back 6 months ago

README.md

Back Features

Login

To start your game, you must authenticate on the server back. When you are authenticated, the back server return token and room starting.

POST => /login 
Params : 
    email: email of user.

Join a room

When a user is connected, the user can join a room. So you must send emit join-room with information user:

Socket.io => 'join-room'

    userId: user id of gamer
    roomId: room id when user enter in game
    position: {
        x: position x on map
        y: position y on map
    }

All data users are stocked on socket client.

Send position user

When user move on the map, you can share new position on back with event user-position. The information sent:

Socket.io => 'user-position'

    userId: user id of gamer
    roomId: room id when user enter in game
    position: {
        x: position x on map
        y: position y on map
    }

All data users are updated on socket client.

Receive positions of all users

The application sends position of all users in each room in every few 10 milliseconds. The data will pushed on event user-position:

Socket.io => 'user-position'

    [
        {
            userId: user id of gamer
            roomId: room id when user enter in game
            position: {
                x: position x on map
                y: position y on map
            }
        },
        ...
    ]

<<< back