npm run dev
- start server with nodemon (port 3000)
/login
- login endpoint/game
- game endpoint/status
- status endpoint
git push heroku HEAD:master
- push your HEAD to master in heroku's remote
heroku logs -a onara-beta -d web -t
- watch heroku logs
- when a player disconnects while moving,
socket.close()
is not fired. therefore, other players see the disconnected player for a while after the player has left. - Call doesn't work when I call Won. Only works when Won calls me. Look into turn and stun server.
TypeError: Cannot read property 'status' of undefined
- Codelabs webRTC
- Get started with WebRTC
- Build the backend services needed for a WebRTC app
- ERROR: ICE connection failed thread
- ERROR: connection failed thread
- You may be taking too long to paste the signals. You don't have very much time before it will time out.
- NAT or symmetric
- trickle ICE
- free turn server
- STUN & TURN
- ICE protocol
- addStream
- switch video and audio
https://github.com/samme/phaser3-faq/wiki#how-do-i-scaleresize-the-game-canvas
- if you're camera/audio is disabled, you will get streams from users who were already in the room, but will not receive streams from new users
- resize example
- Dev log (scale manager)
- https://phaser.discourse.group/t/game-scaling-resizing-example-v3/1555
- scale manager
- window resize event
- phaser resize example (this works well)
- Use container to display player info
- Add Buttons to Your Phaser 3 Game with RexUI Plugins
- How to Make a Custom Phaser 3 Button
https://phaser.discourse.group/t/phaser-3-interaction-with-react/308/7
Just adding my 2 cents since I’m also working on a project using both React and Phaser 3.
The way we linked both is quite simple, we simply used EventEmitters.
When something interesting happens in Phaser, we emit an event and our React components are listening to them. We can then use setState since we’re back inside React.
It also perfectly work the other way around when we need to update Phaser based on React events.