Battle Typer - Typing game, made using React Three Fiber.

Hi!
Just wanted to show you a game I’ve been working on. Made with react three fiber.
Hope you like it, feedback appreciated.

5 Likes

Well done! That is a nice idea.

What did you used with R3F to manage gameplay, Zustand? Just some React code?

Cheers,

Thanks! I used miniplex + zustand.

1 Like

is miniplex hard to use? i still can’t wrap my head around ECS, it just doesn’t click. did you use ECS before that?

No, miniplex was my first experience with ecs, and it was hard to understand at first, but now, I worked with it for a little while and I like it. I don’t have any experience with other ecs systems, so I can’t compare.

I’m curious why use both Zustand and Miniplex? Seems to very different approaches to managing data.

I’ve used bitECS in the past, and I liked the ECS approach. I believe that you can think about it like some sort of ‘database’: you query data from it, update it, delete it or insert new data from it. The queries are pretty nice since you can query only the relevant components, regardless of the entities they belong to.

I was surprised that Miniplex didn’t introduces itself the concept of ‘systems’, because those are really where everything ‘clicks’, it might not help for adopting the ECS pattern if you’re not familiar with it.

Well, I use miniplex for entity managment, so it stores data about enemies, like health etc. Zustand I use for game state, like game over, game paused and so on. You cant really store enemy data in zustand because then it re-renders whole canvas on every shot pretty much, and tanks performance. Maybe there is a way to make it so it does not re-render everytime, I don’t know.

1 Like

Nice idea - 2340 at first try.

I don’t believe it should behave this way.I don’t have much experience with R3F and Zustand, but React is usually pretty smart (amthough pretty opaque as well) when it needs to render only the changing parts of the app, it’s its whole point! Have you tried using selectors?

Not trying to take you away from Miniplex, I do believe ECS is a great way to manage game data.

No, I haven’t.

Well done, man!