Commit Graph

217 Commits

Author SHA1 Message Date
David Négrier
dcc78786a9 Porting favicon to the "front" container 2020-06-09 09:21:24 +02:00
David Négrier
bd3be2a138
Merge pull request #157 from thecodingmachine/fixing_long_disconnect
Adding connecting spinner and blinking error to webrtc display
2020-06-08 18:09:12 +02:00
David Négrier
5042f2f82c Lint 2020-06-07 23:00:05 +02:00
David Négrier
c0809e28db Adding support for putting the hash in a map referenced in an exit scene. 2020-06-07 22:57:32 +02:00
David Négrier
db3ef81842 Adding the ability to add several entry points
We can now have several start layers and choose an entry point using a # in the URL
2020-06-07 13:23:32 +02:00
David Négrier
f2c9647882 Adding connecting spinner and blinking error to webrtc display
I put a connecting spinner around the user name when the user is connecting.
Also, if an error occurs, we will see a blinking red circle around the player name.
2020-06-06 22:49:55 +02:00
David Négrier
96c5d92c46 Fixing disconnection taking ~15 seconds
Most of the time, sending a disconnect event to one of the players is enough (the player will close the connection
which will be shut for the other player).
However! In the rare case where the WebRTC connection is not yet established, if we close the connection on one of the player,
the other player will try connecting until a timeout happens (during this time, the circle with the name is displayed for nothing).

So now, we send disconnection event to every body (not only the people in the group, but also to the person leaving the group)
2020-06-05 13:07:18 +02:00
David Négrier
b82b13e351 Finalizing strict mode fixes 2020-06-04 18:56:59 +02:00
David Négrier
6f69a62d4d More strict fixes 2020-06-04 18:56:59 +02:00
David Négrier
082a11b0cd Allowing ill defined initializers (because of the way Phaser 3 is designed) 2020-06-04 18:56:59 +02:00
David Négrier
7292bc3cab More strict fixes 2020-06-04 18:56:22 +02:00
David Négrier
111bfcfe8c More strict typecheck fixes 2020-06-04 18:56:22 +02:00
David Négrier
a231024502 Fixing strict type checks 2020-06-04 18:56:22 +02:00
David Négrier
a3ac782f17 Enabling Typescript strict mode on the front
This is very important otherwise, a number of useful checks (like nullable objects not propertly checked) are not performed.

See https://dev.to/briwa/how-strict-is-typescript-s-strict-mode-311a
2020-06-04 18:56:22 +02:00
David Négrier
b6d8b8fb49
Merge pull request #139 from thecodingmachine/landingpage
first landingpage release
2020-06-04 15:34:57 +02:00
David Négrier
17250d810f Fixing front title 2020-06-04 15:23:54 +02:00
David Négrier
82e2c0d985
Merge pull request #149 from thecodingmachine/multiple_start_positions_in_layer
Allowing several start positions in a given start layer
2020-06-03 11:20:57 +02:00
David Négrier
69d2fa6944 Allowing several start positions in a given start layer
If more than one tile was set in the "start" layer, the last tile would be selected.
Now, the tile is selected at random among available tiles.

Also, a message is issued if no tiles have been put on the "start" layer.
2020-06-03 11:14:04 +02:00
David Négrier
9ddf22d36b Removing GameScene from the list of known GameScene when leaving
This is important because when we come back to the GameScene later, some properties of the GameScene object might be initialized with the values of the previous GameScene.
Like the position if the user previously disconnected.

Closes #146
2020-06-03 10:45:25 +02:00
David Négrier
2dc682ea72 Fixing warning on character selection 2020-06-02 15:57:11 +02:00
David Négrier
d72e60610e Adding PlayersPositionInterpolator to interpolate/extrapolate players positions 2020-06-02 13:44:42 +02:00
David Négrier
d69ce8a6a6 Adding PlayerMovement class to interpolate/extrapolate position along tests (installing Jasmine) 2020-06-02 10:48:04 +02:00
David Négrier
077b29bfbd Sending position only every 200ms while moving 2020-06-01 22:42:18 +02:00
Gregoire Parant
b931a8f117 Fix animation player 2020-06-01 13:20:45 +02:00
Gregoire Parant
244f87196e Update strategy caching bundle front js files with webpack
- Add HtmlWebpackPlugin to use template index html
2020-06-01 11:53:12 +02:00
David Négrier
f69f99f449 Adding localStorage for selected user 2020-05-26 22:26:50 +02:00
David Négrier
52e3b47cc1 Storing user name in local storage 2020-05-26 22:17:00 +02:00
David Négrier
f36bd240a7 Fix lint 2020-05-26 17:43:25 +02:00
David Négrier
0492dfdf3a Fixing import 2020-05-26 17:37:26 +02:00
David Négrier
04a1f90ed5 Adding communication between LoginScene and SelectCharacterScene 2020-05-26 17:25:29 +02:00
David Négrier
5806e379c8 Fixing selection on keyboard after selection using mouse 2020-05-26 17:02:04 +02:00
David Négrier
da0d9fed87 Adding a new SelectCharacterScene
Taking what was done in the LoginScene regarding character selection and putting it in its own scene.
Also, making character selection possible via the keyboard.
2020-05-25 23:26:27 +02:00
David Négrier
21576946f0 Commenting out the notion of status in the GameManager
It seems to be useless
2020-05-25 22:37:07 +02:00
David Négrier
62cb8cca87 Also removing dead class 2020-05-25 22:36:44 +02:00
David Négrier
17e7f1b37a Removing dead code from previous messaging system
Remvoing messages that were no more used in the new messaging system (the code used to handle the message that sent the position of all users on the front side)
2020-05-25 22:36:44 +02:00
David Négrier
1fa39b0781 Fixing typos.
Replaced connexion with connection and LogincScene with LoginScene
2020-05-24 23:14:12 +02:00
David Négrier
cd586a9e0c Renaming /maps to /start-map
Closes #90
2020-05-24 22:53:10 +02:00
David Négrier
2448fef53a Adding a notion of instances per mapAdding a notion of instances to room
The URL signature becomes:

https://workadventu.re/_/[instance]/[path_to_map.json]

This allows us to create many instances of the same map (and therefore to create several different worlds for different people)

An exit on a map can target another "instance" by passing the "exitInstance" property.
2020-05-23 17:45:49 +02:00
David Négrier
080e08eeef
Merge pull request #122 from thecodingmachine/reconnecting_scene
Adding a special scene to wait for server reconnection
2020-05-23 17:12:36 +02:00
Gregoire Parant
f4ed2e52bf Fix CI 2020-05-23 16:50:17 +02:00
David Négrier
e41eda9979 Prettifying lost connection screen 2020-05-23 16:13:37 +02:00
David Négrier
36858f8747 Adding a special scene to wait for server reconnection 2020-05-23 15:43:26 +02:00
Gregoire Parant
ab32021fc0 Fix mediam stream manage and server back down 2020-05-23 14:00:36 +02:00
David Négrier
ab798b1c09 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.
2020-05-22 23:04:45 +02:00
David Négrier
f44a44c109 Removing logs 2020-05-20 12:30:17 +02:00
David Négrier
125a4d11af 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)
2020-05-19 19:11:12 +02:00
David Négrier
1bbd0866cb Code cleaning 2020-05-16 16:07:57 +02:00
David Négrier
3b6ace03fa Getting rid of roomId in Message class (this is not needed since all messages sent are for the room we are currently in) 2020-05-16 00:19:27 +02:00
David Négrier
4d1c3517ec When sharing user position, only position is sent now! 2020-05-15 23:47:00 +02:00
David Négrier
cdfa9acf01 JoinRoom now ONLY sends the roomId. 2020-05-15 23:24:04 +02:00