Hey everyone!
I'm a React developer by day, and recently, a game dev wannabe by night. Out of curiosity, I dove into the world of 2D game development. The result? "World’s on Fire" - a simple browser-based 2D shooter I built using React + PixiJS.
You can play it here 👉 World's on Fire
🛠️ The Stack
- React (because it’s home)
- PixiJS (because ChatGPT suggested it :p)
- Jotai for simpler state management
- Assets from kenney.nl
Cursor and ChatGPT was extremely helpful while making this!
🚀 The Gameplay
You’re a jet. The world is on fire (metaphorically..). You shoot… a lot.
- The player jet auto-shoots and moves upward.
- Enemies spawn from the top and come down.
- After killing 10 enemies, a tougher kind starts appearing (and they shoot back).
- Kill 20, and you'll meet the real troublemakers.
- Power-ups randomly drop - either faster fire rate or more damage and health packs if your health is under 100.
- The game ends when you're dead, and your score is saved locally.
No login, no ads, no microtransactions — just pure arcade chaos in your browser.
🧠 The Learning Curve (a.k.a. The Struggle Was Real)
This started as a hobby project to dip my toes into game dev… and boy did I dip head-first.
- Math? Yep, had to deal with a bit of that. Did I understand it? Not really. I shamelessly copy-pasted formulas from StackOverflow and ChatGPT, and they mostly worked. All I had to do was tweak the fancy numbers 🤷♂️
- Game loops, sprites, collisions, audio triggers, and power-up systems - all alien territory coming from React land. But I learned a lot.
- Balancing difficulty was surprisingly tricky. I had no idea how to design proper levels or structure progression. At first, I thought I’d create distinct levels, but that felt like too much overhead. So I went the lazy-but-effective route: infinite enemy waves. I tossed different enemy types into an array and picked one based on the player’s score. The third-wave enemies just reused the second-wave’s shooting logic. Efficient? Maybe. Elegant? Absolutely not. But hey, it works.
🧪 Why I Did It
Honestly? To break the monotony of form inputs and dropdowns, and to push myself to learn something different. Game dev forces you to think in a totally different way, especially with rendering, performance, and player feedback.
And hey, it’s fun to build something new!
🎯 What’s Next?
Not sure - maybe more games? Maybe rewrite this one once I figure out what deltaTime
actually means?
But for now, I'm happy with how it turned out. I hit my goal: make a working game. No frills. Just fun.
💬 Check it out and let me know what you think!
If you're a React dev curious about game development, I’d totally encourage you to give it a try. You don't need Unity or Unreal to start messing around with fun ideas - a browser and some caffeine will do.
ps: It works better on mobile view!
Thanks for reading! 🚀
Top comments (0)