Ask HN: ReactJS component library for making games?
1–9 of 9 posts
Re: Ask HN: ReactJS component library for making games?
#2Re: Ask HN: ReactJS component library for making games?
#3Familiarity with React might be tempting to reuse it for games, but there are plenty of HTML5 game engines out there which will do a better job. In fact React is successful in web apps because it is basically using a game loop. For a quick example: https://www.babylonjs.com/community/
Are there clear HTML5 web components tied to those engines? I am thinking a confetti component, for example.
Re: Ask HN: ReactJS component library for making games?
#4Familiarity with React might be tempting to reuse it for games, but there are plenty of HTML5 game engines out there which will do a better job. In fact React is successful in web apps because it is basically using a game loop. For a quick example: https://www.babylonjs.com/community/
Oh incredible. Okay, then may be I was looking at the wrong approach all along. Are there clear HTML5 web components tied to those engines? I am thinking a confetti component, for example.
Re: Ask HN: ReactJS component library for making games?
#5Familiarity with React might be tempting to reuse it for games, but there are plenty of HTML5 game engines out there which will do a better job. In fact React is successful in web apps because it is basically using a game loop. For a quick example: https://www.babylonjs.com/community/
Oh incredible. Okay, then may be I was looking at the wrong approach all along. Are there clear HTML5 web components tied to those engines? I am thinking a confetti component, for example.
Re: Ask HN: ReactJS component library for making games?
#6Earlier quoted context omitted.
Oh incredible. Okay, then may be I was looking at the wrong approach all along. Are there clear HTML5 web components tied to those engines? I am thinking a confetti component, for example.
These engines generally don’t use the DOM; instead, they render in a canvas element and provide you a framework to deliver logic and drawing instructions to each frame before it renders. That’s an entirely web-standards-compliant approach as Canvas was meant for this. There is stock code and art out there to save you time creating in-game objects for any particular engine (my personal preference is Phaser. )
I will check out Phaser.
Re: Ask HN: ReactJS component library for making games?
#7Earlier quoted context omitted.
Oh incredible. Okay, then may be I was looking at the wrong approach all along. Are there clear HTML5 web components tied to those engines? I am thinking a confetti component, for example.
They are not HTML5; they are totally "internals" - the only DOM involved is a element or some WebGL element.
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?
#8Earlier quoted context omitted.
They are not HTML5; they are totally "internals" - the only DOM involved is a element or some WebGL element.
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 , 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.
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?
#9Earlier quoted context omitted.
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 , 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.
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…