Using React with the Godot Game Engine

A talk I gave in February 2024 at SeattleJS about creating a React renderer that could produce Godot’s UI components from React JS code. It went into React reconcilers, how to use Javascript to script C# (which is itself used to script the C++ engine), and the nuances of how React performed updates and getting that to sync with Godot’s update loop.

Code

All code for the Godot renderer, and referenced in the talk, can be found at https://github.com/a-morphous/react-godot-example.

Note that the code is not really meant or ready for production.

Slides

Originally created in Keynote, later exported to PDF for easier viewing if you don’t own Keynote: Keynote | PDF

This was the original description on the SeattleJS site:

Godot is a game engine and editor that is written in C++ and allows you to script games using its custom GDScript language, or C#. So, naturally, I decided that I wanted to make game UI in Javascript using React, and it turns out that that’s not that uncommon of an idea! And also not that terrible of an idea! This talk will go through some of the nitty gritty of getting C# and JS to talk to each other, and then creating a custom React renderer to render Godot UI elements.