Can I use UE4 or UE5 source engine/code to make a game without needing to use the UI?

I want to use UE like I would with GLFW or SFML. I don’t want a UI like Unity. Is it possible to program my game in C/C++ using the core libraries of UE? I want to create a game quickly, but want to know everything that’s going on behind scenes.

Like, hypothetically, this might be possible, but your workflow will be ridiculously slow. The engine is most definitely not designed for this.

Both of those libraries you mention are just that - small, specialized libraries. Unreal is a complete engine with a lot of tools around it. It’s literally millions of lines of code. And if you want to know “everything” that’s going on behind the scenes, then best of luck to you, I doubt there is a single engineer at Epic who could tell you even a high-level overview of how every single subsystem works.

Some problems off the top of my head:

  1. You couldn’t Play-In-Editor, so you’d probably have to package your game to see every single change that you make.

  2. You’d literally have to make all assets in-code, which would be a giant pain in the butt.

  3. Creating levels would be nearly impossible, placing each asset into the scene in-code and packaging to see the results.

  4. Material editor is UI-only, getting custom, HLSL shaders to work is possible, but very complicated

All in all, you’d be literally throwing away pretty much all advantages of Unreal.

Using Unreal this way made me think of a parallel - you’re trying to get somewhere and want to use a bicycle. So you get a sports car, take it apart and start building a bike with the parts, so you can get there on a bicycle.

Give the UI a try. Unreal is a good tool for making one-man games. It has some quirks and you will defiinitely not understand everything that’s going on, but it’s IMHO the fastest way to get going. And you can do a lot from the C++ side, but trying to avoid the UI completely would be unreasonable.