Content

Post new topic Reply to topic

Finishing EV_PAIN implementation

Author Message
Eagle The Purpose View user's profile Send private message

Reply with quote Tuesday, August 18, 2015

Hiho. I was thinking one or two month ago about finishing pain sounds implementation in ZEQ2-Lite (as a part of the code relates to this). But since I haven't found anything that controls the requirements for a triggering, I thought about a little system doing so.

Note: this quotation comes from a PM discussion. The code in it is just to give a an idea of what I was thinking at the moment.

"This is mostly how I see the thing. Since I don't know how to use "pm->Postscript->timers" in the code, I have improvised a timer in an int.

void checkPainEvents(){

int DamageValue1, DamageValue2, timer = 0;

DamageValue1 = pm->Postscript->powerLevel[plDamageFromMelee]; //These two variables are just here to simplify the interpretation

DamageValue2 = pm->Postscript->powerLevel[plDamageGeneric]; //These two variables are just here to simplify the interpretation

if(DamageValue1 > 0 || DamageValue2 > 0){ //If any kind of damages is detected

timer++;

}

if(timer >= 300){ //Defines a maximum value to the timer, the >= should theoretically prevent of some jumps over the limit, triggering unlimited incrementation (safety first!)

timer = 0;

}

if((DamageValue1 >= 200 && timer > 0) || (DamageValue2 >= 200 && timer > 0)){ //If any kind of damage is over or equal to 200 and the timer over 0 (by putting ">0", we are defining a minimum value for the "On" state of timer, which is 1, 0 being it's off state)

EV_PAIN_LIGHT();

}

if((DamageValue1 >= 500 && timer > 0) || (DamageValue2 >= 500 && timer > 0)){ //If any kind of damage is over or equal to 500 and the timer over 0

EV_PAIN_MEDIUM();

}

if((DamageValue1 > 999 && timer > 0) || (DamageValue2 > 999 && timer > 0)){ //If any kind of damage is over 999 and the timer over 0

EV_PAIN_HEAVY();

}
}



Each "EV_PAIN_<X>" events are triggering a random sound from a group of sounds proper to them (example: "painLight", "painMedium" and "painHeavy" groups, declared in the "cg_players.c")"

Don't mind the errors, I just wanted to present this idea and discuss about how to finish the implementation. This little detail will increase a lot the immersion in the universe/battles, and it's an occasion to make some things useful. Smile

leogone View user's profile Send private message

Reply with quote Sunday, August 23, 2015

Hmm...This is a little bit different from what I use (codes).

Anyway I was thinking about adding Particles, (depends of the Damage state) like Blood/ Punch effect (like Dragon Ball Z Budokai Tenkaichi 3 or others) to this code.
First we have to get a particle code then use it like Global.Blood = true;
OR ! We can still use an animated blood texture (like sparkles) which is easier. But if the code is made like this then :


if((DamageValue1 >= 200
{ Global.Blood = true;

}



To be honest I don't know how to code on ZEQ2 but someone could use this in a better way.

Oh forgot something, we need to make variables (Global.Blood)

Global.Blood = false;



Then another page:

if Global.Blood = true;


//Use the instance_draw for the animated texture (I don't know how to use it on ZEQ2 sorry :c )

I don't know if this will work, if not we can still try to improve it till it works

(by the way I think we can use the blood code for punch effects)

Shenku RiO Incarnate View user's profile Send private message

Reply with quote Sunday, August 23, 2015

Except that we wouldn't want blood to be splattering all over the place as gratuitously as in something like Mortal Kombat, because (unless I'm remembering wrong) in the series it very rarely happened.

In fact, even though blood was present during numerous portions of the series from various cuts and injuries sustained by characters, I want to say it was extremely rare that you would have seen blood splattering off and away from the characters. Partly because of the ratings restrictions from trying to keep the show's TV14 rating, but arguably also from an aesthetic and artistic choice to keep the show visually focused so that it was more about the fighting and less about the gore (Hence things like Cell Jr.'s exploding into puffs of dust rather than blood and guts).

Eagle The Purpose View user's profile Send private message

Reply with quote Monday, August 24, 2015

>leogone

It could be added to the event, but I agree with Shenku, it's a bit too much. Gore scenes mostly happen when someone die in Dragon Ball, and in ZEQ2-Lite, it would be quite shocking to have a "FINISH HIM" event when someone is at 1hp. Laughing

Gore scenes should more likely be reserved for a probable story mode.

Also EV_PAIN, in the system I showed, is called very often to evaluate the right type of damages (light, medium, heavy) taken in a short period, thus triggering the appropriate sounds (and/or other things). So, if blood splashes were to be added, it would look even more gore than mortal kombat.. 'Smile

But maybe the characters could have a bit of blood dripping from their wounds in some cases (damaged states/pain (health drain) state)?

It is an interesting subject/add, but if the base system isn't finished, it won't be very useful at the moment.

leogone View user's profile Send private message

Reply with quote Monday, August 24, 2015

Shenku wrote : Except that we wouldn't want blood to be splattering all over the place as gratuitously as in something like Mortal Kombat, because (unless I'm remembering wrong) in the series it very rarely happened.

In fact, even though blood was present during numerous portions of the series from various cuts and injuries sustained by characters, I want to say it was extremely rare that you would have seen blood splattering off and away from the characters. Partly because of the ratings restrictions from trying to keep the show's TV14 rating, but arguably also from an aesthetic and artistic choice to keep the show visually focused so that it was more about the fighting and less about the gore (Hence things like Cell Jr.'s exploding into puffs of dust rather than blood and guts).



SWh1t34Gl3(SAS) wrote : It could be added to the event, but agree with Shenku, it's a bit too much. Gore scenes mostly happen when someone die in , and in -Lite, it would be quite shocking to have a "FINISH HIM" event when someone is at 1hp. ::

Gore scenes should more likely be reserved for a probable story mode.

Also EV_PAIN, in the system showed, is called very often to evaluate the right type of damages (light, medium, heavy) taken in a short period, thus triggering the appropriate sounds (and/or other things). So, if blood splashes were to be added, it would look even more gore than mortal kombat.. 'Smile

But maybe the characters could have a bit of blood dripping from their wounds in some cases (damaged states/pain (health drain) state)?

It is an interesting subject/add, but if the base system isn't finished, it won't be very useful at the moment.



You both are right about this, so it could be replaced by some kind of sparkles effects while hitting hm ? Also I was thinking about some new animations we could add.
Something like this :


As you can see there's Injured Krillin, we could make animations for injured characters, because you know...For example if Goku is at his max damange state he is still standing, like if he's not injured, so maybe we could start by this : "Adding Animations for damage state" after that we could add some effects instead of blood
Image
Something like this ^ .
This should make battles more dynamic I guess.

It depends of how we will use the piece of code that WhiteEagle gave.

Eagle The Purpose View user's profile Send private message

Reply with quote Monday, August 24, 2015

You both are right about this, so it could be replaced by some kind of sparkles effects while hitting hm ? Also I was thinking about some new animations we could add.
Something like this : https://hiscoreuk.files.wordpress.com/2009/04/dragon_ball_z__budokai_tenkaichi_2-wiiscreenshots15894screenshot0023.jpg



I personally think the whole animation domain should be reviewed. The rendering (quality), the syntax (flexibility) and the set of actions/animations (diversity).

But it is another story...

As for damage from mêlée effects, I don't remember seeing flashes like that in the anime. Maybe lines of speed in the movements would provide a more dynamic look to the mêlée, I don't know.. I haven't thought about that yet (priorities..). Note: I think there are shockwaves effects in ZEQ2-Lite when being in mêlée.

It depends of how we will use the piece of code that WhiteEagle gave.



I have already said that it may contain syntax errors and is probably not even be a good system to add. It was just to globally illustrate an idea I had to finish the pain event (most importantly to add pain sounds) implementation. I haven't got any feedback on it yet, so, it isn't wise to already go more thoroughly in the possibilities it can offers..

leogone View user's profile Send private message

Reply with quote Monday, August 24, 2015

Wh1t34Gl3(SAS) wrote :

You both are right about this, so it could be replaced by some kind of sparkles effects while hitting hm ? Also I was thinking about some new animations we could add.
Something like this : https://hiscoreuk.files.wordpress.com/2009/04/dragon_ball_z__budokai_tenkaichi_2-wiiscreenshots15894screenshot0023.jpg



I personally think the whole animation domain should be reviewed. The rendering (quality), the syntax (flexibility) and the set of actions/animations (diversity).

But it is another story...

As for damage from mêlée effects, I don't remember seeing flashes like that in the anime. Maybe lines of speed in the movements would provide a more dynamic look to the mêlée, I don't know.. I haven't thought about that yet (priorities..). Note: I think there are shockwaves effects in ZEQ2-Lite when being in mêlée.


Yup there are shockwaves effects.


Wh1t34Gl3(SAS) wrote :
I have already said that it may contain syntax errors and is probably not even be a good system to add. It was just to globally illustrate an idea I had to finish the pain event (most importantly to add pain sounds) implementation. I haven't got any feedback on it yet, so, it isn't wise to already go more thoroughly in the possibilities it can offers..



Yup that's why I said "it depends of how we will use it" Wink

Eagle The Purpose View user's profile Send private message

Reply with quote Monday, August 24, 2015

Once I get back home, I will try to implement the real system, but I don't have big hopes about that.

Something sure, I need to find out how to use existent timers instead of the int in the example...

Once this task done (if it will be), I will try to clean the junk in the the code a bit. Smile

Shenku RiO Incarnate View user's profile Send private message

Reply with quote Monday, August 24, 2015

Wh1t34Gl3(SAS) wrote :
As for damage from mêlée effects, I don't remember seeing flashes like that in the anime. Maybe lines of speed in the movements would provide a more dynamic look to the mêlée, I don't know.. I haven't thought about that yet (priorities..).



Unless I'm misremembering, you're right, there really weren't effects like that in the series, only the games. There were a few occasions where a character focused Ki into a physical attack (denoted by their fist glowing) but this was seldom seen, and usually for extremely slow but powerful blows (whether or not they actually hit...).

Note: I think there are shockwaves effects in ZEQ2-Lite when being in mêlée.



You're right here too, there are already shockwave effects tied into the mêlée system in ZEQ2-Lite (In the Stable Revision no less, possibly also in Public Beta 1 as well, although I don't have a copy of that handy on my laptop at the moment to double check), albeit it appears that they're a little inconsistent and seemingly random at times, but they are there...

Eagle The Purpose View user's profile Send private message

Reply with quote Tuesday, August 25, 2015

I think the most disturbing thing in ZEQ2-Lite's mêlée visual representation is the ki boost 2D effect, the kind of lines doing a circle around the middle of the screen. (cf: end of the following video)


Frieza and source code test - Mod Dragon Ball

Shenku RiO Incarnate View user's profile Send private message

Reply with quote Tuesday, August 25, 2015

Wh1t34Gl3(SAS) wrote : I think the most disturbing thing in ZEQ2-Lite's mêlée visual representation is the ki boost 2D effect, the kind of lines doing a circle around the middle of the screen. (cf: end of the following video)



Well that's more because of the way that boosting works in general than having anything to do with the mêlée mechanics/visuals. You can either disable it in the code if it really bothers you, or you can replace the image file for that lines effect with a completely transparent image.

Ideally, it'd be better and more accurate if the lines were more dynamic to match the situation and camera angles instead of just always being there when boosting, as well possibly as animating them, but for the moment it's just a static image which I agree is less than ideal. Of course, it's probably, like most other systems, only a placeholder until something better was designed, so I don't think it was intended to be kept as-is to begin with.

Of course, if you're feeling up to it, you can also simply replace the effect image with something else entirely that's more fitting to what you want, such as...:

Eagle The Purpose View user's profile Send private message

Reply with quote Tuesday, August 25, 2015

You said it, effects matching actions and camera angles. But it's, again, another thing.

Meh, even though I still don't have any feedbacks on the initial topic, at least we are writing a list of todo things. Rolling Eyes

Shenku RiO Incarnate View user's profile Send private message

Reply with quote Tuesday, August 25, 2015

To be honest, I didn't even understand exactly what you were suggesting in the original topic until you explained it to Leogone, but to me what you're suggesting in regards to that doesn't seem too far off, and it's roughly along the right vein of thought I think; I'm just not 100% sure that it's the best or most efficient method of getting the result that you want...

Eagle The Purpose View user's profile Send private message

Reply with quote Wednesday, August 26, 2015

Mmh.. Now I think about it, I have forgotten a little BIG detail.. How does ZEQ2-Lite register damages ?

Does these two variables accumulates for a court period ?

Which this idea is based on. (timer)

Or does these two variables update themselves at each damages taken ?

In this case, this code would be more adapted.

void checkPainEvents(){

int DamageValue1, DamageValue2;

DamageValue1 = pm->Postscript->powerLevel[plDamageFromMelee]; //These two variables are just here to simplify the interpretation

DamageValue2 = pm->Postscript->powerLevel[plDamageGeneric]; //These two variables are just here to simplify the interpretation

if(DamageValue1 >= 200 || DamageValue2 >= 200){ //If any kind of damage is over or equal to 200

EV_PAIN_LIGHT();

}

if(DamageValue1 >= 500 || DamageValue2 >= 500){ //If any kind of damage is over or equal to 500

EV_PAIN_MEDIUM();

}

if(DamageValue1 > 999 || DamageValue2 > 999){ //If any kind of damage is over 999

EV_PAIN_HEAVY();

}
}


But this is still an example and not the final code. I hope you get what I search to do with it.

Edit 27/08: in the case it's still not clear, the initial intent was to add pain sounds only (for now).

On a side note, this "pain intensity detector" could serve for a environment destruction system as well if not more. But I will maybe come back to that later....

Eagle The Purpose View user's profile Send private message

Reply with quote Saturday, August 29, 2015

okay, back home, testing right know ! This is the code I'm testing:

void checkPainEvents(){
   
if(pm->Postscript->powerLevel[plDamageFromMelee] >= 1 || pm->Postscript->powerLevel[plDamageGeneric] >= 1){

PM_AddEvent(EV_PAIN);
}

if(pm->Postscript->powerLevel[plDamageFromMelee] >= 4000 || pm->Postscript->powerLevel[plDamageGeneric] >= 4000){

PM_AddEvent(EV_PAIN1);
}

if(pm->Postscript->powerLevel[plDamageFromMelee] > 10000 || pm->Postscript->powerLevel[plDamageGeneric] > 10000){

PM_AddEvent(EV_PAIN2);
}
}



My theory is that the life is an int containing 32768 values. 0 to 32767. As for the damages, there should be a multiplier for each types, I don't really know, if it works as I implemented it, I think I have barely understood how it works.

Just ripping sounds from videos and here we go for the test. Smile

Edit: I have just discovered that there is a third damage source. pm->Postscript->powerLevel[plDamageFromEnergy]

going to add that in the code.

Also, the conditions doesn't seem to work. I'm thinking about the cause..

Eagle The Purpose View user's profile Send private message

Reply with quote Friday, October 16, 2015


ZEQ2-Lite Revision 1916 - Pain Sounds Test - Mod Dragon Ball

Used the burn power level function for the health checks. Edited the events list, added 3 sounds groups, cleaned some other places......

Eagle The Purpose View user's profile Send private message

Reply with quote Sunday, November 22, 2015

Fixes:

- Sounds are no longer playing at death.

- Added checks to pm->Postscript->lockedPlayer, pain sounds works in both ways now (self to opponent, self to self)

Eagle The Purpose View user's profile Send private message

Reply with quote Wednesday, December 30, 2015


ZEQ2-Lite Revision 1536 - Pain Event mêlée test - Mod Dragon Ball

Since the 1916's mêlée is currently disabled/broken, I had to import/adapt the feature on the 1536 to proceed the tests. Thanks to Vegeta (a.okay.a Bifrost) for helping on that last part!

As for the feature, it will need a short timer to slow down the frequency of sounds triggering, some conditions tweak and more variables for damages sources. Glad I got this result though, it made the overall much more immersive.

Post new topic Reply to topic

Actions

Online [ 0 / 6125]