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!

This talk has been presented at React Summit 2024, check out the latest edition of this React Conference.

FAQ

Bjarke Felbo is the co-founder and CTO of Dusk and the co-organizer of React Jam. He is experienced in using React for game development and is enthusiastic about the potential of React in making games.

"Cooking Frenzy" is a multiplayer 3D game made using React FreeFiber, and "Pipeline Panic" is a multiplayer game made using plain React. Both games won the Dusk multiplayer challenge in different editions of React Jam.

Making games with React is a fun way to improve your React skills and showcase your programming talents. It allows you to create visually appealing games without needing to learn new languages or frameworks.

React offers features like hot reloading, unit tests, and powerful dev tools that are not commonly available in traditional game development environments like Unity. This makes the development process faster and more efficient.

When making games with React, it's important to manage re-rendering efficiently to maintain performance, especially for fast-paced games. Additionally, handling imperative changes can be tricky, but libraries like Timeline Composer can help.

You can create DOM-based games, 2D games using ReactPixie, and 3D games using React FreeFiber. These libraries use WebGL and WebGPU, but provide high-level abstractions to make game development easier.

You can join the React Jam community by signing up for the email list on reactjam.com. You can also participate in the community by checking out the games made by others, getting advice, and joining discussions on Discord or Twitter.

The best way to get started is by remixing open-source games made with React. There are many open-source projects available, and Dusk has set aside $100,000 in grants to support more open-source web games.

React Jam is an online event for React developers where participants create games in 12 days. Contestants can win cash prizes and enjoy a collaborative environment where developers cheer each other on and make incredible games using React.

More information about React Jam and React game development can be found on the reactjam.com website, where you can see past winners, get advice, and sign up for updates. You can also connect with the community on Discord and Twitter.

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
Watch video: Optimizing HTML5 Games: 10 Years of Learnings
PlayCanvas is an open-source game engine used by game developers worldwide. Optimization is crucial for HTML5 games, focusing on load times and frame rate. Texture and mesh optimization can significantly reduce download sizes. GLTF and GLB formats offer smaller file sizes and faster parsing times. Compressing game resources and using efficient file formats can improve load times. Framerate optimization and resolution scaling are important for better performance. Managing draw calls and using batching techniques can optimize performance. Browser DevTools, such as Chrome and Firefox, are useful for debugging and profiling. Detecting device performance and optimizing based on specific devices can improve game performance. Apple is making progress with WebGPU implementation. HTML5 games can be shipped to the App Store using Cordova.
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
This Talk explores the use of Babylon.js and WebXR to create immersive VR and AR experiences on the web. It showcases various demos, including transforming a 2D game into a 3D and VR experience, VR music composition, AR demos, and exploring a virtual museum. The speaker emphasizes the potential of web development in the metaverse and mentions the use of WebXR in Microsoft products. The limitations of WebXR on Safari iOS are discussed, along with the simplicity and features of Babylon.js. Contact information is provided for further inquiries.
Making Awesome Games with LittleJS
JS GameDev Summit 2022JS GameDev Summit 2022
34 min
Making Awesome Games with LittleJS
Top Content
Little.js is a super lightweight and fast JavaScript game engine that has everything included to start making games right away. It has a tiny footprint and no dependencies, making it perfect for size-coding competitions like JS13K. Little.js is built with an object-oriented structure and comes with several classes. It provides a fast rendering system, a comprehensive audio system, and various starter projects for different game types. Little.js is designed to be simple and easy to understand, allowing you to look at and modify the code.
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!
Top Content
The Talk discusses ways to boost the performance of WebGL Unity games, including issues with bundle size, memory usage, and runtime performance. It suggests using Brotli for compression and non-exception support for better performance. Choosing the appropriate texture compression format and experimenting with separate builds can also help. The Talk also covers optimizing textures, models, audio, and assets by reducing build size, using compression, disabling unnecessary models, and optimizing audio quality. Unity's optimization tools and profilers are recommended for analyzing performance and memory issues.
How Not to Build a Video Game
React Summit 2023React Summit 2023
31 min
How Not to Build a Video Game
Watch video: How Not to Build a Video Game
The Talk showcases the development of a video game called Athena Crisis using web technologies like JavaScript, React, and CSS. The game is built from scratch and includes features like multiple game states, AI opponents, and map editing. It demonstrates the benefits of using CSS for game development, such as instant load times and smooth transitions. The Talk also discusses optimizing performance, supporting dark mode, and publishing the game to other platforms.
Increase the Performance of Your Games using Canvas
JS GameDev Summit 2023JS GameDev Summit 2023
8 min
Increase the Performance of Your Games using Canvas
The Talk discusses the use of the canvas element in games and web applications to improve performance. It compares the Canvas API and WebGL API, highlighting the advantages and disadvantages of each. The Canvas API allows for both CPU and GPU rendering, while WebGL API only uses GPU and hardware acceleration. Using the canvas element can significantly enhance performance, but it comes with increased complexity and development costs.

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.
Tiny Game Live Coding Workshop
JS GameDev Summit 2023JS GameDev Summit 2023
115 min
Tiny Game Live Coding Workshop
Workshop
Frank Force
Frank Force
Dive into the captivating world of micro-game development with Frank Force in this interactive live coding workshop. Tailored for both seasoned developers and curious newcomers, this session explores the unique challenges and joys of creating games and demos with extreme size constraints.