Comfy
Comfy is a fun 2D game engine built in Rust. It's designed to be opinionated, productive, and easy to use.
Install / Use
/learn @darthdeus/ComfyREADME
What is comfy?
Comfy is now archived until further notice. There's a few reasons for this. Mainly, due to real life circumstances I have much less time/capacity to dedicate to side projects. After abandoning Rust for gamedev Comfy became a small side project for fun, and while this worked for a little while, it's no longer the case, and I just don't have the energy to constantly play catchup to the Rust ecosystem.
Update Oct 24, 2025
It's been a year since the last update, and since some people still find comfy and read my content and make conclusions, I feel obligated to add more to up date information, as I've had many people ask me about C++ over the past year.
TL;DR: I'm no longer using C++, but instead built my own programming language that compiles down to Lua, run it through LuaJIT to get FFI, to call into my own very small very simple C OpenGL game framework (GL/SDL/Soloud/Imgui), with full hot reloading support on the Lua side, full LSP with completion, diagnostics, etc. For those that care, the language's compiler is built in Rust, it's called Rock, and no it's not opensource.
The whole Comfy experience has taught me many things, one of those being that I really don't want to be an opensource maintainer, and that while I very much enjoy the community aspect and talking to people, I also really don't like being responsible for other people's projects not working. At this point I'm pretty sure I did it for the wrong reasons, and that while I enjoyed the attention, I didn't enjoy the process of it.
With Rock, I've built something that's meant just for me, where I don't have to justify any of my choices to anyone, and where I can write sloppy code to move past obstacles I don't care about. While I may be a perfectionist in spirit, the more actual code I write the more I realize that I just don't care enough to be a perfectionist in practice. There's too many things I want to do in life to spend my energy on things that I don't find meaning in.
That being said, Rock might some day (maybe in not so distant future) become available through binary released in a closed beta (similar to Jai). Not because I want to build my own cult following (even tho I might enjoy that), but because I want to put my energy into interacting with people who care at least a little bit.
If this is something you'd be interested in, feel free to reach out to me. I'm not going to put any contact information here. If you care enough, you can figure it out, it's not that hard :)
I'm not promising anything, the whole thing is a big desperate experiment after spending 20+ years trying every programming language I could get my hands on, and finally realizing that it's just easier to build my own. Many things are ugly and don't work, so if you want to try it, don't expect perfect tutorials and hand holding, and don't expect timely responses from me when you run into issues. But all things considered, this is something I'm using to build an actually playable game.
In either case, chances of me coming back to Comfy at this point are basically zero. It has served its purpose and taught me many things about gamedev, programming, and life. May it rest in peace :)
Update Sep 8, 2024
It might not be obvious how much effort it takes to manage bugfixes in dependencies where every few weeks there's a new breaking API change in egui/winit/wgpu, and while these probably seem extremely minor to those who spend all their time building an engine on top of said libraries, sinking a day or two in figuring things out and fixing stuff on every release is a gigantic waste of time in my view.
At this point I've fully switched to developing games in C++, and I'm very happy with this choice. There's a chance I might come back to Comfy and fix some of the current issues, but as of right now I really don't want to do that.
I'd suggest those using Comfy to simply fork the repo and adopt things to their needs. The code should be simple enough for anyone who really cares to just do things and add/remove stuff without too much friction.
But mainly I'd just suggest people either use Macroquad, or roll their own solution on top of OpenGL. Both of these are good choices for 2D. If you're making a 3D game, well, you better know what you're doing :)
As a small tangent, personally, I've lost all faith in WebGPU/wgpu for 2D games, and am really really really happy in OpenGL land in C++. I'm not saying C++ is a good language, and I'd probably suggest people use C# with MonoGame/FNA (which I've tried and works with hot reloading), or just use SDL/OpenTK or some variant (haven't tried too much, but I can't imagine there being major issues).
Mainly, if your goal is to make a game, focus on the game and not the tech. Rust is a fun language, but please make your own decisions, instead of just following what the loud groups of people say. I can't count how many times people told me "but what about segfaults???" when I said I was switching from Rust & C# to C++, and honestly, segfaults are the least of my issues. Null pointers are also a complete non issue. At the risk of being controversial, I have very little faith in the experience of people saying this, because it seems that people outside of the Rust community also don't really consider these to be "a huge deal" compared to what the Rust community makes it sound like.
Currently there's many performance improvements on Comfy's master branch that haven't been released yet. If you're struggling with performance, consider using the master branch. More info can be found in the CHANGELOG.
If you're new here, check out the comfy announcement on our blog and the v0.2 release announcement.
Comfy is a fun 2D game engine built in Rust. It's designed to be opinionated, productive, and easy to use. It uses wgpu and winit, which makes it cross-platform, currently supporting Windows, Linux, MacOS and WASM. Inspired by macroquad, Raylib, Love2D and many others, it is designed to just work and fill most of the common use cases.
Warning: comfy is currently under heavy development. While there are games already being made using comfy, the API is not yet stable and breaking changes will happen. If you want to use comfy for your game you may be forced to dig into the source code and possibly tweak things manually. That being said, the source code is designed to be simple and modifiable. If you want to make a game jam game comfy is definitely mature enough.
comfyis named comfy, because it is very comfy to use.
use comfy::*;
simple_game!("Nice red circle", update);
fn update(_c: &mut EngineContext) {
draw_circle(vec2(0.0, 0.0), 0.5, RED, 0);
}
The ultimate goal of comfy is to do the obvious thing as simply as possible without unnecessray ceremony. If something is annoying to use, it is a bug that should be fixed. We're not necessarily aiming at beginner friendliness, but rather productive and ergonomic APIs. If you're a beginner, comfy should be easy to pick up, but it might not be as polished as some of the other alternatives. The goal of comfy is ultimately not polish, cleanliness of API, clean design, type safety, extensibility, or maximum features. It's an engine that gets out of your way so you can make your game.
There is nothing that fundamentally prevents comfy from becoming a 3D engine, but the last thing we want is to try to fight rend3 or bevy in terms of PBR accuracy or skeletal animations. Comfy is not fighting against Unreal Engine 5. It would be nice if simple stylized 3D games were ultimately possible, but we want to get all of the basic building blocks for 2D first. Some internals of comfy (batching and z-sorting) will need to be re-implemented to allow for this and ultimately more performant rendering techniques, but this should not happen at the cost of API clarity and ergonomics for most games.
Features
- Simple and productive API.
- Immediate mode rendering for sprites, text and shapes with automatic
batching. If you want to draw a circle, you call a function
draw_circle. - 2D lighting with HDR, tonemapping and bloom.
- Built-in support for z-index, meaning you don't have to worry about the order of your draw calls.
- egui support built in.
- Parallel asset loading with support for most image and audio formats.
- No complex ECS or abstractions to learn. Just build your game and let comfy get out of your way.
- Simple audio using kira. If you want to
play a sound, you call a function
play_sound. - Simple 2D camera.
- Particles, both simple API for individual particles & systems with lots of options.
- Trails with a custom mesh & scrolling texture.
- Text rendering (currently using egui).
- Lots of utilities for common tasks.
Design goals & philosophy
- Heavy focus

