Download

Should you use Slate or roll your own UI?

I am curious on peoples opinions on this. Currently my “for fun” project is to get the original space invaders game to run of a UTextureRenderTarget2D. Put it in DecalActor, aim at it with your cursor, and you can use the keyboard to play. I thought this would be a good learning project on how the rendering system works, etc.

So far, I have it updating property, figured out how to use FRunnable to thread the emulator, and its ruining a test rom I have. However, I had to add RHI module to my addon to update the texture. I am wondering if its better to use Slate.

I have always had a bad habit of trying to reinvent the wheel when I program, and while this sample doesn’t call for using Slate, I could see it being used for loading a different rom, for example, using a gui. I just don’t like to add library’s to my programs that I don’t necessarily use all the functions of. Like using the libpng library instead of FreeImage to open the file, even if FreeImage would of made coding easier:P

I have a feeling people are going to say “Just use Slate” but I just wanted to see other opinions on this if my line of thinking is just wrong.

PS - As a side not its hard to find code with C++ implementations of CPU emulators. I am not agensit C per-say, just that most of these emulators use static vars for their emulators and makes it not very thread safe:P

If you just need a simple interface, you don’t need Slate. E.g. Load screen, a few buttons, Esc to exit, etc. can all be done with blueprints and HUD calls.

If you need an interface as fully featured as, well, Unreal Editor itself (it’s a Slate app, after all), and for free, it is a good choice. Unfortunately, it is a little thin on documentation and examples at this time.

If you need AAA-grade UI, and you have the budget and skillset, then ScaleForm is probably the better bet.

EDIT: And I would be remiss to not mention Coherent UI, which is an HTML UI renderer, used in Unity as a plugin, and currently being ported to UE4. Not free, tho.

EDIT2: Have you checked the Blueprint_HUD level in Content Examples?

Yea, Its not bad but just a bit simplistic. Been looking at most of the Slate code and your right, its Free. It also looks fairly straight forward to use, though this is after wading though the code for the past week.

I really want is someone to describe the order things are run off Actors though. I keep crashing my video driver when I try to update the texture for my screen, but if I update it off a UTexture2D, Update the Resource then copy that agents it, it works fine. The catch is though, that recreating that Resource is time comsuming and doing it 30 frames a sec, ugh.

But then I look at the FSlateTexture and it does eveything I want right there:P

As someone who’s spent the last three months doing basically nothing but Slate, it’s really aimed at making “application” style interfaces, though with enough effort you can make it anything you want. If you want that style of interface it’s reasonably straight forward to use, though it can get really messy really quickly.

That being said, if something like CoherentUI happens then it’s probably a more flexible and usable option than Slate.

I’m holding off as long as possible before doing the GUI on my game because as of now I don’t think Slate is usable for a Game UI. I don’t think the developers who made it were thinking about making games with it, they were thinking about making an Editor with it.

In a game I am designing I actually need a menubar/toolbar portion that is multi-platform, hence my interest in Slate. I have a lot of prototyping to do and want to hold off investing in the GUI for now.