will construction script have ANY effect on gameplay?
I think i already know the answer to this but i want to be absolutely sure before going ahead.
I've written a construction script which generates a large semi procedural level. When i compile it it takes my computer about 2 minutes to complete. It should probably be noted that my PC is above average spec.
Will this massively (possibly over) complex blueprint have any impact on the final performance of the game? or will it (for lack of a better term) collapse down?
I dont intend for the player to be able to generate new levels this is more so that i can be lazy in the long term and reuse the code. :)
asked Dec 19 '18 at 02:13 PM in Blueprint Scripting
The answer is that it will not affect gameplay in the case of what you're doing.
Construction Script only runs once when you spawn the actor. If your actor is pre-placed, then Construction Script runs on the Editor. This means that during gameplay Construction Script is already compiled.
Also, as a piece of advice, you can separate the render stuff from the computational stuff. You can create functions in your actor and mark them as "Call In Editor", which creates a button on the details panel so you can run those functions on command while in the Editor.
What I normally do is that I do the procedural stuff on the cheap with zero to almost no render stuff, and when I'm happy with the result i push the "draw render stuff" button.
answered Dec 19 '18 at 04:19 PM
Generally, the consensus with stuff like this is, it's okay if it's not as performant as it can be, as long as you are not performing that action constantly in quick succession (in a loop, or in Tick()). While it being in a Blueprint would surely affect performance as opposed to it being written in C++, you shouldn't really be concerned with this too much as it seems like a procedure that is not executed often.
Follow this question
Once you sign in you will be able to subscribe for any updates here