bugBattle for Wesnoth - Bugs: bug #21335, [delay] ignores acceleration

 
 
Show feedback again

bug #21335: [delay] ignores acceleration

Submitted by:  Dan Gerhards <beetlenaut>
Submitted on:  Sun 08 Dec 2013 01:53:59 AM UTC  
 
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalItem Group: WML
Status: In ProgressPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.11.7+devOperating System: Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 19 Jul 2014 08:23:52 PM UTC, comment #5:

dublicate of 17982? (by the same person)

Anonymous
Fri 11 Jul 2014 11:11:14 PM UTC, comment #4:

Ok, following discussion on irc, accelerated should not be the default for this tag:

<shadowm> iceiceice: Could you please not merge #245 as is? My campaign relies heavily on [delay] being independent from user configuration.
<iceiceice> y i wont merge
<iceiceice> how do you use delay?
<iceiceice> not for animations?
<shadowm> Pauses in dialog, music transitions, sound effects in cutscenes, etc.
<iceiceice> really?
<iceiceice> ok this is used for much more things then i realized
<iceiceice> *many more
<shadowm> I don't think it should be a problem if it had an optional flag to behave like animation timings that defaulted to false.

I am recategorizing as a feature request, I have a PR that adds the optional tag here: https://github.com/wesnoth/wesnoth/pull/245

Plan to merge if this resolves the issue.

Chris Beck <involution>
Project Member
Fri 11 Jul 2014 06:32:41 PM UTC, comment #3:

Ah I see, I misread your post: "Delay is usually used to time animations that don't involve units."

I looked up what controls the sign blinking, it is the [delay] command in WML apparently:

https://github.com/wesnoth/wesnoth/blob/5b72fe99a50bbdece9b540af74c652ab3c7d5a24/data/core/macros/interface-utils.cfg#L36

Such a tag could only be used for animations, if the acceleration setting doesn't affect it that's pretty clearly a bug imo.

The [delay] tag is "implemented" in lua, but all it does is call C++:

https://github.com/wesnoth/wesnoth/blob/762efc278f645db185963ce97bbc907e4e2b2c59/data/lua/wml-tags.lua#L799

https://github.com/wesnoth/wesnoth/blob/6f4763ce0467c83fd8946c3385306a313f289203/src/scripting/lua.cpp#L3421

I think a reasonable solution is to make the implementation divide the delay time by the display's turbo speed, similarly to how the unit animations work: https://github.com/wesnoth/wesnoth/blob/0ebaae5acf4afc8eb0dee59535ae48a968ab7bd5/src/unit_animation.cpp#L1384

Do you agree with this?

Could also add an optional "ignore_acceleration" boolean flag to [delay] but idk if it should be necessary.

Chris Beck <involution>
Project Member
Fri 11 Jul 2014 04:36:45 PM UTC, comment #2:

No, it definitely doesn't work. It seems like it is intended to, so that makes this a longstanding bug instead of a feature request.

You can see an example of this in the first scenario of HttT, because the macro that makes a signpost blink uses [delay] for its timing. Watch it at acceleration 1 and 16. (You can skip all the dialog.) The difference should be obvious, but actually, the signpost will blink at the same speed.

Dan Gerhards <beetlenaut>
Project Member
Thu 10 Jul 2014 07:56:53 PM UTC, comment #1:

Are you sure it doesn't currently do this? This seems to be already implemented here:

https://github.com/wesnoth/wesnoth/blob/0ebaae5acf4afc8eb0dee59535ae48a968ab7bd5/src/unit_animation.cpp#L1387

Chris Beck <involution>
Project Member
Sun 08 Dec 2013 01:53:59 AM UTC, original submission:

Delay is usually used to time animations that don't involve units. Those animations only look good for a narrow range of accelerations. They are usually too slow or too fast. I would like a key for delay called "proportional" that makes the delay timed to normal speed. If the player is using double speed, the delay is cut in half and so on.

Alternatively, allowing the author to access the acceleration currently being used would make this possible to write as a macro, and may have other uses as well.

Dan Gerhards <beetlenaut>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by involution (Posted a comment)
  • -unavailable- added by beetlenaut (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 11 Jul 2014 11:11:14 PM UTCinvolutionCategoryBug=>Feature Request
      StatusNone=>In Progress
    Fri 11 Jul 2014 04:36:45 PM UTCbeetlenautCategoryFeature Request=>Bug
      SummaryMake delay proportional to acceleration=>[delay] ignores acceleration
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup