RNG Enemies - Multiple Actors or Multiple Images?
I plan on having enemies randomly generated to try to create a near-infinite wealth of possible enemy types. I can conceptualize 2 ways of doing this in GameSalad, and would like to know what yall think is the most effective way to do it:
Multiple Actors - I can try to have it so the individual components of an enemy are composed of multiple Actors. So let's say the RNG rolls a Werewolf head, a Demon torso, and a Tank legs. Each one is a separate Actor and lends their various effects to a "core" actor. The Pro to this direction is an extreme mix-and-match amount of variability, the Con being the difficulty in managing so many actors and their interactions with each other and with the Heroes.
Multiple Images - I can try to have it so that the enemy unit is a single Actor but with a very large Image set. So let's again say the above example occurs, the Actor's attributes are tied to the RNG results and then it pulls from the images that go along with that particular roll. The Pro to this direction is that it keeps the Actors simplified, the Con being that I'd have to pre-set all the various possible enemy types.
On top of either of these approaches, is there a generally accepted way to change the hue of the enemies? So let's say we have 2 werewolves, a red one that is fire resistant and a blue one that is ice resistant. Would I need 2 separate Image groups or is there a way to add a color palette and use the same Image?
Best Answers
-
AlchimiaStudios Posts: 1,069
@TheAlchemyst said:
I plan on having enemies randomly generated to try to create a near-infinite wealth of possible enemy types. I can conceptualize 2 ways of doing this in GameSalad, and would like to know what yall think is the most effective way to do it:Multiple Actors - I can try to have it so the individual components of an enemy are composed of multiple Actors. So let's say the RNG rolls a Werewolf head, a Demon torso, and a Tank legs. Each one is a separate Actor and lends their various effects to a "core" actor. The Pro to this direction is an extreme mix-and-match amount of variability, the Con being the difficulty in managing so many actors and their interactions with each other and with the Heroes.
Multiple Images - I can try to have it so that the enemy unit is a single Actor but with a very large Image set. So let's again say the above example occurs, the Actor's attributes are tied to the RNG results and then it pulls from the images that go along with that particular roll. The Pro to this direction is that it keeps the Actors simplified, the Con being that I'd have to pre-set all the various possible enemy types.
On top of either of these approaches, is there a generally accepted way to change the hue of the enemies? So let's say we have 2 werewolves, a red one that is fire resistant and a blue one that is ice resistant. Would I need 2 separate Image groups or is there a way to add a color palette and use the same Image?
Changing the hue can be done with the color picker or changing the RGB values (can be done in real time). If you want it to look right it's best to start with a greyscale or desaturated version of your graphics, because adding color on top of a colored image is going to often give you undesirable results.
I personally would go with multiple actors, but only if animations are somewhat limited. In that case I would use just 3 actors (one for all torsos, one for all heads, one for all legs). But this also means that animations could be harder to line up and perform in synch (layer ordering and rule triggering could mean a very slight delay between pieces.)
-
Socks London, UK.Posts: 12,822
@AlchimiaStudios said:
Changing the hue can be done with the color picker or changing the RGB values (can be done in real time).You can't change the hue of an imported image in GameSalad, you can only add (mathematically 'add') to the colour.
@AlchimiaStudios said:
I personally would go with multiple actors, but only if animations are somewhat limited. In that case I would use just 3 actors (one for all torsos, one for all heads, one for all legs). But this also means that animations could be harder to line up and perform in synch (layer ordering and rule triggering could mean a very slight delay between pieces.)Agreed, I'd go with multiple actors, but I can't see any real issues with syncing animation, it should all work fine.
Answers
I was just using @TheAlchemyst terminology.
I probably have should have gone into greater detail.
Not likely to be noticed but i've seen delays in around .005 +/- seconds from one actor to the next because if even if they all rely on the same variable changing to trigger a rule with an animation, if it's iterating through the layers from bottom to top and you have actor a, b, c with c being the highest you might see a small delay between a/c before c triggers it's rule.
Follow us: Twitter - Website
Agreed, layer order (and other trickery) is vital for well synced actors, but 3 actors shouldn't be an issue.
Thanks yall! So to sum up:
I should mention that the game involves large hordes of enemies, does that alter yalls opinion?