by FDARI » Wed Nov 09, 2011 5:35 pm
Aha, that's the one. Now... What can be done with a minimum of fuzz, what options do we have for fuzzier challenges, and what is it all worth; what will we want in the end?
Starting with neural features:
float (angle?) MaxTurn: must be feasible
state impactstate: fuzzy (no pleasing implementation found)
state interruptstate: hairy (no pleasing implementation found)
FLAG SAF_NOATTACKSOUND: must be feasible
FLAG SAF_IGNOREATTACKS: unfeasible as a function parameter, because it needs to be persistent; could be added as an actor flag
FLAG SAF_STOPONATTACK: as above
FLAG SAF_FEELPAIN: as above
Then Xtyfe's little request, A check for species:
Check on outset is feasible (don't charge if same species)
Check on impact is non-feasible (don't damage if same species); the reason and immediate solution is the same as for the flag SAF_IGNOREATTACKS.
And the referenced thread:
int damage: Like the flags, it has its effect after the end of the function, and needs its value to persist until this happens
str damagetype: Like damage
str state: (See NeuralStunner, same entry)
FLAG "Allow pain" (Neural SAF_FEELPAIN)
FLAG "No random damage": Probably not needed
-- If we use the damage property of the actor, there is a method to specify a precise formula with as much or little randomness as you require.
-- If we use a decorate parameter, we are always writing a precise formula.
-- If we want a particular randomisation, we achieve it by enclosing it in a random()-function, or multiplying it by one. Or something else entirely.
FLAG "Don't lose momentum when hit": resembles Neural's SAF_IGNOREATTACKS, is that it?
FLAG "Don't adjust z momentum": FEASIBLE! At least at a glance. It is completely processed during A_SkullAttack, which is what we need.
FLAG "Charge-where-facing, not at target": FEASIBLE! AGAIN!
Gez also made mention of a flag from Eternity or something: INVULNCHARGE. It may be covered by something else, I don't know its specifics.
There'd be a lot of flags added to the actor class that must support this, and optionally an int (if we allow decorate to save an amount of damage for the impact to use instead of normal amounts of damage).
Or maybe we can cut it down to A_SkullAttack(int/float speed, int feasible_flags, class PuffType)
We'd still need to store a bit of extra information to support the feature, but most would be handled by reference. It causes a loss of flexibility, though.
So I see the following possibilities right away:
1* Implement only a few of the suggested features
2* Increase the size and number of definitions for the AActor class (affecting every actor in the game, however insignificantly; perhaps quite tolerably)
3* Add a skullattack_pufftype field to the AActor class (this actually seems like a gruesomly inferior solution in and of itself)
4* Reference an external structure from the actor class, that can store function data. ... I don't really think it beats 1 and 2.
5* Create a native actor class for advanced skull behaviours
1 is quite alright, but disappointing no doubt.
2 is the simplest satisfying solution, and it's messy.
The rest is messier and probably offers no relevant advantage in terms of flexibility or performance.
5 appears to be a step in the wrong direction
Aha, that's the one. Now... What can be done with a minimum of fuzz, what options do we have for fuzzier challenges, and what is it all worth; what will we want in the end?
Starting with neural features:
float (angle?) MaxTurn: must be feasible
state impactstate: fuzzy (no pleasing implementation found)
state interruptstate: hairy (no pleasing implementation found)
FLAG SAF_NOATTACKSOUND: must be feasible
FLAG SAF_IGNOREATTACKS: unfeasible as a function parameter, because it needs to be persistent; could be added as an actor flag
FLAG SAF_STOPONATTACK: as above
FLAG SAF_FEELPAIN: as above
Then Xtyfe's little request, A check for species:
Check on outset is feasible (don't charge if same species)
Check on impact is non-feasible (don't damage if same species); the reason and immediate solution is the same as for the flag SAF_IGNOREATTACKS.
And the referenced thread:
int damage: Like the flags, it has its effect after the end of the function, and needs its value to persist until this happens
str damagetype: Like damage
str state: (See NeuralStunner, same entry)
FLAG "Allow pain" (Neural SAF_FEELPAIN)
FLAG "No random damage": Probably not needed
-- If we use the damage property of the actor, there is a method to specify a precise formula with as much or little randomness as you require.
-- If we use a decorate parameter, we are always writing a precise formula.
-- If we want a particular randomisation, we achieve it by enclosing it in a random()-function, or multiplying it by one. Or something else entirely.
FLAG "Don't lose momentum when hit": resembles Neural's SAF_IGNOREATTACKS, is that it?
FLAG "Don't adjust z momentum": FEASIBLE! At least at a glance. It is completely processed during A_SkullAttack, which is what we need.
FLAG "Charge-where-facing, not at target": FEASIBLE! AGAIN!
Gez also made mention of a flag from Eternity or something: INVULNCHARGE. It may be covered by something else, I don't know its specifics.
There'd be a lot of flags added to the actor class that must support this, and optionally an int (if we allow decorate to save an amount of damage for the impact to use instead of normal amounts of damage).
Or maybe we can cut it down to A_SkullAttack(int/float speed, int feasible_flags, class PuffType)
We'd still need to store a bit of extra information to support the feature, but most would be handled by reference. It causes a loss of flexibility, though.
So I see the following possibilities right away:
1* Implement only a few of the suggested features
2* Increase the size and number of definitions for the AActor class (affecting every actor in the game, however insignificantly; perhaps quite tolerably)
3* Add a skullattack_pufftype field to the AActor class (this actually seems like a gruesomly inferior solution in and of itself)
4* Reference an external structure from the actor class, that can store function data. ... I don't really think it beats 1 and 2.
5* Create a native actor class for advanced skull behaviours
1 is quite alright, but disappointing no doubt.
2 is the simplest satisfying solution, and it's messy.
The rest is messier and probably offers no relevant advantage in terms of flexibility or performance.
5 appears to be a step in the wrong direction