Hello,
I'm working on a game mode where I'm using a Damage Engine with quite a few different units.
For example, there are about 112 different units so far and I'd estimate about 50% are using triggers like this:
Essentially my question here is very simple:
Would it be better in terms of optimization, for the game to run smoothly when things are getting crazy, eg. large scale battles with a bunch of different units, to compile all of the simple DamageEvent triggers into one Event with multiple If/Then/Else functions to find the correct function that corresponds with the unit that is attacking?
Or is it ideal to spread them out in the way I have done it, each event being linked with a different Unit-Type?
Edit: For clarification, I'm primarily wondering this because I would imagine that less events firing is ideal, however there are a lot of units that will not be using any triggers like this. So when the units that are not linked to a trigger attack, the way it's done here prevents the trigger from ever making it to the "Actions" stage. However, if I do compile them to make less events fire on each instance of damage, any time any damage is done whatsoever the computer will need to do a lot of condition checking, to end on doing nothing, which may be counter-intuitive.
But I have zero programming knowledge, especially involving theory, thus I am asking here.
I'm working on a game mode where I'm using a Damage Engine with quite a few different units.
For example, there are about 112 different units so far and I'd estimate about 50% are using triggers like this:
Essentially my question here is very simple:
Would it be better in terms of optimization, for the game to run smoothly when things are getting crazy, eg. large scale battles with a bunch of different units, to compile all of the simple DamageEvent triggers into one Event with multiple If/Then/Else functions to find the correct function that corresponds with the unit that is attacking?
Or is it ideal to spread them out in the way I have done it, each event being linked with a different Unit-Type?
Edit: For clarification, I'm primarily wondering this because I would imagine that less events firing is ideal, however there are a lot of units that will not be using any triggers like this. So when the units that are not linked to a trigger attack, the way it's done here prevents the trigger from ever making it to the "Actions" stage. However, if I do compile them to make less events fire on each instance of damage, any time any damage is done whatsoever the computer will need to do a lot of condition checking, to end on doing nothing, which may be counter-intuitive.
But I have zero programming knowledge, especially involving theory, thus I am asking here.