Is it possible to use some SPA framework such as react?

Game development with Board Game Arena Studio
Post Reply
User avatar
YEEDA
Posts: 10
Joined: 28 October 2016, 09:32

Is it possible to use some SPA framework such as react?

Post by YEEDA »

Is it possible to use some SPA framework such as react?

I already finished a game by using pure js to manipulate the DOM directly.

I am planning to learn a single-page application framework (react).
And I wonder is it possible to use those framework to render the game on bga?

If it is possible, what is the minimal example looks like?
User avatar
Tisaac
Posts: 1551
Joined: 26 August 2014, 21:28

Re: Is it possible to use some SPA framework such as react?

Post by Tisaac »

YEEDA wrote: 20 September 2022, 19:42 Is it possible to use some SPA framework such as react?

I already finished a game by using pure js to manipulate the DOM directly.

I am planning to learn a single-page application framework (react).
And I wonder is it possible to use those framework to render the game on bga?

If it is possible, what is the minimal example looks like?
Short answer : no.
Long answer : at least two devs (including myself) experimented VueJs which is the easiest one to integrate into this kind of website and we wouldnt recommend doing that.
User avatar
YEEDA
Posts: 10
Joined: 28 October 2016, 09:32

Re: Is it possible to use some SPA framework such as react?

Post by YEEDA »

Tisaac wrote: 20 September 2022, 22:42
YEEDA wrote: 20 September 2022, 19:42 Is it possible to use some SPA framework such as react?

I already finished a game by using pure js to manipulate the DOM directly.

I am planning to learn a single-page application framework (react).
And I wonder is it possible to use those framework to render the game on bga?

If it is possible, what is the minimal example looks like?
Short answer : no.
Long answer : at least two devs (including myself) experimented VueJs which is the easiest one to integrate into this kind of website and we wouldnt recommend doing that.
So Sad :(
User avatar
Victoria_La
Posts: 585
Joined: 28 December 2015, 20:55

Re: Is it possible to use some SPA framework such as react?

Post by Victoria_La »

I would say it is possible, but not practical.
I managed to get working template using typescript classes, which took me days of hitting head on the wall dealing with dojo.
https://github.com/elaskavaia/bga-dojoless

Its not far fetch to add more processors/webpack to get core react, you have hack it to deal with ajax and comet notification some-how,
but not sure it will make wrtiting game easier even if you get it going...
User avatar
Een
Posts: 3768
Joined: 16 June 2010, 19:52

Re: Is it possible to use some SPA framework such as react?

Post by Een »

Also please remember that the most likely reason for a game to be broken by a framework update then abandoned is to add in some specific "creative" code layer or external dependencies that may be hard to maintain.

There is a lot of freedom in the way you can program your game module, but it also means that you can back yourself into a corner. It has happened before.
Post Reply

Return to “Developers”