I’ve been wondering about ditching electron on narrat, mainly for those reasons:
- It’s got a very tedious API and is kind of clunky and buggy to work with
- It ships chromium with every game making games be hundreds of megabytes even if empty
- It has a weirdly bad ecosystem of tools to make good apps.
- I literally still can’t tell people to use
pnpm
despitenpm
being really bad, because electron does some weird arcane stuff innode_modules
which for some reason doesn’t work when usingpnpm
- After having tried more modern alternatives to electron I’ve realised they’re so much better to work with, and a lot of the things I’m doing in the narrat IDE would tie together a lot better with the games themselves if everything used Tauri, rather than having games use electron and the IDE using Tauri
The narrat editor was made with Tauri as a test, and it’s been great to work with. It’s a much more modern workflow and enables lots of cool stuff. (There is still a test release of the narrat editor if anyone is interested, it’s kind of working but I haven’t had more time to work on it for the moment).
So I’m thinking of changing the game template to work with Tauri by default, and maybe also provides instructions or a separate template on how to use electron, I don’t know. Technically the majority of the work to support either is not really in narrat but just in the game template, as your game project is really what’s in control of electron.
There are a few problems with this though:
- Alternatives to electron like Tauri work by using your native browser. This is great to not ship all of chromium, but it means different platforms behave differently. Instead of only testing on Chrome, for example, you’d have to test on Safari for macs.
- I don’t think there is any functioning integration for the Steamworks API for Tauri. I could make one (or someone else could, if anyone knows Rust and wants a project ) but that’s a whole thing. At the same time, no one is shipping on steam at the moment
So I don’t think it would be a good idea to completely ditch electron, but I am definitely tempted to at least make it not be the default setup anymore… any thoughts?