Procedural Map Generation - ConstructionScript or EventGraph?
Hi, I am creating a procedural map generator for a Turn-Based strategy game similar to civilization.
Should I put all this code in Construction or in the EventGraph? Can I cut and paste from Construction to EventGraph?
I have been creating the generator in construction since that is generally what the procedural tutorials use, but I am not sure that is the best place for it since players will be choosing the map options and generating the map.
I know there is at least 1 node you can use in Event that you can't in Construction(Delay). Are there any other considerations such as nodes or performance that might cause me to prefer one over the other?
Construction scripts are evaluated in the editor on creation time and do not do anything in game. The advantage is that you can create static actors with them, with no additional overhead as the scripts are run before building the level and nothing is evaluated during gameplay. On the other hand only a single result is "baked" into the level, so you can't change any parameters of the construction during gameplay.
In your case you want the player to have control over the generation while playing. This requires interaction during gameplay, so you have to use the EventGraph. This does mean some more overhead as you have to use dynamic objects and lighting, but that is inherent to creating a dynamic world.
answered Apr 20 '14 at 08:23 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here