5 tips to optimize your UE5 game!
21:43
Пікірлер
@PirateDion
@PirateDion 9 сағат бұрын
Any tips on how to implement this with dodging with movement keys? Similar to Unreal Tournament movement. The problem I'm running into now is I can trigger double tap instances to initiate a dodge, but if I'm running forward (holding W) then double tapping A or D doesn't create a trigger event to complete or cancel on as I'm still engaged in the holding down W event. I'm thinking a way to solve this would be to create two axis of dodging where I could trigger left and right while moving forward or backwards and vice versa. But seems clunky. Any thoughts on the matter would be appreciated. I'll get back to tinkering after the gym :P.
@Spacemarine658
@Spacemarine658 9 сағат бұрын
Hmm it depends I'd say splitting it would help the case you have here and it wouldn't add too much complexity (I have all of my wasd on separate actions for accessibility support and for Niagara effects I run for my ship) if you didn't want to split it then you'd probably just have to make it clear to players that they can only dodge while standing still or in their direction of movement many games do it using either method but from my own experience the splitting seems to work better for more fluid movement personally I'd split it all up then no matter what players could roll any direction so if they are running backwards but want to roll forwards to dodge an attack but still keep moving backwards overall they can
@Spacemarine658
@Spacemarine658 4 сағат бұрын
@@PirateDion glad to hear it!
@pamparam3495
@pamparam3495 Күн бұрын
That's useful, I've started working on HUD overhaul for my game recently
@l_t_m_f
@l_t_m_f Күн бұрын
I appreciate this video, having used CommonUI in Lyra before, its nice to see how we can set it up from scratch.
@Spacemarine658
@Spacemarine658 Күн бұрын
Thanks I hope to go into all the cool tools it provides so people can get the most out of it!
@taigabit
@taigabit 3 күн бұрын
Nice video and case example. I have generally leaned more towards using the interface choices instead of using dispatchers for the same result. What would you say is actually the difference to use event dispatchers and interfaces? Just in case I oversee a feature set I would like to know. What I like is seeing your gameplay tags in use. I have so far categorized cases like yours with switch on enums primarily which then required me to specify the case elsewhere. For example using a color wheel in the character editor to adress a specific material layer with one widget instance using the same underlying code structure just adressing a different case in a common function to change a vector attribute. But what would you say is the difference in dispatchers and interfaces and their advantages and disadvantages? Best wishes!
@Spacemarine658
@Spacemarine658 3 күн бұрын
The can work pretty similarly and with similar performance the biggest difference afaik is going to be in how you get the information to the other actor for example An interface can achieve say passing damage data from one actor to another through a basic reference of an actor by saying "if you have this please do it" A delegate subscribes to any function of an object and says "let me know when this happens" Think of it like a door An interface allows an actor to open any door with the interface of OpenDoor A delegate could listen for one or more doors opening and do something based on it like spawn a boss or NPC They CAN be used the same way but it's best to use interfaces for when one actor needs to cause something to happen to another actor (like interact on a door) vs delegates are best for when listening or waiting for something else to happen to react to that (for example i use this for my dialogue/quest system that ties into my gameplay tag system)
@taigabit
@taigabit 3 күн бұрын
@@Spacemarine658 Thanks for the exchange, certainly helpful. I can see where it is more convenient to have a class just listen to an event instead of having another actor specifically reference to another actor with an interface who gets the message, which can also be annoying when trying to decouple but create references elsewhere. Gonna keep that in mind!
@Spacemarine658
@Spacemarine658 3 күн бұрын
@@taigabit no problemo 🤘
@friedunicorn
@friedunicorn 8 күн бұрын
This was soooo helpful and well explained, thank you King 👑
@Spacemarine658
@Spacemarine658 8 күн бұрын
Glad i could help!
@joe10111
@joe10111 8 күн бұрын
Thank you sir! Your video saved me
@Spacemarine658
@Spacemarine658 8 күн бұрын
No problem glad to help!
@ultradude9605
@ultradude9605 8 күн бұрын
Oh my god thank you so much..
@Spacemarine658
@Spacemarine658 8 күн бұрын
No problemo!
@TheZoobZoobs
@TheZoobZoobs 8 күн бұрын
Question, when viewing the frame bar in insights, even if you have traced for like 10 seconds, you see numbers like 10m and 5.0s or something, can I ask why it does that? It makes the timeline a bit confusing. Also, I noticed if you click a single frame in the Frames bar, instead of the timers tab only showing everything in that frame alone, the timeline selects that frame + a few frames before and after it. Why is that?
@Spacemarine658
@Spacemarine658 8 күн бұрын
1) that is the time since editor started it's a little confusing but it helps diagnose memory leaks 2) what you are seeing there are rendering frames which are slightly offset due to how the game thread pushes to the rendering frame if your right click at the top and deselect rendering frame you'll see it aligned perfectly
@TheZoobZoobs
@TheZoobZoobs 7 күн бұрын
@@Spacemarine658 thanks man
@Spacemarine658
@Spacemarine658 7 күн бұрын
@@TheZoobZoobs no problem glad to help 🤘
@AugustSargentiOfficial
@AugustSargentiOfficial 9 күн бұрын
You Legend.
@Spacemarine658
@Spacemarine658 9 күн бұрын
Glad you enjoyed it!
@olliverkatana4168
@olliverkatana4168 14 күн бұрын
Thank you for tutorial.
@Spacemarine658
@Spacemarine658 14 күн бұрын
Glad I could help!
@gnoel5722
@gnoel5722 14 күн бұрын
Thanks for the video, you are obviously way more knowledgeable than me. I would rate myself as a beginner++. Some nodes I was NOT familiar with like the "switch on Gameplay Tag", never seen it before and I am not sure what it does but I was still able to follow you for about 80% of it. My question is, me as a semi advanced beginner, I know that putting health on tick is bad practice but instead I would put my health, mana and stamina UI updates on a custom event that I call after each damage/spell/ability instance, why isn't that a good and easy way to do it? Thanks again!
@Spacemarine658
@Spacemarine658 14 күн бұрын
That's not a bad way to do it I just like separating the UI from the player in such a way that any changes I make don't affect each other. Think of it like this I could build 4 totally different HUD systems and swap between them with 0 issues since there is no hard refs between the two systems
@Spacemarine658
@Spacemarine658 14 күн бұрын
By not hard coupling the two you leave a lot of room for change and performance 🤘
@gnoel5722
@gnoel5722 14 күн бұрын
@@Spacemarine658 I see. it makes total sense.
@fragelius
@fragelius 17 күн бұрын
why i dont have games folder?
@taigabit
@taigabit 19 күн бұрын
Hey there again, that video also helped. Now the question is, how do you change the chorded action at runtime? Have you found a way to do this yet? I have prepared a combobox for players to decide which modifer they use (ctrl, alt, shift) which is next to the actual key that it gets combined with. It seems undoable to change the chorded action aspect at runtime, or am I missing something :D?
@Spacemarine658
@Spacemarine658 19 күн бұрын
There's a few different ways the easiest would be making the hold condition mappable like the other keys and it'll just show in the list it wouldn't work with the drop down but it would allow it to be changed. Another option would be the same as above except you'd create a check so as to not create a widget for that specific action and then in your dropdown you'd set it up with some options and then check the current set key and set that as the selected for the drop down and then when that drop down changes you then go and override your hold condition key just like you would the regular keys
@taigabit
@taigabit 19 күн бұрын
@@Spacemarine658 Thank you for that input and your time invested, working on it now!
@Spacemarine658
@Spacemarine658 19 күн бұрын
@@taigabit no problem feel free to ping me if you have trouble!
@taigabit
@taigabit 19 күн бұрын
@@Spacemarine658 Alright, I have tried out the "analog" approach. So what you proposed as solution both requires me to add an input asset to each control/operation. Like for "IA_interactWithChest" i would need an "IA_InteractHold" asset that then is mappable and exclusively bonded to it. for another aspect in the game "IA_OpenSpellbook" I would need to have it's own Asset created too that I can then change with simple mapping and is bonded to the spellbook opening. It seems tedious if the controls are a lot, but it seems to work. I originally wanted to avoid this approach and hoped there is a way to access the triggers, since they are arrays, in blueprints and then adding the context for holding or "combo" this way into the trigger category of that given asset. I have tried to add information from a dummy input asset into the array of triggers but I face reference issues when doing so, while I know and feel this would probably the best approach and allow users to change the whole property at runtime. I haven't been able to access and change the array of triggers and modifiers of an input asset in blueprints sadly yet after days of research. Anyway. Just to clarify, your idea suggests making an asset as optional condition for each operation the player can perform, right?
@Spacemarine658
@Spacemarine658 19 күн бұрын
@@taigabit yes and no I would make it as generic as possible and only use the conditionals for extra things so for example in my game: Interact handles a few different options based on what gameplay tags my player has for example if the play hits interact and they have the tag "InDockingRange" it tries to dock but if not then it checks for the tag "target locked" and so on all with a single key then I have the hold condition for when I want the player to hit the hold button and interact button so as an example for my radial menu you have to do caps lock and f and it opens that menu up. If you can you want to minimize how many keys the player is hitting so if it were me I'd have the interact key have the trigger hold so when cancelled (ie just a tap) the interact with cheat and open spell book could either first depending on if the player has the tag or not so one button two possible actions.
@taigabit
@taigabit 19 күн бұрын
Hi there, this video overall helped me a ton understanding the enhanced input thank you for that! At 16:38 you mention you could "theoretically" add a modifier for combinations like shift+a inputs to name one example. Could you please make a short explanation of exactly this case? When I do put a checker on any (in the make input chord), it overwrites the key with the modifier selected.
@Spacemarine658
@Spacemarine658 19 күн бұрын
I actually released a video covering this! Check out my latest video it covers chorded actions and double taps!
@Lloyd_2001
@Lloyd_2001 23 күн бұрын
The tutorial I followed used the older axis mapping method, I was so confused thanks for the video.
@Spacemarine658
@Spacemarine658 23 күн бұрын
No problem glad it helped!
@danielfjordhj7265
@danielfjordhj7265 26 күн бұрын
Cant see any parts of insights, as you have your camera covering that part :D
@Spacemarine658
@Spacemarine658 26 күн бұрын
Yeah sorry about that I hadn't figured out how to separate the two at the time 😅
@Spacemarine658
@Spacemarine658 26 күн бұрын
I did cover it a bit better here kzbin.info/www/bejne/iajdcoR6dph4bLssi=s-5zRfVXH1cjdoI7
@danielva1011
@danielva1011 28 күн бұрын
Good to see progress on Starlight brigade
@Spacemarine658
@Spacemarine658 28 күн бұрын
Thanks 🤗 I did a major overhaul on the systems now that I've got a learned a ton lol so development should get a lot faster now
@GameDevAraz
@GameDevAraz Ай бұрын
unreal 5.3 and 5.4 has bug in engine, any game even templates on mobile, once you exit and return to app, fps drops to 30fps and below, no matter what scene.
@Spacemarine658
@Spacemarine658 Ай бұрын
Ouch that's rough have you been able to pin point why?
@GameDevAraz
@GameDevAraz Ай бұрын
@@Spacemarine658 it's inside the engine files, I've submitted a bug and thought it'd be fixed by 5.4 but no 😭
@Spacemarine658
@Spacemarine658 Ай бұрын
@@GameDevAraz ouch
@GameDevAraz
@GameDevAraz Ай бұрын
@@Spacemarine658 yup, happens on android
@ryanjdevlin87
@ryanjdevlin87 Ай бұрын
I have a possible optimization to this I think. In set key texture with the way its written both all gamepad textures and keyboard textures will be in memory at all times ... what if these references where soft object paths ? then you could name them all accordingly and build the resolving path as a string using the "Key" or corresponding gamepad "Key" . this would also eliminate the switch statements. So basically dynamically setting the soft object path based on the "Key" your already passing into the switch because this "Key" is the only thing that is changing in the soft object path's resolved filepath
@Spacemarine658
@Spacemarine658 Ай бұрын
🤔 interesting idea I'll have to look into it I don't think the key textures take up much memory especially as I remove them once the UI is hidden but it wouldn't hurt to reduce it further 🤔🤔
@thomasbuffler6041
@thomasbuffler6041 Ай бұрын
How did you figure it out?
@Spacemarine658
@Spacemarine658 Ай бұрын
Lots of smacking my face into the code and debugging lol
@thomasbuffler6041
@thomasbuffler6041 Ай бұрын
Man, I watched halfway then was like OK I can do the rest myself cuse I have with earlier versions, 2 hours later I get stuck on reset profile to default clearing out keys, I continued your video and you showed how to reset individual keys, legendary! (BTW, for anyone who wants to reset all, get the Input Mapping Context->GetMappings->ForEeach: ArrayElement->GetPlayerMappableKeySettings->IsValid->True->then copy 24 mins in the video, Works well
@jobotishuman
@jobotishuman Ай бұрын
How can we update a UI Icon with this? eg for controllers you dont want to have the text name of the key, you want the icon
@Spacemarine658
@Spacemarine658 Ай бұрын
Yes it would probably require a bit more effort but it could be done
@Wyslijfotkekompa
@Wyslijfotkekompa Ай бұрын
thx bro
@Spacemarine658
@Spacemarine658 Ай бұрын
No problem glad it helped 🤘
@rebecka1027
@rebecka1027 Ай бұрын
Nice tutorial! I find it hard though to keep track of everything since i feel like youre mostly just explaining what you've done and it's pretty overwhelming just seeing a bunch of nodes and then trying to replicate that. I undertand that it would maybe take a long time doing everything from scratch in a video, but just some feedback from a beginner :)
@Spacemarine658
@Spacemarine658 Ай бұрын
Thanks! I appreciate the feedback!
@renisrrenis9225
@renisrrenis9225 Ай бұрын
hey, do you maybe have an idea how to make that if branch enter condition is not true anymore it would abort child states and go next state? Or something similiar to that? Or the solution is to use different state trees for that like "Patrol/Shoot" and when that abort change need to happen just stop the logic and switch to other tree?
@Spacemarine658
@Spacemarine658 Ай бұрын
You can have different trees and that's not a bad solution especially for complex behaviors but you can have aborts built into the tree so that when the enum changes the tree gets reset
@renisrrenis9225
@renisrrenis9225 Ай бұрын
@@Spacemarine658 oh thats smart way to go, thanks for answer.
@LittleBlue42
@LittleBlue42 Ай бұрын
Love your channel! You remind me a lot of myself haha. I'm working on a sci fi/retrowave courier game, and I like watching your progress as I go. I imagine if we would have grown up close by, we would have had a great time nerding out on stuff together. Take care!
@ferinzz
@ferinzz Ай бұрын
Been looking all over for someone to explain all this in enough depth. Finally got a rebind to work, now to port to C++ because I like pain.
@Spacemarine658
@Spacemarine658 Ай бұрын
XD I feel ya there
@ferinzz
@ferinzz Ай бұрын
@@Spacemarine658 Finally got to the same spot I was at with the blueprints. Sharing some useful functions I found along the way. InputSystem->GetAllPlayerMappableActionKeyMappings(); don't need to filter the results because all of them are mappable. However this is tied to enhanced input local subsystem so you would need to reference that unlike when using get mappings which specifically references an IMC. Didn't use this in C++ but had it in blueprint and it worked fine. Probably better if you have a bunch of IMC so you don't need a loop in a loop. UserSettings->ResetAllPlayerKeysInRow(args, FailureReason); easy one button reset instead creating a new arg to use to for mapping. I believe it clears the whole row, so if you have multiple slots it might not be ideal. Be sure to pass a variable in to be used to return a failure reason, because these functions won't work in C++ without it. // Create an empty FGameplayTagContainer to store failure reasons FGameplayTagContainer FailureReason; Careful when building the args for your key mapping. I've just discovered that having an arg with a slot that isn't yet allocated will crash if you try to get the current non=existent keybind. This is a crash if you have not keybind in slot 2 FMapPlayerKeyArgs args; args.MappingName=UEnhancedInputLibrary::GetMappingName(maps[i]); args.NewKey = EKeys::K; args.Slot = EPlayerMappableKeySlot::Second; UserSettings->GetCurrentKeyProfile()->FindKeyMapping(args)->GetCurrentKey();
@jaizxzx
@jaizxzx Ай бұрын
can this be used for unreal engine 5.3.2
@Spacemarine658
@Spacemarine658 Ай бұрын
Yep I wrote it in 5.3.2
@jaizxzx
@jaizxzx Ай бұрын
@@Spacemarine658 but it is showing this error: The following modules are missing or built with a different engine version: DiscordGame Would you like to rebuild them now?
@Spacemarine658
@Spacemarine658 Ай бұрын
@@jaizxzx hmmm the repo isn't version specific afaik I'd try rebuilding it but if it doesn't work it may be your files are in the wrong place
@jaizxzx
@jaizxzx Ай бұрын
@@Spacemarine658 No worries man its working finally apparently there was some issue with the DiscordGame folder so I had to delete the already generated data for the plugin and then replace the files with the official release of the discord sdk in the suitable locations inside the DiscordGame folder and then recompile the project and it worked finally.
@Spacemarine658
@Spacemarine658 Ай бұрын
@@jaizxzx ah ok that makes sense glad you got it figured out 💪
@hareshgamer8990
@hareshgamer8990 Ай бұрын
Thanks man, You saved my day !!!
@Spacemarine658
@Spacemarine658 Ай бұрын
No problem 😁
@joenathan2145
@joenathan2145 Ай бұрын
yooo, thank you. you save me a lot of time!!
@kaptaka
@kaptaka Ай бұрын
So Im pretty new to unreal and I can't seem to find how you made some of your function static. Are they made in another blueprint than you can acces from everywhere ?
@Spacemarine658
@Spacemarine658 Ай бұрын
I'm a little confused is there a specific function you can think of? Most of my functions are built into unreal it's self or are ones I build using custom events or functions
@kaptaka
@kaptaka Ай бұрын
@@Spacemarine658 Well for exemple (as I was checking it again) the function is mnk. When I drag my function it makes a non static one with the target pin. And It does that with every function I made. And If I can add something else, I get an error that say's, accessed none trying to read the property UserInputSettings.
@Spacemarine658
@Spacemarine658 Ай бұрын
@@kaptaka ah ok so what I have is called a pure function to make a pure function there is a check mark on the right hand side when you click on a function, making a function pure means you don't intend to execute code there but instead pass data around
@Spacemarine658
@Spacemarine658 Ай бұрын
@@kaptaka that will hide the execution pins
@Spacemarine658
@Spacemarine658 Ай бұрын
@@kaptaka it's not static there's a different flow for static vs non but that's a bit different than a pure function if you catch my drift
@gail_blue
@gail_blue Ай бұрын
So, my problem is that my game is locked to 80fps in the game time (cpu), but only in the editor. In a shipping build, it can get to 220fps. Which seems like too much of a gap to me. Any sort of debugging I try to do just makes it worse. UPDATE: After Unreal crashed and corrupted my build, I had to do a clean rebuild, and now everything is running fine, I'm getting 130 in the editor. Unreal is weird.
@Spacemarine658
@Spacemarine658 Ай бұрын
That it is lol glad you got it somewhat solved
@emile04
@emile04 Ай бұрын
Would have wished you showed your reset function, but manage to make it work another way. I always wondered how people manage to figure out new stuff like that on their own. Other than that, your explanations were helpful thanks a lot!
@Spacemarine658
@Spacemarine658 Ай бұрын
Nice glad you figured it out and yeah I've improved my tutorial process somewhat but for sure I missed out on that 🤘 thanks for the feedback
@OLucasQueJoga
@OLucasQueJoga Ай бұрын
excellent explaination! Thank you rvery much!
@Spacemarine658
@Spacemarine658 Ай бұрын
Glad you enjoyed it!
@bluehornet03
@bluehornet03 Ай бұрын
So much help thank you, was running into an issue with saving user input settings, is that a separate blueprint like the save game blueprint?
@Spacemarine658
@Spacemarine658 Ай бұрын
No it's a built in part of unreal engine you just have to enable it in the settings are you getting an error using it?
@bluehornet03
@bluehornet03 Ай бұрын
@@Spacemarine658 I found the issue, when pulling from get enhanced input user settings, it wasn't valid because i didn't have the target pulled from enhanced input local player subsystem. I was just plugging it directly from get player controller. Thx again for making this video it was great
@Spacemarine658
@Spacemarine658 Ай бұрын
@@bluehornet03 ah ok yeah that would do it too glad you figured it out!
@maiworld_
@maiworld_ 2 ай бұрын
does this work for mac?
@Spacemarine658
@Spacemarine658 2 ай бұрын
I don't believe so only Linux and Windows
@D4KiRZ
@D4KiRZ 2 ай бұрын
is there no blueprint only version of that? :O
@Spacemarine658
@Spacemarine658 2 ай бұрын
Not really you can get away with basic integration without too much coding but some is required as it's a plugin hitting an SDK
@ryanjdevlin87
@ryanjdevlin87 Ай бұрын
there are plugins on the market that can do it in blueprints but obvisouly that comes with a price and overhead
@Spacemarine658
@Spacemarine658 Ай бұрын
@@ryanjdevlin87 yeah the price of free is needing to learn a little c++
@Transcriptor
@Transcriptor 2 ай бұрын
@M-gf9gu
@M-gf9gu 2 ай бұрын
This may be because my project is on 5.2 but my State Tree Tasks seem to lack an Event Tick. And with my Evaluator, it only fires Event Tick once when the game begins play? It never enters another state because it doesn't update the player actor location from the evaluator. 😵‍💫 Edit: I upgraded my project to 5.3 and the same issues exist! Edit 2: Sorry, I had to create a new State Tree Task BP for it to bring in Event Tick, I thought it would change my existing ones with the upgrade. It does seem to have been a new feature of 5.3 however.
@wolfwirestudios
@wolfwirestudios 2 ай бұрын
Awesome tutorial mate but one question. How can I make a check on runtime to see if user entered inputs are not overlapping? Like not allowing same key for 2 different binding?
@Spacemarine658
@Spacemarine658 2 ай бұрын
What you can do is once a key is selected you can loop through the current keys like we do when building all the key widgets and if any match then throw an error and don't override the key
@wolfwirestudios
@wolfwirestudios 2 ай бұрын
@@Spacemarine658 Got it. I made it. Had to make a few macros to run through all Key Selector widgets and check for duplicate key, then if duplicate is found, I return the default key and update the widget back to this default value accordingly. Thanks !!
@Spacemarine658
@Spacemarine658 2 ай бұрын
@@wolfwirestudios awesome 🤘 glad you got
@std_nullptr
@std_nullptr 2 ай бұрын
помогло спасибо
@Spacemarine658
@Spacemarine658 2 ай бұрын
Glad I could help!
@swapneshsangle387
@swapneshsangle387 2 ай бұрын
thank you
@Spacemarine658
@Spacemarine658 2 ай бұрын
No problem!
@rolffsonsIBM1401channel
@rolffsonsIBM1401channel 2 ай бұрын
thx, saved my day! Though in my case it worked for month with 5.2, but suddenly today came up with this issue. Would really love to know what caused this sudden change...
@Spacemarine658
@Spacemarine658 2 ай бұрын
No problem I'm not 100% sure what cases it myself but since fixing it, it hasn't come back
@gatOlegat
@gatOlegat 2 ай бұрын
hey, i have reacreated what you made it all works as expected except for saving. For some reason saving part doesn't work at all, everytime i end a session and start new game all of the settings reset to default. I understood how the system works and it's perfect, i really enjoyed your clear explanation. Mappings get rebinded as intended, widget works perfectly, i don't know why saving isn't
@Spacemarine658
@Spacemarine658 2 ай бұрын
🤔 hmmm strange I'd try running print strings off of your save and load functions and see if you notice anything missing if not feel free to DM me on discord with screenshots and I'll take a look 🤘
@gatOlegat
@gatOlegat 2 ай бұрын
@@Spacemarine658 cool, thanks I will do that tomorrow morning, it’s 4 am here, and I am barely alive at this point. Good night and expect to see me tomorrow morning! Thanks for a great tutorial!
@Spacemarine658
@Spacemarine658 2 ай бұрын
@@gatOlegat Roger that 🫡 thanks for watching!
@alexboehm7171
@alexboehm7171 2 ай бұрын
thank you so much man!!
@Spacemarine658
@Spacemarine658 2 ай бұрын
No problem glad I could help ya!
@engineertime8942
@engineertime8942 2 ай бұрын
Thank you so much. It took me two hours and a half. I almost give up UE and move Godot.
@Spacemarine658
@Spacemarine658 2 ай бұрын
Glad I could help!
@MonogramGraphics
@MonogramGraphics 2 ай бұрын
Can't thank you enough! So simple solution! It drove me nuts that I was able to start the debugger on any other 5.2 project except the one I had upgraded from 5.0. You're a life saver!
@Spacemarine658
@Spacemarine658 2 ай бұрын
No problem 😁 glad it helped