Coding Standards I use in 2024
Ben UI
by ben ui
1w ago
I have changed a bunch of my coding standards over teh year. The most important thing is usually to follow whatever your company does. That being said, these are some things that I have grown to adopt. All of these are suggestions, things to try out. I'm describing things that work for me, not telling you how you "must" do things. Includes Include What You Use Unreal Engine moved to Include What You Use (shortened to "IWYU") at least a while ago. At first I wasn't really sure what it meant in concrete terms. For me I understand it to mean only include headers where you absolutely have to. Don ..read more
Visit website
UX Opinions
Ben UI
by ben ui
1w ago
Every so often I get full of myself and come up with a UX Opinion. Despite not being a UI or UX expert. These are those. Most of these are pretty desktop-mouse-and-keyboard-centric. Buttons If a UI element is interactable, the cursor should change when mousing over it. Ideally it should change to some sort of pointing hand ? to match the web. If a UI element is interactable, its appearance should change on hover. Any clickable UI element should have visually distinct states for: normal, hover, mousedown and mouseup (confirm). If a button is disabled, the tooltip or clicking it should explain ..read more
Visit website
Know, Do, Feel
Ben UI
by ben ui
1y ago
Slides ..read more
Visit website
Know, Do, Feel (Slides)
Ben UI
by ben ui
1y ago
Video Slide controls: Input Action Arrow keys Change slide F Fullscreen (you may first need to click to focus) S Presenter view O/Escape Overview mode ..read more
Visit website
Add UWidgets to a UserWidget using C++ in the Editor
Ben UI
by ben ui
1y ago
Have you ever wanted to build the contents of a UUserWidget in the editor using C++? For example imagine you want to create a gallery widget and you need 20 buttons with correct names. You could create them by hand, but it's slow and error-prone. The example below shows how to create widgets inside a User Widget blueprint, from C++, and correctly update the widget tree so the new widgets can be selected. Huge thanks to @Sharundaar for sharing how to do this in my Discord, and allowing me to share it here. Edit: It's worth mentioning that if you're trying to fill out a list, tree or grid in the ..read more
Visit website
Show TMap Entries in the Same Row
Ben UI
by ben ui
1y ago
Unreal Engine will in general display TMap entries with the key and the value in the same row. For example TMap with keys that are FString, FName, int32, even UTexture will all be displayed with the key and value together. UPROPERTY(EditAnywhere) TMap<FString, int32> StringTMap; UPROPERTY(EditAnywhere) TMap<FName, int32> NameTMap; UPROPERTY(EditAnywhere) TMap<int32, int32> IntTMap; UPROPERTY(EditAnywhere) TMap<UTexture*, int32> TextureTMap; The Problem However FGameplayTag and custom structs will be displayed with the key and value on separate lines. Yuck. USTR ..read more
Visit website
Inheritable TMap
Ben UI
by ben ui
1y ago
Imagine you're building an RPG and you want to define stats for different enemy types like wolves and spiders. You could do this with hierarchical data like this: UEnemyDataAsset - BP_EnemyBase // Blueprint subclass - BP_WolfBase // Blueprint subclass - BP_SpiderBase You could define the stats for each enemy type with a simple TMap<FGameplayTag, int32> and then override the values in child classes. BP_EnemyBase TMap<FGameplayTag, int32> Stats hp = 10 legs = 2 BP_WolfBase: TMap<FGameplayTag, int32> Stats (Modified) hp = 8 l ..read more
Visit website
What's the deal with Verse?
Ben UI
by ben ui
1y ago
Disclaimer: My aim here is to summarize the most recent Verse information and translate some of the more technical parts into concrete examples for an audience familiar with C++. This is based on what they have announced as of December 2022, and my own limited interpretation of it. tl;dr: I'm kind of stupid, I get stuff wrong a lot. Verse is an as-yet unreleased language from Epic. It was first announced in December 2020, and not much was known about it until last week one of the authors Simon Peyton-Jones gave a talk at a Haskell convention, so now we have a lot more information! If you have ..read more
Visit website
How to Use Mastodon, as an Unreal Engine Dev
Ben UI
by ben ui
1y ago
I created my main Mastodon account back in 2020, but I didn't really use it until the last few months. I've typically shared things I made on Twitter and learned so much there, but as Twitter has become less and less stable I've been looking around for somewhere else to make connections. I think that Mastodon has a lot of potential for building an online Unreal Engine community. So far I've found it a really different vibe to Twitter, a lot more small and cozy. A lot of fellow devs have expressed interest but found Mastodon hard to get into, so hopefully this will help anyone interested in try ..read more
Visit website
How I Stopped Being Terrified of Slate
Ben UI
by ben ui
1y ago
This is a presentation I gave for the JetBrains GameDev Day Online 2022 event. The slides are embedded above, click the arrows in the bottom-right to navigate, or us the keyboard shortcuts mentioned below. GitHub repo Slide controls: Input Action Arrow keys Change slide F Fullscreen (you may first need to click to focus) S Presenter view O/Escape Overview mode ..read more
Visit website

Follow Ben UI on FeedSpot

Continue with Google
Continue with Apple
OR