Commit graph

13 commits

Author SHA1 Message Date
David Négrier e9ca8721a6 Migrating userId to "int32" to save some space and adding userMoves message in protobuf 2020-09-18 13:57:38 +02:00
David Négrier a373626e24 Removing all "any" from back.
To do this, I used generic-type-guard package which generates both an interface AND a valid type guard from code.
With this, we are 100% sure that the messages we receive are validated at runtime!
The client cannot pass us an object that is invalid! \o/
2020-06-09 23:07:19 +02:00
David Négrier ac0b7a7361 Turning let into const where applicable 2020-06-09 15:54:54 +02:00
Gregoire Parant ab32021fc0 Fix mediam stream manage and server back down 2020-05-23 14:00:36 +02:00
David Négrier 4de552437d Completely getting rid of "userid"
Previously, userid was generated by the "/login" route and passed along.
This commit completely removes the uuid "userid" (and disables the LoginController too and any Jwt check).

"userid" is replaced by the "socket id" of the connection.
So a user is now identified using a socket id, which is unique for a given connection.
2020-05-14 23:20:43 +02:00
gparant 58b65030bd Fix feedback @moufmouf strategy of maps managing by back. 2020-05-10 18:34:55 +02:00
gparant 5f11b065e1 Permit to dissociate data by room
- Update share room id.
 - Join room when a scene is loaded.
 - Add a room in constant variable.
2020-05-10 13:58:32 +02:00
gparant fb8d9bf9a8 Multi Scene in back end
- Change maps url to get maps
 - Change GameScene to create scene with file since back end
 - Change LoginScene to upload scene and start game
2020-05-09 19:41:21 +02:00
gparant d257b2b944 Multi players on the map
- Fix share user position
 - Fix initialise map
 - Create function to add user on the map with back end data
2020-04-10 12:54:05 +02:00
gparant 7e08e7f133 Front : create class to connect, send and receive message
- Create environment class
 - Create Connexion class to connect and save data
 - Refactor back api
2020-04-05 20:57:14 +02:00
gparant 72730a0abe Refactor & Typo 2020-04-05 14:31:49 +02:00
gparant fbcb48f9ad Share players position using Socket.IO
- I stocked information user (id, room and position) in socket client.
 - I created function to send all information every few 10 milliseconds.

Note : when the front will be available, we must check the performance of back server.
2020-04-04 19:25:08 +02:00
gparant 53e1600e67 Add authenticate
- Create new controller authenticate with login root..
 - Update and manage error message socket io.
 - Create enum for environment variables
2020-04-04 17:22:02 +02:00