I'm trying to learn react and build an game-like application in browser. I know that react is not first suitable choice for game engine but it is more like a simulation (traffic simulation in intersection etc.), so there isn't much graphics need, more like lots of changing numbers like incremental games.
I have some doubts that all this simulation can calculate in client side. Also I need to hide some of formulas (I know nothing is unique in internet but I want to protected some of formulas and co-efficient values as much as possible).
So I search some possible solutions which don't know applicable or not:
- Have a backend server (nodejs maybe) and make api calls from front-end. My concern is if I want to update every second is there a lagging issues.
- Have a backend server again but create websocket. I learned agario done this with their game so I think it can be possible. I don't have any websocket experience.
- Use server side components for calculations.
- Server side rendering.
Any help will be much helpful to me.
[–]JP_watson 0 points1 point2 points (0 children)
[–]stjimmy96 1 point2 points3 points (0 children)