Sully help (conceptual).
Displaying 1-5 of 5 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
mcgrue

So, I recognized a need for a device to store all HP/MP recovery/damage changes during the computation of a battle skill so that all of the bouncy numbers could be triggered at the same time in a skill that did many different bouncings. This is useful because as you loop over all of the targets of a multiple-target effect, you can store the damage/recovery into this device, and it can be called at the end to bounce everything (and while everything is bouncing it can say "hey, I'm still bouncing!" to the main battle engine which will delay any further progress of the system while it's still going on. (or alternatly not, if you want a more active-time battle system.)

Anyways, I'm running into a little structural dilemma because sometimes you'll want to set sprite frames or animation rows to occur for anyone being "bounced". A Hit frame for damage-reciving, a "Yay!" frame if you're being healed. Further-furthermore, usually you want a short animation blitted over the top of the target sprite (but under the bouncy numbers) for the final bit of the spell effect animation (be it the final burst of flame in a fire spell, or the lowly "slash" animation of a mundane attack.)

I guess just laying out here the solution helps a bit, and I'll restructure this little bouncy-number-handler-factory to be more 1:1 with battle entities and allow for default pose/sprite-animations that can be manually overriden and optional animation-overlays for slashies and spell effects. That's more complex than I'd originally imagined this tool, but should be fairly elegant in the end-use.

Does anyone have any better suggestions about how to tackle this problem?

...

...does anyone else even understand this problem? :D

Posted on 2005-12-07 00:35:30

Jesse

I'm confused about something here. When you're looping over people in a battle applying damage for an effect, why does that need to be cached until later? Doesn't all the damage get assigned when the skill is triggered, and so in one frame? It seems to me that you can just start all the animations/special frames/bouncy digits immediately, and they'll be in sync. You'll still need to set some timer somewhere to prevent the engine from going when bouncing.

Otherwise, if I'm misunderstanding something and you really do need this fancy caching gizmo, that sounds like a reasonable approach to me, Grue. The only alternative that springs to mind is telling each entity in the battle what they are to do, and then triggering them all at once. (Some kind of a "play this when I say so" function.) But I think your original idea sounds cleaner.

Posted on 2005-12-07 07:33:28

mcgrue

You only want the bouncy numbers to generally happen at the end of a skill animation. Here's how a skill generally happens:

1. Target declaration
2. Save targetting onto battle action queue, wait until the action's delay has expired.
3. Calculate all damage and effects based on the skill's particulars and the targets involved.
4. Do the pretty, pretty effects.
5. Show the bouncy numbers, resolve the actual HP/MP changes.

We're calcing the actual effects of the skill in step 3, but showing them in 5. I sorta want the skill programmer to just add damage amounts via a single function in their implementation of step 3, and have this universal number-handling widget automatically take care of step 5, since it's pretty darn ubiquitous.

In the end, anyone wanting to script a battle effect generally only needs to code a resolution function (step 3) and a pretty, pretty effect function (step 4), unless they need to make a super-special targetting function that isn't already provided, in which case they'll need to do that too. But, yeah...

Clearer now?

Posted on 2005-12-07 10:00:39

Jesse

Yeah, that makes sense, since the effects shown might depends on the damage/targets/whatever, right?

It would still work if you could let the person write:

int doSkill(targets, etc.) {
// calculate damage with targets, whatever
showEffects(...)
applyDamage(...)
}


Which would let you do damage applying at the same time as bouncy-number display. But then you'd need to run the whole engine inside showEffects, so it would get a bit messy.

EDIT: But doing this would also let people show the damage whenever they wanted, and possibly even interspersed with different effects. That could be cool.

Posted on 2005-12-07 10:59:34 (last edited on 2005-12-07 11:00:30)

mcgrue

Cool, and possible with my little tool-thing even, but definitly for advanced users who understand the whole system.

Posted on 2005-12-07 13:49:02


Displaying 1-5 of 5 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.