Devlog1- Vivianne Zsoldos-- Player UI (Main Menu, Player Stats)


For Echoes of Creation, I am in charge of our game's UI.
I've never really focused on UI for Unreal Engine before, but I do have some history with Unity's Engine. 

For our 1st Week, I focused on a Main Menu and the Player HUD for the Player's Stats (Health, Stamina, Hunger, and Thirst ).

Problem(s)- 
The conversion from Blueprints to C++ seemed to be a HUGE problem for me. I would have the buttons of the Main Menu be functional on the BP version, but even though I had the code, Unreal couldn't find access to the Main Menu code. I had UE_LOGs to clarify this for me. Another problem I had-- My PlayerHUD would show on the same scene as the Main Menu, but I only wanted it to appear on the Gameplay Level. 

Solution(s)-
After I did some Debugs and placed many UE_LOGs, I was able to see that Unreal's Engine had no access to the code version of GameInstance.  Because the Main Menu is run on a separate map (MainMenu_Map), separate maps need to be called by a GameInstance and the Levels are determined by an Array. In the Settings of Unreal, I changed the Instance from the standard BP Instance to the Code Instance, that I needed to add. This was an easy change, so I wished I realized sooner.

Code_GameInstance.h -----

GameInstance

Main Menu  -----

Main Menu


As far as the PlayerHUD, I had a similar problem with the BP vs C++ conversions. On my PlayerHUD code, I needed to add code to only allow the PlayerHUD to show the stats of the Player only on the maps of Gameplay. I assumed that I needed to call this code from the PlayerHUD code, but after some research, I realized that it actually needed to be on the Player. Therefore, I had to give the Player access to the PlayerHUD and call this code on the Player's BeginPlay(). Whenever the Player is added to a Level for Gameplay-- It calls the PlayerHUD. With the ProgressBars of UI I've added, the Player can now see the stats of the Player's Health, Stamina, Hunger and Thirsts values. With collaboration of another classmate.. These bars can be seen/ changed.

Code_PlayerHUD.h -----

PlayerHUD Code

PlayerHUD -----

PlayerHUD

Files

EchoesOfCreation_V0.0.1.exe 817 MB
13 days ago

Get Echoes of Creation

Leave a comment

Log in with itch.io to leave a comment.