Actually, it’s my first topic on this forum. So hello everyone
In the last month I have tested various threejs-based libraries (mainly use-cannon and react-three-fiber) and given the amount of free time due to the quarantine I decided to make my first game.
I wanted to share it with you and thank you for all the answers you unconsciously gave me through this forum.
All the game was done with react-three-fiber.
Honestly, I’m not sure if this approach is the best one for a web-based game.
Using only React to manage entities such as the player and the Corona particles was difficult.
The frequent updates of React components literally kill the performance.
So I opted to centralize as much game logic with xstate (https://github.com/davidkpiano/xstate), trying to delegate only the rendering to React
Despite this I have already noticed that on some PCs the 60fps are never reached.
From the threejs point of view I have tried to lower both the 3D objects vertices and the lights to a minimum number, completely eliminating the shadows in favor of fake shadows (sprites).
I am open to advice and criticism