🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Toy on a Mission UE4 Remix - Day 97

Published February 19, 2016
Advertisement

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.


References:
[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.

3 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement