Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Toy on a Mission UE4 Remix - Day 97

Sign in to follow this  


Hello again, And welcome to this week's Journal entry.

Editor Crash & Burn:
Last Saturday(13) I got the editor to Crash & Burn, It happened after I made most of the
variables of my C++ player pawn exposed to BluePrints for reading/writing and adding functionality to have
the player reflect off surfaces after impact by applying the jump impulse in the direction of the hit normal.

That worked fine, Except I forgot to make the key that activates the reflect mode disable it as well.
Then the Crash & Burn happened when the player was supposed to reflect.

I tried deleting the data caches (Generated at runtime) and removed the all the project related files (that I know of) to a new directory.
And still no luck.
I made a bug report on there answer hub, Then what do you know; Restarting fixed it Argggg.
I should of tried restarting before the bug report, But I would like to know why that was happening.

Editor Crash into Limbo:
I was adding preliminary support for pick-ups via a "stack".
Each item in the stack will have it's duration ticked and removed when it expires.

I accidentally told a TArray to remove in an item based on the index into the dead items array instead of the contents at the index.
The editor then froze, And I was unable to kill it as it was in some kind of process shut-down/exit limbo.
I had to "sign out"(log out) and sign back into my account to get the UE4 editor process killed.

Coding horror(tentative title) - What was I thinking here?
The player has a energy level that needs to be clamped between 0.0 and a max value (that can now be affected by a multiplier for use by pick-ups).
The code was clamping the minimum value based on the max energy level multiplier and the maximum was being clamped based on a predefined constant.

The case of the wrong input mode:
I finally got around to setting up the in-game menu "Main Menu" button to bring the player back to the main menu.
The game would lose input focus/control when going back to the main menu and loading a level.
I first tried setting the input mode to game before loading the level from the main menu, But I forgot to tell the BP node what player to do it for.
And it turns out that somewhere in my menu system (I think it is in the in-game menu) I am setting the input mode to UI only and not setting it back to Game before loading the selected level.

Editor crash - Camera planes?
I came to start the editor on Thursday to continue, Only to have it crash.
So I tried a few more times, And got the same result: Crash at ~96% loaded.
So I used I told VS to debug my game[0] and VS reports that the crash occurs when creating some kind of camera frustum in PhysX related code(Unless that is not where it actually caused the nullptr exception).
Luckily restarting Windows solved the issue, Only to have the power trip.

Things done this week:

  • Added a Reflect Mode to the player where he jumps off surfaces according to there normal.
  • I just need to adjust the impulse direction based on the players move direction so it becomes more of a glancing off surfaces.
  • Preliminary support for interesting combo's of pick-ups ( energy regeneration multiplier, max energy level multiplier ), Each pick-up has a multiplier and duration for that multiplier.
  • The highest multiplier that is active is (supposed) to be used.
  • New (and interesting ways) to crash the editor.
  • I may want/need to look at having a exception handler to catch any exceptions my code causes so that I can find and sort that out instead of having to restart the editor and attach VS2015 to the process to see (more or less) what caused the error.
  • The player actor(pawn) now has an array of actor types to ignore when trying to jump.
  • So the player will not be able to jump if he is on a physics blocking volume for example.
  • I have added a water mark widget that displays "ToyMission " in the corners, I just need a way to set what is a preview build.
  • The Graphics options now gets most of the (current) engine quality settings, And I can apply them.

    • I just need to get the Detail mode and set that along with the resolution.

      I have spent yesterday and today mostly working on the options menu(Applying the requested settings).
      I am having some weird behaviour with [UGameUserSettings::Apply] causing the games PIE window to be resized to ~1600x900 (when setting the scalability options to what it reports it to be)
      It also appears that the only way to change to/from full screen is via the "r.setres"(via addition of "f" to the resolution)/"fullscreen" console commands.

      It looks like I have gotten back to the grindstone.

      There was a big thunderstorm on Thursday night, Watching the sky light up and then a big boom and a bunch of crackles.

      No pictures this time, I am going to try to get some pictures for next week and to finish a piece of "concept" art that I have of something I want to integrate.
      That's all for now folks, And thanks for reading.
      Till next time, have a good day/evening.

      [0] - UE4 creates a Visual Studio Solution/Project when creating a C++ based project, Telling VS to debug starts a new instance of the UE4 editor.
      Instead you have to use "attach to process" to debug the C++ side of your game.

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!