r/reactjs • • Mar 18 '22

Show /r/reactjs Game in React Three Fiber 💪

538 Upvotes

22 comments sorted by

8

u/ostjh Mar 18 '22

In this link, you can see other games that I have developed in ReactJS: https://bio.link/jorgerub

5

u/azangru Mar 18 '22

How's the battery usage?

11

u/[deleted] Mar 18 '22

/u/ostjh

<Canvas frameloop="demand">

will only render when props change or when anything calls invalidate(). react-spring does that automatically for instance but you can use anything and basically just invalidate in onChange and it'll be fine. this will completely stop doing anything when nothing's moving, battery will be fine. great game btw! :-)

6

u/ostjh Mar 18 '22

Hei @drcmda thank you very much, I will implement it 💪

31

u/minicrit_ Mar 18 '22

this is really cool! i just spent 10 minutes playing around, can you share the source code? would really like to take a look at how you didnit

7

u/[deleted] Mar 18 '22

This is cool as fuck! Both the concept and the implementation!

7

u/CaliBounded Mar 19 '22

If you don't mind me asking, which resources did you use to learn React Three Fiber? This may be because I found out about it not top long after it was created a few years ago, but I could NOT find many resources kn learning to use it...

4

u/andrerpena Mar 18 '22

This is really great. I did all levels now. The idea of using react to render 3D components make a lot of sense.

2

u/[deleted] Mar 18 '22

This is amazing. Woah! I want to be able to build things like this

2

u/jvce Mar 19 '22

Awesome work!

1

u/0xChr15 Mar 18 '22

That looks pretty sweet! Well done.

1

u/SuboptimalEng Mar 18 '22

This is awesome 🤩

1

u/NG-Axolotl Mar 19 '22

this sum good sht

1

u/grncdr Mar 19 '22

Really fun, I couldn’t stop until I’d done them all 👍

1

u/vegetarchy Mar 19 '22

Great game! Had to pull myself away after 16 levels

1

u/[deleted] Mar 19 '22

Amazing work. Please share the tech stack for the games.

1

u/chickenbabies Mar 19 '22

How long did this project take you? Awesome work!

-14

u/[deleted] Mar 18 '22

Using react to make games, so original OP

0

u/[deleted] Mar 19 '22

[deleted]

1

u/Ok-Department1190 Mar 26 '22

Just focus on what you enjoy and continue evolving. Not everyone enjoys game dev, especially using JavaScript/react at that. Also don’t sell yourself short, you may not know how OP did this but if you wanted to I’m sure you could figure it out given enough time and resources.