Portal-Zone Gothic-Zone Gothic II-Zone Gothic 3-Zone Gothic 4-Zone Modifikationen-Zone Download-Zone Foren-Zone RPG-Zone Almanach-Zone Spirit of Gothic

 

Page 17 of 17 « First ... 6101314151617
Results 321 to 325 of 325
  1. View Forum Posts #321 Reply With Quote
    Apprentice Rayzer's Avatar
    Join Date
    Sep 2014
    Location
    Poland
    Posts
    43
     
    Rayzer is offline
    Yes, but there are also FF functions with delay in ms. People are using them instead triggers for example for regeneration script etc. And then there is a problem if game motion has changed.

  2. View Forum Posts #322 Reply With Quote
    Local Hero Mark56's Avatar
    Join Date
    Sep 2010
    Posts
    243
     
    Mark56 is offline
    Well make pull request with the new option to follow factor motion delay. Even though minimal number of mods change game speed, changing frame functions delay to respect factor motion would break one or the other... If they change game speed and use frame function for game time related events, it's their bad design.
    On the other hand, it is surely needed feature. As I remember Anim8 calculations use system time difference and only check if game is paused, which makes it also game time independent. This package would also benefit from such feature.

  3. View Forum Posts #323 Reply With Quote
    Apprentice Rayzer's Avatar
    Join Date
    Sep 2014
    Location
    Poland
    Posts
    43
     
    Rayzer is offline
    I'm aware of it. That's why I sugested separate functions that would be dependent on factor.

  4. View Forum Posts #324 Reply With Quote
    Knight mud-freak's Avatar
    Join Date
    Dec 2005
    Posts
    1,323
     
    mud-freak is offline
    Recently, Lehona introduced a second timer, that runs separately and only while the game is running. So, the ground work is already laid. Nevertheless, this new game timer, much like the original timer, runs with Ikarus's MEM_GetSystemTime, which is based on the system time. I am not sure how to implement the motion factor easily.

    Alternatively, you could write a function that iterates over all active frame functions and multiplies their delay value by a certain value. In the event of changing the motion factor, you could call this function passing the same multiplier. Here in pseudo code:

    Code:
    setNewMotionFactor(int factor)
        zCTimer.factorMotion = factor
    
        for all ff in activeframefunctions
            ff.delay *= factor

  5. View Forum Posts #325 Reply With Quote
    Local Hero Mark56's Avatar
    Join Date
    Sep 2010
    Posts
    243
     
    Mark56 is offline
    So basically we have 2 frame dependent timers, the second being just variation that skips "MEM_Game.timeStep", which is basically the same (it's just quality of life improvement).
    According to this, the calculation Rayzer has, should be correct:
    Code:
    ff.next = ff.delay * (1/factor.motion)
    Maybe we should make little refactor, where:
    Code:
    Timer - real time since last frame
    GameTimer - game time since last frame (frame independent)
    And then make Frame functions with possibility to "pause" with game and choose timer to use.
    This would add more flexibility for FFs to chose paused behavior and timer used in "constructor".

    Also I noticed, FFs are not "precise" because they just execute on nearest frame thats after delay, so they actually accumulate imprecision over time. Might be worth implementation, pseudo precise FF.

    Pseudocode:
    Code:
    if(timer >= itm.next) {
      var frame_delay; frame_delay = timer - itm.next;
    
      if(itm.delay) {
        itm.next += itm.delay - frame_delay;
      }
    }

Page 17 of 17 « First ... 6101314151617

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Impressum | Link Us | intern
World of Gothic © by World of Gothic Team
Gothic, Gothic 2 & Gothic 3 are © by Piranha Bytes & Egmont Interactive & JoWooD Productions AG, all rights reserved worldwide