2D Unreal Course: Why isn't music or text boxes or dialogue covered?

So I finally finished pt 2 (Gun Survivors). I’m excited to start pt 3 (Crusty Pirate), and watched the intro video to the section. It looks great and I’m excited, but I’m a little confused on why we don’t do background music? We briefly touched on it in Pt 1 (Desert Racer) but nothing for pt 2. Also, what about dialogue boxes? What if we wanted to do something like Castlevania 2 or Symphony of the Night and have dialogue?

Why doesn’t this course touch on those things? Are there resources where we could learn how to do those for 2D games? I’d eventually like to make an RPG and a beat-em-up, so music and dialogue are going to be very important.

Hi Robert,
I think music is covered in the third section - at least I added some myself but it is really easy to add music anyway. Basically spawn the music in a game instance as it persists during restarts which is good.

A blueprint SpawnSound2D should do the job for that inside your game instance.

As for dialogue, it is a little more complex and you’d probably need a whole section to add it in. None of these games really warrant it (maybe crusty pirate but you don’t interact with NPCs) but really it’s just a UI widget that would react to a button/key press and show some text.

If you’re talking about dialogue where you can communicate and make choices, this is actually a whole course on its own (see the RPG Unity Dialogue and quests course as an example of this) as you then need to implement decisions and dialog branches and so on.

Hope this makes sense.

gotcha. is GameDev going to offer this anytime soon for Unreal? I think a C++ RPG course (preferably 2D but 3D would work too) that covers things like:

  • overworlds
  • dungeons
  • combat
  • leveling up
  • music
  • sound effects
  • dialogue
  • battle over / exp screens
  • towns
  • shops
  • npcs

would be extremely useful and valuable.

People have been asking for as long as I remember, or at least when the Unity courses became available. I recall the instructor (Sam) worked on the courses over 4 or more years so it is a huge undertaking to design the courses, curate the assets and record the lectures.

It’s now a little dated but I agree this would go down a storm. it covers most of the above content, not all.

For Unreal, Action Combat course (C++) covers combat and the Blueprint Survival course covers inventories, crafting and harvesting mechanics. the Blueprint Stealth course touches on level design and stealth combat, sensors (traps of a sense) and stuff like that. Action Adventure covers a bit of this stuff too.

So, there isn’t much that isn’t covered, you just have to stitch it all together. the dialogue is a big topic. NPCs are just AI-based characters with a collider that lets you interact with them, trigger talk or whatever, and levelling, well, that is the GAS part of UE - the Gameplay Ability System. It’s a massive topic to cover on its own.

Music and Sound - these are the most basic of things and pretty much most of these courses cover aspects of the sound/music. I know stealth covers normal music and then detected music when you trigger an alarm or are spotted by one of the enemies.

So, it may not be a single course but a lot of what you need is here. GAS is probably the biggest gap, then dialogue and lastly shops. The rest is already there. Of course, none of these is 2D.

well, thinking about it…shops and towns probably won’t be too different from changing screens in a platformer. you enter a house/shop and you’re changing maps (I assume).

I think Dialogue is the tricky thing. I’ve been searching for an hour and there seems to be no consistent way to do it. Closest I got was this:

This method provides more flexibility for designing complex dialogs.

  • Create a Widget Blueprint: Design your dialog box using UMG widgets in the blueprint editor.
  • Create a C++ Class to Manage the Dialog:
    • Add a function to create and display the widget.
    • Use FSlateApplication::Get().AddModalWindow() to make the dialog modal.
    • Handle button clicks and other interactions in the widget’s blueprint events.

C++

#include "Blueprint/UserWidget.h"
#include "Slate/SGameLayerManager.h"

void YourFunction(){   
 if (UYourDialogWidget* DialogWidget = CreateWidget<UYourDialogWidget>(GetWorld(), YourDialogWidgetClass))   
 {        
// Add the dialog widget to the viewport       
 GEngine->GameViewport->AddViewportWidgetContent(            
SNew(SOverlay)            
+ SNew(SBox)            
.HAlign(HAlign_Center)          
  .VAlign(VAlign_Center)           
 [                
DialogWidget->TakeWidget()           
 ]       
 );       
 // Make the dialog modal       
 FSlateApplication::Get().SetAllUserFocusToGameViewport();    }}

that doesn’t seem to completely answer my question. So it seems I could create a dialogue box in the widget editor, like in Gun Survivors we created the score area and the mouse pointer. That makes sense.

I’m also assuming that we could throw text at it like we did with the scoring system…but then it becomes overwhelming. So the function creates the dialogue box? So if we click on a shopkeeper this function would call the box we created in the editor? But then how do we have the dialogue show up? should we use a struct for multiple lines of dialogue? how do we keep track of what has already been said?

What you really want is something like this:
Dialogue Plugin | Fab

Or possibly this:
Blueprint Dialogues | Fab

I can’t say what the price is or if they are free - I suspect they are not free. but I got them a while back from the free for the month feature in the old marketplace.

Sorry, extra stuff. Other courses spend more time on Widgets - they are kind of a course on their own as you can do a lot with UI Widgets. The simplest form would be you add a UI Widget that takes a collection (Array) of strings and on show it presents the first string, index counter set to 0, then ok a key/gamepad press you increment the counter and update the text. If it’s the last one, you close and possibly send a message to remove the widget from the display. Crude but effective.

if you want choices, and those choices present different choices then those plugins will do the job.

Privacy & Terms