|
|
|
|
|
by gus_massa
1807 days ago
|
|
How do I move, I tried AWSD, JIKL, arrows, ... and I didn't move. Sometimes it's easier to get traction here with a technical post. What is the tech stack? Edit: I think I found a bug https://imgur.com/a/DKrsNS0 If a Sun Strike is casted and a round ends, then the partial circle appears in all the following rounds. (Moreover, I can't move, so I was very vulnerable to Sun Strike :( .) |
|
I used Phaser for the game engine. Both the client and server run Phaser instances. I used React / Redux for the UI (this was a fun use case actually, having both a game and a traditional interface communicating with each other through Redux). The server is written in Node with a simple express server. I wrote a custom game manager that handles spinning up Phaser instances, placing players in them, and shutting down stale ones.
The network architecture is built on a combination of Websockets, WebRTC, and good ol’ HTTP.
Websockets is for all real time communication that I definitely want to go through (casting spells, players dying, etc).
I used WebRTC to handle communication for things that don’t need to come through reliably (game state). It treats the server as a “peer”, but only for the purpose of being able to blast packets back and forth without the overhead of a persistent connection.
HTTP is for general account management, matchmaking, and game creation.
Edit: You’re right, that’s totally a bug. Guess I need to do a better job of cleaning up after a round!