Menu

#1826 BG: completely lower the moongate before Iolo speaks

Audio
closed-fixed
Rendering (151)
5
2022-02-20
2013-01-20
No

When you start a new BG game in the first scene, avatar steps out of the moongate, moongates lowers itself and Iolo speaks.
In the original the moongate is completely gone before Iolo speaks. In Exult the moongate is still partially shown and is frozen in animation while Iolo speaks.

Discussion

  • Jaesun

    Jaesun - 2013-01-20

    Also the moongate sound will play throughout Iolo's dialogue with you. The sound ends only after you finish speaking with Iolo.

     
  • Dominik Reichardt

    • Group: Cosmetic --> Audio
     
  • Knight Captain

    Knight Captain - 2017-05-14

    Sprites and scripts seem to need just another tick to complete.

    This bug can also be seen in the Wall of Lights cutscene.
    Create a new SI game.
    Teleport to Spinebreaker.
    When Anti-Shamino speaks, you can see the last frame of the "teleport here" sprite on Mad Iolo.

     
  • Dominik Reichardt

    thanks, maybe I can find the culprit with this information.

     
  • Dominik Reichardt

    It's out of my league. I think it needs an extra delay or a "wait for animation to finish" in ucsched.cc
    void Usecode_script::handle_event(..)

     
  • Jeff Freedman

    Jeff Freedman - 2017-05-15

    I'm starting to see the problem, and it has to do with the way we handle 'ticks' differently than the original. At the start of BG, there are two scripts executing simultaneously: one for the moongate and one for the Avatar. We use 200ms for each time tick, but it's often, randomly, a little more, like 203-211. The avatar's script has a 'wait for 10 ticks' before the call to start the conversation, and so we schedule that for 10x200 ms. The moongate's script should have been done by then, but those extra few ms for each tick puts it behind.

    I'm adding additional debugging output under one of the 'trace' flags to analyze this. I'm still not sure of the best way to fix it though. One thought is to have the 'wait n ticks' command not delay for nx200, but instead to schedule itself for each tick n times. That way it will also get the extra few ms and (probably) be in sync with other scripts. A better solution would be to have everything synchronized better, but that might be riskier as far as breaking things.

     
  • Marzo Sette Torres Junior

    One thing which may be the cause is that we always schedule delays based on the current time (SDL_GetTicks + delay) instead of the time at the start of the current game tick. We also tend to use "nonstandard" delays for a lot of things which should probably use gwin->get_std_delay().

    Of course fixing these would likely bump into another if the priority queue used to run actions does not preserve the order of the equivalent items already in it.One thing which may be the cause is that we always schedule delays based on the current time of the time at the start of the current tick.

     
  • Jeff Freedman

    Jeff Freedman - 2017-05-17

    I may have just fixed this, but will wait to see if my change breaks anything else. Previously, the execute_usecode_array intrinsic was scheduling the script one ms, but I believe the original scheduled it on the next tick. Changing that seems to fix the opening sequence in BG.

     
  • Jeff Freedman

    Jeff Freedman - 2017-05-17
    • status: open --> pending-fixed
    • assigned_to: Jeff Freedman
     
  • Dominik Reichardt

    • status: pending-fixed --> closed-fixed