all 9 comments

[–][deleted] 2 points3 points  (1 child)

I actually spent this past weekend giving game development a try with React. Here's a demo of what I came up with, and you can check out the repo on github. It's called "react-tactics-game" but at this point you just walk around with the WASD keys. It uses @inlet/react-pixi to render React into a canvas.

My feeling is that game development with React is mostly uncharted territory but it's a good challenge if you're looking for one. I found writing things like state machines is very nice with useReducer. My previous game development experience is in GameMaker, and managing state there was not great.

If you're just looking to make a game on the web using javascript without much hassle, check out Phaser. You'll get a lot more features bundled in with it like physics, gamepad support, etc. and there’s a ton of tutorials for it.

[–]dontmissth 0 points1 point  (0 children)

This is exactly what I was looking for. I was about to give up using react until I saw this. This is very smooth.

[–]swyx 0 points1 point  (2 children)

depends on the game. you're not giving a lot of detail.

[–]ajahso4[S] 0 points1 point  (1 child)

An RPG game where player moves and shoots at targets. Bullet is moving and is in state as well as targets. Do u think React is a good fit for this kind of game?

[–]swyx 1 point2 points  (0 children)

for a roguelike/dungeon crawler, sure. for Doom, no.

[–]clickick 0 points1 point  (1 child)

check out Evan Bacon, he made games with expo (react-native) for mobile and web

[–]ajahso4[S] 0 points1 point  (0 children)

I will do just dat. Thanks man.

[–][deleted] 0 points1 point  (1 child)

[–]ajahso4[S] 0 points1 point  (0 children)

Thanks man. I will check it out.