Loading video...

Video Failed to Load

Go Home

Hey there new #threejs devs, vibe coders, and creative tinkerers 🎮✨ I’m the guy who made Mario Kart in JS... and yeah, it was terrible. 😂 But I learned a lot since, so here are 5 lessons I wish I knew before: 🧵👇

111,662 views • 1 year ago •via X (Twitter)

10 Comments

Alex's profile picture
Alex1 year ago

1. Use lerp, always. Linear interpolation is your best friend for smooth movement. Don’t just add numbers to rotation or position. It’s the secret sauce for natural transitions, especially for car turning, camera follow, and anything that moves.

Alex's profile picture
Alex1 year ago

2. R3F is awesome but know its limits. React Three Fiber is powerful, and I still love it. But keep React out of your 3D rendering logic. Seriously. Use React for UI only. React-re render doesn't do well with Three.js frame loops. use Ref object.

Alex's profile picture
Alex1 year ago

3. Keep an eye on your draw calls. 👀 Every draw call hits your performance, and they add up fast. At first, you won’t notice. Then suddenly your scene’s lagging and you’re wondering why your 30 cubes are killing the FPS. (Hi @levelsio) Batch stuff. Merge geometries. and...

Alex's profile picture
Alex1 year ago

4. Use Instances! With three.ez/instanced-mesh and InstancedMesh2, adding, updating, and modifying instances in real time is super smooth and super easy. You can go really far even give each instance its own shader. 🔗

Alex's profile picture
Alex1 year ago

5. Have fun. Game dev is so much fun. I’ve lost hours just tweaking things... or honestly, just playing my own game. It's so cool to do !

Alex's profile picture
Alex1 year ago

The tweet is doing Numbers ! Might do a part two 👀

Alex's profile picture
Alex1 year ago

There you go

Freddy's profile picture
Freddy1 year ago

I guess this is where I will learn more about doing Mario Kart in three.js

Alex's profile picture
Alex1 year ago

Ohhh this is so cool !! The old graphics with modern VFX matches so well ! Good job !

Alex's profile picture
Alex1 year ago

It does something right ? 👀

Related Videos

Phuwin thought he got caught again, but it turned out the fans had mistaken someone else for him. I’M LAUGHING SO HARD 555555 THE GOOD YEAR OF POND #Happy25thPondDay 🐼: Actually, I have a funny story to tell. It happened just now, before I got here. 🐻: Really? What happened? 🐼: When I was coming through The Mall… I already knew the traffic would be bad because today is early voting day, so if you have time, go vote too. Anyway, the traffic was a bit slow, but I arrived pretty fast. The problem was that inside the mall, it was super crowded. At first, I was going to park upstairs, but going up floor by floor took too long. Then I saw a spot downstairs and parked there, thinking I was being smart. I thought, “If I take the elevator inside the mall, I’ll come out right at the hall and everyone will see me, right?” So I decided it would be smarter to take the parking lot elevator. 🐻: From the parking lot? 🐼: Yeah. I pressed the button for the third floor. When the doors opened, there were lots of people sitting right in front. Luckily, everyone had their backs to me. So I thought, “I’m screwed.” I pressed the second floor, turned around, and closed the door. Suddenly, the people in front started standing up, and I heard, “Hey, Phuwin! Phuwin!” In my head, I was like, “Oh my God, I’m done for, they found me again.” I was thinking, “What do I do now?” I always end up embarrassing myself like this. But then I looked again and realized… They thought some random guy walking in the mall was me. And everyone started going, “Look, Phuwin is here! Phuwin is here!” At that moment, I just wanted to say: “Guys, I’m right here behind you!”

Narawins 🇧🇷

98,484 views • 5 months ago