Re:Ask HN: ReactJS component library for making games?
by dylz on Sunday October 04, 2020 @06:46PM
(#24682858)
They are not HTML5; they are totally "internals" - the only DOM involved is a <canvas> element or some WebGL element.
[ Parent
| on HN ]
Re:Ask HN: ReactJS component library for making games?
by 2pointsomone on Sunday October 04, 2020 @09:18PM
(#24683698)
Thanks, dylz. I think I am not interested in high-performance graphics, so I am not sure I am fond of working only with the <canvas>, even with these abstracted game engines.
I might just sit for a day to write beautiful CSS and use animeJS or something like that to go back to DOM approach of doing this.
Re:Ask HN: ReactJS component library for making games?
by dylz on Monday October 05, 2020 @07:50AM
(#24686782)
FWIW, I am doing something similar right now and I can tell you that making thousands of overlapping divs sucks for performance already on desktop, and is even worse on mobile. I can see why the canvas thing is in use.
Most JS game engines should support firing native events of some sort, like you should theoretically have the ability to call window.confetti() from canvas-rendering game code in response to a victory screen or similar.
Re:Ask HN: ReactJS component library for making games?
by 2pointsomone on Tuesday October 06, 2020 @11:58AM
(#24699118)
This is very useful to know, dylz. Thank you!!