Any tips for making the game run faster? It seems to run fine in the viewport, but it seems to run very slowly for the first 10 seconds or so on the packaged version.
@Alex_Summers It’s hard to say without knowing more about your setup and the hardware you are running on. For comparison, I packaged a development build (which is going to be slower than test or shipping) and first startup took no more than a few seconds from launch to being able to move around the level. Subsequent launches took about the same time.
There are a lot of factors involved when diagnosing issues with performance. For example, when you say ‘the first 10 seconds’ are you referring to the time between launching the executable and seeing the first frame, or when you are actually able to move around in the world? Also what are your system specs? Are you running the game off of an HDD or SSD? What packaging configuration are you using? Did you adjust any of the scalability settings?
All these details and more can impact the game’s performance. That said, it’s also a bit early in the course to worry about packaging the project or optimizing runtime performance for that matter.
If you’re able to run these projects in the editor without issue then I would just stick to that for now. I can share some tips and tricks for optimizing runtime performance later on in the course if you (or others) want to turn any of the projects into a fully-featured game.
Hi, in the variable video. My solution was slightly different where I had hooked up the end value of SET to the subtraction node, and then looped it around so it would set the ammo value immediately afterwards. Is there anything wrong with this solution?
Decided to add some sound effects for firing and “empty clip.” It’s nothing sexy but it works and it felt cool to venture off on my own. “explosion02” which I used for firing comes from the starter content. “empty-gun-shot” I found free online.
Cheers for everything, and looking forward to the dipping my toes into C++. Here goes nothing!
@Pizzacrisp Nothing really ‘wrong’ with your solution albeit a bit unconventional. One might argue that it isn’t as ‘readable’ as other methods of achieving the same result. I personally opted for the handy Decrement Int node which I think is the cleanest approach:
For these solo projects I’d say just use whatever method makes the most sense to you as long as you’re getting the expected results.
@Skeewirt You’re on the right track and it’s good that you’re exploring things on your own. Experimentation is a big part of what makes game development fun! It’s still early on in the course so I won’t go into too much detail about using sound effects, but I did want to point out a small issue with your setup. Every time you are firing a projectile, you are actually adding a new Audio Component to the level. I added some extra logging that prints out all the Audio Components in the level after each shot so you can see what I mean:
LogBlueprintUserMessages: [Warehouse_C_6] 19
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] 18
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] 17
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_1 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] 16
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_1 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_2 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] 15
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_0 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_1 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_2 Explosion02
LogBlueprintUserMessages: [Warehouse_C_6] Warehouse6.NODE_AddAudioComponent-0_3 Explosion02
The simple solution to this is to just add an Audio Component to BP_Projectile instead:
Same result, except the Audio Component now lives (and dies) with the projectile. There are, of course, more optimal ways to handle game audio that will be discussed in future lectures.
Thank you for the section, really good pace and it was easy to follow. As a non-native English speaker I did use the Chrome’s subtitles for help, but didn’t need much of them.
Looking forward to the next section.
I’m following everything exactly as the video shows, but when I hit play to try to knock the lamp off of the table, everything with physics on, even if it’s sitting on the ground, jumps like something hit it.
Member Functions Lesson: “Launch” Function on BP_Projectile is killing me.
The function compiles correctly while on the BP_Projectile, however when I call on this function in the Spawn Projectile function it does NOT compile Giving me the errors:
This blueprint (self) is not a StaticMeshActor, therefore ’ Target ’ must have a connection.
Variable node Get StaticMeshComponent uses an invalid target. It may depend on a node that is not connected to the execution chain, and got purged.
Furthermore, When I click on target it brings me to a BP_Projectile function “Launch” that REFUSES to link self to target
Oh my god, apparently I had created a first “launch” command incorrectly… I had two launch commands named the same, but one wasnt tied to the BP_Projectile living code. There goes 2 hours lmao, but atleast i found it out.
Its working now.
Just finished Warehouse Wreckage! I am really enjoying this course so far. The perfect mix of learn by doing while explaining the theory. Exactly my kind of lecture.
Think I had too many barrels?
If anything not enough!
Hi, I just started learning this course, and I am in class 14: Adding an Impulse. However, when I press the spacebar, the impulse doesn’t work. Here are the screenshots of the blueprint and the component of cube
from my work.
and also, I don’t know why when I hit the play button, the lamp and table will bounced off. The only thing I did to them is to enabled the stimulate physic button.