Somewhere in the course, there was the optional challenge to change code, so that the bullet shells do not get immediately destroyed when they hit the ground.
I thought about using just a lifespan timeout to make them disappear after some given time, maybe disabling physics after they stop moving for performance reasons...
Getting to the Automatic Fire chapter inspired me to have more fun implementing a kind of real mess solution, never deleting the bullets, so actually ending up in something like this in the image (please forgive my ugly map, still focused on logic and animations...)
Of course, its not just that. The idea was to go for using instanced static meshes.
Just define in your weapon blueprint properties, if you want to use the instancing or not, and that's it.
I'll add the code (the important points) in some more posts, as Discord limits the input. Also note, that this is based on the point around where Stephen did add the automatic fire, so functions are based on that point in time.
We only need to change code in GameMode, Weapon and Casing classes, as well as add our new class for handling that Instancing.
And yes, this topic leads to quite some more questions. Is it really a valid approach (apart from the fact, if it really makes sense to do that for stupid things like bullets). So for example: performance impact on adding instances one by one? Better add multiple at one time? PreallocateInstanceMemory? Instance Culling?
Well, at least, this was a cool thing to try out, and I'd welcome feedback on issues, especially concerning the topic of our course: Multiplayer