React Jam and Why React Is Awesome for Making Games

Rate this content
Bookmark

React started as a web rendering library, but its benefits and ease of use has made it find its way into many other domains, including now games! Yes, React is not what you'd traditionally use for making games, but it’s actually great for it. This talk will talk about the popular React Jam, a 10-day game jam for making games using React, and the pros/cons of using React for games. Listen in to hear how you can easily make a game using everyone’s favorite web library!

Bjarke Felbo
Bjarke Felbo
7 min
18 Jun, 2024

Comments

Sign in or register to post your comment.

Video Summary and Transcription

React Jam is an event that showcases the awesomeness of using React for game development, with options for DOM-based, 2D, and 3D games. React offers development tools and optimizations for game development, along with a supportive open-source community. Participating in React Jam and creating games with React can improve skills and provide opportunities to showcase programming abilities.

1. Introduction to React Jam

Short description:

Hey, everyone. I'm Bjarke Felbo, co-founder and CTO of Dusk. Today, I'll talk to you about React Jam and why React is awesome for making games. I'll cover the high-level intro to React Jam and how you can make games using React, WebGL, and WebView. I'll also discuss the ease of getting started in game development with React and the impressive libraries you can use. Check out the winners of the last React Jam and discover the various ways to make games with React. You can create beautiful games using DOM-based React, ReactPixie for 2D games, or React FreeFiber for 3D games using WebGL and WebGPU. Share your game with others and experience faster gameplay compared to other game development platforms. Let me showcase two incredible games made during the Winter React Jam: Cooking Frenzy and Pipeline Panic.

Hey, everyone. I'm Bjarke Felbo, co-founder and CTO of Dusk. Most importantly in this context, I'm co-organizer of React Jam. I'm super excited to talk to you all about React Jam. Why React is awesome for making games. I'll talk about a few different things in this lightning talk. Start off with a high-level intro to React Jam, how it's possible to make games using not only DOM, but also WebGL and WebView, all within the context of using React.

Then I'll talk about how easy it is to get into making games with React and the awesome libraries that you can build upon. I'll talk a bit about some of the things to be aware of, and then I'll finally talk about how you can get started by remixing open-source games. Let's get into it. First off, what is React Jam? React Jam is an online event for React devs where you make games in 12 days. You can win cash prizes and it's also just loads of fun. Lots of devs cheering each other on and making incredible games using React. Just collaborating, helping each other out. It's awesome.

The last React Jam just ended, so definitely go check out the winners. They're crazy impressive. I wanted to highlight that there's many different ways of making games with React. You can do DOM-based games, plain React, but you can also use ReactPixie to make 2D games or React FreeFiber to make 3D games. Both of these libraries are using WebGL and WebGPU under the hood, but you have it easy as you can just use the high-level abstraction. And the beauty of all this is that you just share a link to your game with anyone and it just runs. It's much, much faster for the player to get right into the action compared to, for instance, making a game with Unity on Unreal. You can make really beautiful games.

Here's the Dusk multiplayer challenge winner of the Winter React Jam. It's running inside a Dusk app, which helps make the game multiplayer. The game is called Cooking Frenzy and it's made by MotherPix. It's a beautiful multiplayer 3D game where you're playing together, trying to cook recipes that this hungry panda wants to eat. And the crazy thing is, this game was made using React FreeFiber in just 10 days. Here's another great game, Pipeline Panic, made using plain React by Jason and Gustavo. It's a multiplayer game where you're together building a pipeline to the React water.

2. Exploring Games with React

Short description:

This game won the Dusk multiplayer challenge in the Fall edition of React Jam, showcasing the beauty of games made using React. Building games in React is an easy way to try out game development without the need for additional frameworks or languages. React provides development tools like hot reloading and unit tests that are not commonly available in the game development world. Use React optimizations to avoid unnecessary rerendering in fast-paced games and explore libraries like Timeline Composer for imperative changes. The open-source game community in React offers inspiration and opportunities to get grants for creating your own games.

This game won the Dusk multiplayer challenge in the Fall edition of React Jam. And this retro-style game was made using good old React that you all know about. It's very easy to get into making a plain React game because you don't even have to learn the framework or anything. And as you can see, they can look beautiful.

Building games in React is a really easy way to try out game devs. You don't need to learn Unity, Unreal, don't need to learn a new language, don't even need to learn a new JS framework. You literally just use the components like you're used to. It's important to highlight that we take all these DX things for granted, hot reloading, unit tests, all the power of React dev tools. But that's actually not a common thing in the game dev world. If you want to make a game using Unity, it's actually really painful to, for instance, get hot reloading and fast builds working nicely. And it just comes for free in this web dev context.

There's lots of great libraries for all sorts of things for React, and you can use all of them for a game dev. Rerendering is always important, as you know, for any app, but it's particularly important to avoid in games, as the game state may change frequently, up to 60 times per second for fast-paced games. So you've got to be super careful that you're only rerendering the exact components that you need using some of the React optimizations like memorization, if you're building a fast-paced game. If you're building a slower-paced game, you can be more chill.

Another tricky thing that can be a little hard to do in games made using React is imperative changes. Doing a sequence of changes like this can be a little tricky in React. But actually, one of the React Gem winners shared this nice library called Timeline Composer to do sequences of imperative changes like that in React-based games. So it's really cool to see the ecosystem help out, alleviate any pain points around games with React by building all these different libraries. The best way to get started is by messing with other people's code. There's lots of great open-source games already out there made using React. In fact, I helped start this initiative to set aside $100,000 in grants to make more open-sourced web games. And if you search for Dusk open-source grants, you'll find a long list of open-source games that you can be inspired from. And many of these games are made using React. You can even apply to get a grant yourself to make an open-source game. Finally, I just want to call out the obvious.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Optimizing HTML5 Games: 10 Years of Learnings
JS GameDev Summit 2022JS GameDev Summit 2022
33 min
Optimizing HTML5 Games: 10 Years of Learnings
Top Content
The open source PlayCanvas game engine is built specifically for the browser, incorporating 10 years of learnings about optimization. In this talk, you will discover the secret sauce that enables PlayCanvas to generate games with lightning fast load times and rock solid frame rates.
Building Fun Experiments with WebXR & Babylon.js
JS GameDev Summit 2022JS GameDev Summit 2022
33 min
Building Fun Experiments with WebXR & Babylon.js
Top Content
During this session, we’ll see a couple of demos of what you can do using WebXR, with Babylon.js. From VR audio experiments, to casual gaming in VR on an arcade machine up to more serious usage to create new ways of collaboration using either AR or VR, you should have a pretty good understanding of what you can do today.
Check the article as well to see the full content including code samples: article. 
Making Awesome Games with LittleJS
JS GameDev Summit 2022JS GameDev Summit 2022
34 min
Making Awesome Games with LittleJS
LittleJS is a super lightweight game engine that is easy to use and powerfully fast. The developer will talk about why he made it, what it does, and how you can use it to create your own games. The talk will include a demonstration of how to build a small game from scratch with LittleJS.
How Not to Build a Video Game
React Summit 2023React Summit 2023
32 min
How Not to Build a Video Game
In this talk we'll delve into the art of creating something meaningful and fulfilling. Through the lens of my own journey of rediscovering my passion for coding and building a video game from the ground up with JavaScript and React, we will explore the trade-offs between easy solutions and fast performance. You will gain valuable insights into rapid prototyping, test infrastructure, and a range of CSS tricks that can be applied to both game development and your day-to-day work.
Boost the Performance of Your WebGL Unity Games!
JS GameDev Summit 2023JS GameDev Summit 2023
7 min
Boost the Performance of Your WebGL Unity Games!
Unity, when deployed on the web, faces three critical challenges: build size, memory usage, and overall performance. This lecture delves deep into advanced optimization techniques to help you address each of these issues. Attendees will gain insights into:
- Effective strategies for optimizing textures, audio, and models.- A detailed analysis of our ASTC experimentation with Unity, shedding light on the unexpected results despite Unity's claims.- A comprehensive guide to Unity's memory profiling tool and its implications.- An exploration of lesser-known Unity settings that remain underutilized by many developers.
Additionally, we'll introduce our proprietary tool designed specifically for Unity optimization. We will also showcase CrazyGames' developer dashboard, our platform that enables developers to monitor and enhance the performance of their web-based games seamlessly. 
Join us to equip yourself with the latest strategies and tools to elevate your Unity web gaming projects.

Workshops on related topic

Make a Game With PlayCanvas in 2 Hours
JSNation 2023JSNation 2023
116 min
Make a Game With PlayCanvas in 2 Hours
Top Content
Featured WorkshopFree
Steven Yau
Steven Yau
In this workshop, we’ll build a game using the PlayCanvas WebGL engine from start to finish. From development to publishing, we’ll cover the most crucial features such as scripting, UI creation and much more.
Table of the content:- Introduction- Intro to PlayCanvas- What we will be building- Adding a character model and animation- Making the character move with scripts- 'Fake' running- Adding obstacles- Detecting collisions- Adding a score counter- Game over and restarting- Wrap up!- Questions
Workshop levelFamiliarity with game engines and game development aspects is recommended, but not required.
PlayCanvas End-to-End : the quick version
JS GameDev Summit 2022JS GameDev Summit 2022
121 min
PlayCanvas End-to-End : the quick version
Top Content
WorkshopFree
João Ruschel
João Ruschel
In this workshop, we’ll build a complete game using the PlayCanvas engine while learning the best practices for project management. From development to publishing, we’ll cover the most crucial features such as asset management, scripting, audio, debugging, and much more.
Introduction to WebXR with Babylon.js
JS GameDev Summit 2022JS GameDev Summit 2022
86 min
Introduction to WebXR with Babylon.js
Workshop
Gustavo Cordido
Gustavo Cordido
In this workshop, we'll introduce you to the core concepts of building Mixed Reality experiences with WebXR and Balon.js.
You'll learn the following:- How to add 3D mesh objects and buttons to a scene- How to use procedural textures- How to add actions to objects- How to take advantage of the default Cross Reality (XR) experience- How to add physics to a scene
For the first project in this workshop, you'll create an interactive Mixed Reality experience that'll display basketball player stats to fans and coaches. For the second project in this workshop, you'll create a voice activated WebXR app using Balon.js and Azure Speech-to-Text. You'll then deploy the web app using Static Website Hosting provided Azure Blob Storage.