Progressive Web App with Treejs and Pathfinding

Dear community,
I would like to create a game with destructable objects (navigation mesh needs to be recalculated from time to time) and pathfinding algorithm. My idea is to use react for frontend and nodejs calling python on the backend (then pathfinding logic would be called on backend only).
However, I am uncertain, how to build a PWA out of it (so that user can play it from own PC for example). Is there anybody experienced who could advise please?

Use react-three-fiber and your scene is reactive and will be disposed correctly, you can use regular react-router and practically everything react has to offer inside you scene graph, you could exchange parts of your scene dynamically with lazy routes etc. It has tooling for responsive web dev as well. Put that into a next.js and you can easily combine it with backend services and scripts.

Personally I would avoid server round trips unless they’re necessary for multi player, path finding can be taken care of in web workers and/or wasm. There are also libraries for that, for instance Yuka.

1 Like