libreadventure.git
4 years agoMerge pull request #120 from thecodingmachine/refactor_messages
David Négrier [Sat, 23 May 2020 15:25:18 +0000 (17:25 +0200)]
Merge pull request #120 from thecodingmachine/refactor_messages

Refactored and optimized messages

4 years agoMerge pull request #122 from thecodingmachine/reconnecting_scene
David Négrier [Sat, 23 May 2020 15:12:36 +0000 (17:12 +0200)]
Merge pull request #122 from thecodingmachine/reconnecting_scene

Adding a special scene to wait for server reconnection

4 years agoMerge pull request #121 from thecodingmachine/fix_mediatream_manage
David Négrier [Sat, 23 May 2020 15:12:10 +0000 (17:12 +0200)]
Merge pull request #121 from thecodingmachine/fix_mediatream_manage

Fix mediatream manage and connection server down

4 years agoFix CI
Gregoire Parant [Sat, 23 May 2020 14:50:17 +0000 (16:50 +0200)]
Fix CI

4 years agoFix test socket
Gregoire Parant [Sat, 23 May 2020 14:32:14 +0000 (16:32 +0200)]
Fix test socket

4 years agoPrettifying lost connection screen
David Négrier [Sat, 23 May 2020 14:13:37 +0000 (16:13 +0200)]
Prettifying lost connection screen

4 years agoAdding a special scene to wait for server reconnection
David Négrier [Sat, 23 May 2020 13:43:26 +0000 (15:43 +0200)]
Adding a special scene to wait for server reconnection

4 years agoUse `userId` generated by back end in all message
Gregoire Parant [Sat, 23 May 2020 13:04:25 +0000 (15:04 +0200)]
Use `userId` generated by back end in all message

4 years agoFix mediam stream manage and server back down
Gregoire Parant [Sat, 23 May 2020 12:00:36 +0000 (14:00 +0200)]
Fix mediam stream manage and server back down

4 years agoChanging the "Point" notion to add a notion of "moving" in addition to the notion...
David Négrier [Fri, 22 May 2020 20:59:43 +0000 (22:59 +0200)]
Changing the "Point" notion to add a notion of "moving" in addition to the notion of direction.

Also, refactoring JOIN_ROOM event to add complete position.

4 years agoRemoving logs
David Négrier [Wed, 20 May 2020 10:30:17 +0000 (12:30 +0200)]
Removing logs

4 years agoRemoving dead code
David Négrier [Tue, 19 May 2020 17:53:26 +0000 (19:53 +0200)]
Removing dead code

4 years agoRefactored and optimized messages
David Négrier [Tue, 19 May 2020 17:11:12 +0000 (19:11 +0200)]
Refactored and optimized messages

Now, when a user moves, only his/her position is sent back to the other users. The position of all users is not sent each time.

The messages sent to the browser are now:

- the list of all users as a return to the join_room event (you can send responses to events in socket.io)
- a "join_room" event sent when a new user joins the room
- a "user_moved" event when a user moved
- a "user_left" event when a user left the room

The GameScene tracks all these events and reacts accordingly.

Also, I made a number of refactoring in the classes and removed the GameSceneInterface that was useless (it was implemented by the LogincScene for no reason at all)

4 years agoMerge branch 'master' of github.com:thecodingmachine/workadventure into remove_userid
David Négrier [Mon, 18 May 2020 16:40:10 +0000 (18:40 +0200)]
Merge branch 'master' of github.com:thecodingmachine/workadventure into remove_userid

4 years agoRefactoring searchClientById
David Négrier [Mon, 18 May 2020 16:33:04 +0000 (18:33 +0200)]
Refactoring searchClientById

searchClientById was scanning through all open sockets to find the right one (which is inefficient if we have many).
Instead, I created a new Map that directly maps ids to sockets.
Furthermore, this solves a long-standing issue (when a socket is disconnected, we cannot find it anymore in the sockets list but it is still available in the disconnect callback from the map)
As a result, we should not have any remaining circles any more.

4 years agoMerge pull request #118 from thecodingmachine/remove_userid
David Négrier [Sun, 17 May 2020 10:11:03 +0000 (12:11 +0200)]
Merge pull request #118 from thecodingmachine/remove_userid

Refactoring messages

4 years agoStricter compiler
David Négrier [Sat, 16 May 2020 14:11:58 +0000 (16:11 +0200)]
Stricter compiler

4 years agoCode cleaning
David Négrier [Sat, 16 May 2020 14:07:38 +0000 (16:07 +0200)]
Code cleaning

4 years agoCleaning up tests
David Négrier [Sat, 16 May 2020 13:58:20 +0000 (15:58 +0200)]
Cleaning up tests

4 years agoRemoving broken import
David Négrier [Sat, 16 May 2020 13:51:00 +0000 (15:51 +0200)]
Removing broken import

4 years agoRemoving the Message class and merging it with MessageUserPosition (since it is only...
David Négrier [Sat, 16 May 2020 13:44:40 +0000 (15:44 +0200)]
Removing the Message class and merging it with MessageUserPosition (since it is only ever used it in MessageUserPosition)

Taking advantage of the TypeScript Constructor Assignment too to reduce the amount of code!

4 years agoGetting rid of roomId in Message class (this is not needed since all messages sent...
David Négrier [Fri, 15 May 2020 22:19:27 +0000 (00:19 +0200)]
Getting rid of roomId in Message class (this is not needed since all messages sent are for the room we are currently in)

4 years agoWhen sharing user position, only position is sent now!
David Négrier [Fri, 15 May 2020 21:40:05 +0000 (23:40 +0200)]
When sharing user position, only position is sent now!

4 years agoJoinRoom now ONLY sends the roomId.
David Négrier [Fri, 15 May 2020 21:24:04 +0000 (23:24 +0200)]
JoinRoom now ONLY sends the roomId.

4 years agoFixing test
David Négrier [Fri, 15 May 2020 21:17:58 +0000 (23:17 +0200)]
Fixing test

4 years agoSending player details (name + character selected) on connection
David Négrier [Fri, 15 May 2020 20:40:06 +0000 (22:40 +0200)]
Sending player details (name + character selected) on connection

4 years agoMore code removal
David Négrier [Fri, 15 May 2020 20:09:21 +0000 (22:09 +0200)]
More code removal

4 years agoMore code removal
David Négrier [Fri, 15 May 2020 20:08:53 +0000 (22:08 +0200)]
More code removal

4 years agoRefactoring messages
David Négrier [Fri, 15 May 2020 20:04:49 +0000 (22:04 +0200)]
Refactoring messages

Socket.io can stringify JSON messages itself, so there is no need to pass a string to "emit". You can pass a serializable object!

This commit removes all the useless toJson() methods, JSON.serialize and JSON.parse!

Woot!

4 years agoMerge pull request #116 from thecodingmachine/remove_userid
David Négrier [Fri, 15 May 2020 19:34:12 +0000 (21:34 +0200)]
Merge pull request #116 from thecodingmachine/remove_userid

Completely getting rid of "userid"

4 years agoCompletely getting rid of "userid"
David Négrier [Thu, 14 May 2020 21:19:48 +0000 (23:19 +0200)]
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.

4 years agoMerge pull request #113 from thecodingmachine/display_circle_on_startup
David Négrier [Thu, 14 May 2020 20:02:41 +0000 (22:02 +0200)]
Merge pull request #113 from thecodingmachine/display_circle_on_startup

Displaying circle on join

4 years agoMerge pull request #115 from thecodingmachine/update-webrtc
David Négrier [Thu, 14 May 2020 20:00:45 +0000 (22:00 +0200)]
Merge pull request #115 from thecodingmachine/update-webrtc

Update media webrtc

4 years agoRemoving log trace
David Négrier [Thu, 14 May 2020 20:00:31 +0000 (22:00 +0200)]
Removing log trace

4 years agoMinor update floor0 and floor1
gparant [Thu, 14 May 2020 19:00:52 +0000 (21:00 +0200)]
Minor update floor0 and floor1

4 years agoFix border view
gparant [Thu, 14 May 2020 18:54:34 +0000 (20:54 +0200)]
Fix border view

4 years agoMedia webrtcA
gparant [Thu, 14 May 2020 18:39:30 +0000 (20:39 +0200)]
Media webrtcA

 - Update peerConnexion manage
 - Add muted microphone logo
 - Add icon user
 - Sound when user enter in room webrtc

4 years agoDisplaying circle on join
David Négrier [Wed, 13 May 2020 21:11:10 +0000 (23:11 +0200)]
Displaying circle on join

So far, someone joining a map would not see the circles of groups already formed until someone moves in the group (because the "circle_moved_or_updated" event was not fired when someone arrives)

This commit fixes this behaviour. Someone entering a room will receive an event for each and every group currently formed.

4 years agoMinor changes map floor 0
gparant [Wed, 13 May 2020 20:36:34 +0000 (22:36 +0200)]
Minor changes map floor 0

4 years agoMerge pull request #111 from thecodingmachine/new-floor0
David Négrier [Wed, 13 May 2020 20:28:17 +0000 (22:28 +0200)]
Merge pull request #111 from thecodingmachine/new-floor0

New map floor0

4 years agoMerge pull request #112 from thecodingmachine/debug/improve_message
David Négrier [Wed, 13 May 2020 20:24:53 +0000 (22:24 +0200)]
Merge pull request #112 from thecodingmachine/debug/improve_message

More detailed error log to debug disconnect issue

4 years agoFixing CD
David Négrier [Wed, 13 May 2020 20:20:34 +0000 (22:20 +0200)]
Fixing CD

4 years agoMore detailed error log to debug disconnect issue
David Négrier [Wed, 13 May 2020 20:11:05 +0000 (22:11 +0200)]
More detailed error log to debug disconnect issue

4 years agoNew map floor0
gparant [Wed, 13 May 2020 20:09:02 +0000 (22:09 +0200)]
New map floor0

4 years agoMerge pull request #109 from thecodingmachine/Auto-reconnect
David Négrier [Wed, 13 May 2020 20:03:56 +0000 (22:03 +0200)]
Merge pull request #109 from thecodingmachine/Auto-reconnect

Auto-reconnect

4 years agoMerge pull request #108 from thecodingmachine/bugFixes
David Négrier [Wed, 13 May 2020 19:48:09 +0000 (21:48 +0200)]
Merge pull request #108 from thecodingmachine/bugFixes

fixed a game crash on firefox on http

4 years agoAuto-reconnect
gparant [Wed, 13 May 2020 18:22:42 +0000 (20:22 +0200)]
Auto-reconnect

4 years agofixed a game crash on firefox on http
kharhamel [Wed, 13 May 2020 14:56:22 +0000 (16:56 +0200)]
fixed a game crash on firefox on http

4 years agoFixing domain name
David Négrier [Wed, 13 May 2020 14:17:58 +0000 (16:17 +0200)]
Fixing domain name

4 years agoMerge pull request #107 from thecodingmachine/domain_name
David Négrier [Wed, 13 May 2020 14:07:06 +0000 (16:07 +0200)]
Merge pull request #107 from thecodingmachine/domain_name

Deploying master on new workadventu.re domain

4 years agoNot adding comment on push (only pull_request)
David Négrier [Wed, 13 May 2020 13:58:17 +0000 (15:58 +0200)]
Not adding comment on push (only pull_request)

4 years agoDeploying master on new workadventu.re domain
David Négrier [Wed, 13 May 2020 13:31:01 +0000 (15:31 +0200)]
Deploying master on new workadventu.re domain

... but still deploying in the test cluster.

4 years agoMerge pull request #99 from thecodingmachine/map_history
David Négrier [Wed, 13 May 2020 09:03:49 +0000 (11:03 +0200)]
Merge pull request #99 from thecodingmachine/map_history

Adding support for history API

4 years agoMerge pull request #106 from thecodingmachine/up_to_4
David Négrier [Wed, 13 May 2020 07:52:25 +0000 (09:52 +0200)]
Merge pull request #106 from thecodingmachine/up_to_4

Removing limitation to allow up to 4 players in a group

4 years agoRemoving limitation to allow up to 4 players in a group
David Négrier [Wed, 13 May 2020 07:39:48 +0000 (09:39 +0200)]
Removing limitation to allow up to 4 players in a group

4 years agoFixing htaccess redirect
David Négrier [Wed, 13 May 2020 07:29:18 +0000 (09:29 +0200)]
Fixing htaccess redirect

4 years agoRedirecting to the correct map after login screen based on URL provided
David Négrier [Tue, 12 May 2020 22:02:39 +0000 (00:02 +0200)]
Redirecting to the correct map after login screen based on URL provided

4 years agoAdding history support
David Négrier [Mon, 11 May 2020 22:07:50 +0000 (00:07 +0200)]
Adding history support

Arriving on a new map now changes the URL.
All URLs starting with _ are automatically redirected to index.html by the web server

4 years agoRefactoring/centralizing map loading in GameManager
David Négrier [Mon, 11 May 2020 21:26:40 +0000 (23:26 +0200)]
Refactoring/centralizing map loading in GameManager

4 years agoMerge pull request #103 from thecodingmachine/catching_errors
David Négrier [Tue, 12 May 2020 09:58:56 +0000 (11:58 +0200)]
Merge pull request #103 from thecodingmachine/catching_errors

Catching errors in socket callbacks

4 years agoCatching errors in socket callbacks
David Négrier [Tue, 12 May 2020 09:49:55 +0000 (11:49 +0200)]
Catching errors in socket callbacks

Catching errors in socket callbacks to avoid having the server crashing when an error occurs.

4 years agoMinor update layer position in map floor0 and floor1
gparant [Tue, 12 May 2020 00:01:18 +0000 (02:01 +0200)]
Minor update layer position in map floor0 and floor1

4 years agoMerge pull request #98 from thecodingmachine/map-v1
David Négrier [Mon, 11 May 2020 22:40:17 +0000 (00:40 +0200)]
Merge pull request #98 from thecodingmachine/map-v1

Add KEN office to the map

4 years agoFixing exit points
David Négrier [Mon, 11 May 2020 22:38:24 +0000 (00:38 +0200)]
Fixing exit points

4 years agoMerge branch 'master' of github.com:thecodingmachine/workadventure into map-v1
David Négrier [Mon, 11 May 2020 22:24:05 +0000 (00:24 +0200)]
Merge branch 'master' of github.com:thecodingmachine/workadventure into map-v1

# Conflicts:
# back/src/Assets/Maps/Floor0/floor0.json

4 years agoMerge pull request #100 from thecodingmachine/fix/css
grégoire parant [Mon, 11 May 2020 22:23:38 +0000 (00:23 +0200)]
Merge pull request #100 from thecodingmachine/fix/css

Minor Fix css style

4 years agoMinor Fix overflow css style
gparant [Mon, 11 May 2020 22:22:55 +0000 (00:22 +0200)]
Minor Fix overflow css style

4 years agoAdd KEN office to the map
NIP [Mon, 11 May 2020 21:42:10 +0000 (23:42 +0200)]
Add KEN office to the map

4 years agoMerge pull request #93 from thecodingmachine/fix-recette-grp
David Négrier [Mon, 11 May 2020 20:59:22 +0000 (22:59 +0200)]
Merge pull request #93 from thecodingmachine/fix-recette-grp

Fix recette GRP

4 years agoMerge pull request #95 from thecodingmachine/lyon_map
David Négrier [Mon, 11 May 2020 20:56:47 +0000 (22:56 +0200)]
Merge pull request #95 from thecodingmachine/lyon_map

 Refactoring "exit" to allow multiple maps

4 years agoFix depth error in the first floor
gparant [Mon, 11 May 2020 19:16:14 +0000 (21:16 +0200)]
Fix depth error in the first floor

4 years agoFix CI lint
gparant [Mon, 11 May 2020 18:55:17 +0000 (20:55 +0200)]
Fix CI lint

4 years agoFix position layer in map lyon
gparant [Mon, 11 May 2020 18:53:23 +0000 (20:53 +0200)]
Fix position layer in map lyon

4 years agoMerge pull request #97 from moufmouf/fix_player_name_depth
David Négrier [Mon, 11 May 2020 17:27:02 +0000 (19:27 +0200)]
Merge pull request #97 from moufmouf/fix_player_name_depth

Putting player names depth at a high depth to have them always visible

4 years agoFixing typo
David Négrier [Mon, 11 May 2020 17:19:42 +0000 (19:19 +0200)]
Fixing typo

4 years agoPutting player names depth at a high depth to have them always visible
David Négrier [Mon, 11 May 2020 17:16:36 +0000 (19:16 +0200)]
Putting player names depth at a high depth to have them always visible

4 years agoRefactoring "exit" to allow multiple maps
David Négrier [Mon, 11 May 2020 16:49:20 +0000 (18:49 +0200)]
Refactoring "exit" to allow multiple maps

Adding several layers named "exit" causes issues with Phaser 3.
This PR makes any possible layer being an exit layer (it only depends on the exitUrl property)

Also, fixing start position (it takes into account the layer width now)

4 years agouse start and exit layers on map
William [Mon, 11 May 2020 12:00:15 +0000 (14:00 +0200)]
use start and exit layers on map

4 years agoDelete params not used
gparant [Mon, 11 May 2020 11:19:48 +0000 (13:19 +0200)]
Delete params not used

4 years agoFix update world back end and deleting group in front end
gparant [Mon, 11 May 2020 11:17:02 +0000 (13:17 +0200)]
Fix update world back end and deleting group in front end

4 years agoMerge pull request #88 from thecodingmachine/feature/map-floor1
David Négrier [Mon, 11 May 2020 06:57:17 +0000 (08:57 +0200)]
Merge pull request #88 from thecodingmachine/feature/map-floor1

Map 1st floor

4 years agoRewording exit paragraph
David Négrier [Mon, 11 May 2020 06:51:46 +0000 (08:51 +0200)]
Rewording exit paragraph

4 years agoFix exit tile map of floot1
gparant [Sun, 10 May 2020 22:32:37 +0000 (00:32 +0200)]
Fix exit tile map of floot1

4 years agoFix url to get the next map in GameScene
gparant [Sun, 10 May 2020 22:25:06 +0000 (00:25 +0200)]
Fix url to get the next map in GameScene

4 years agoAdd explain to have multi exit layers into the map
gparant [Sun, 10 May 2020 22:07:54 +0000 (00:07 +0200)]
Add explain to have multi exit layers into the map

4 years agoFix error mapping refresh in back & the end of this feature development
gparant [Sun, 10 May 2020 21:49:08 +0000 (23:49 +0200)]
Fix error mapping refresh in back & the end of this feature development

4 years agoRefactor leave and join room
gparant [Sun, 10 May 2020 17:54:41 +0000 (19:54 +0200)]
Refactor leave and join room

4 years agoChange to update world by scene and room id
gparant [Sun, 10 May 2020 17:45:17 +0000 (19:45 +0200)]
Change to update world by scene and room id

4 years agoFix feedback @moufmouf strategy of maps managing by back.
gparant [Sun, 10 May 2020 16:34:55 +0000 (18:34 +0200)]
Fix feedback @moufmouf strategy of maps managing by back.

4 years agoFix feedback @moufmouf on circle texture
gparant [Sun, 10 May 2020 15:55:30 +0000 (17:55 +0200)]
Fix feedback @moufmouf on circle texture

4 years agoRemove middleware to secure access API.
gparant [Sun, 10 May 2020 15:31:27 +0000 (17:31 +0200)]
Remove middleware to secure access API.

4 years agoCorrect feedback @moufmouf
gparant [Sun, 10 May 2020 12:49:49 +0000 (14:49 +0200)]
Correct feedback @moufmouf

4 years agoUpdate back/src/Controller/MapController.ts
grégoire parant [Sun, 10 May 2020 12:48:58 +0000 (14:48 +0200)]
Update back/src/Controller/MapController.ts

Co-authored-by: David Négrier <d.negrier@thecodingmachine.com>
4 years agoUpdate back/src/Controller/MapController.ts
grégoire parant [Sun, 10 May 2020 12:48:34 +0000 (14:48 +0200)]
Update back/src/Controller/MapController.ts

Co-authored-by: David Négrier <d.negrier@thecodingmachine.com>
4 years agoPermit to dissociate data by room
gparant [Sun, 10 May 2020 11:58:32 +0000 (13:58 +0200)]
Permit to dissociate data by room

 - Update share room id.
 - Join room when a scene is loaded.
 - Add a room in constant variable.

4 years agoManage multi scene
gparant [Sat, 9 May 2020 19:28:50 +0000 (21:28 +0200)]
Manage multi scene

 - Create position and check if user is in position to switch in the next scene.
 - When scene is load, we load all scene in the layer of name "exit".
 - Layer "exit" of map.json have a parametter "exitSceneKey" to identify next scene.
 - Add layer "start", the player could start in the scene on the object present in the layer of name "start".

4 years agoMulti Scene in back end
gparant [Sat, 9 May 2020 17:41:21 +0000 (19:41 +0200)]
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

4 years agoAdd maps in back
gparant [Sat, 9 May 2020 15:50:47 +0000 (17:50 +0200)]
Add maps in back

 - Add all map json in back
 - Create middleware to check authentification user
 - Create controllers to get map
 - Create access to get all files in folder Assets/Maps

4 years agoUpdate name map
gparant [Sat, 9 May 2020 14:47:55 +0000 (16:47 +0200)]
Update name map

 - Change name in game scene and login scene

4 years agoAdd map 1st floor
gparant [Sat, 9 May 2020 14:38:13 +0000 (16:38 +0200)]
Add map 1st floor

Rename map to floor 0