User Tag List

Results 1 to 10 of 13

Thread: Script Execution Order

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,762
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.26%

    Script Execution Order

    @DarkDragon

    This is what I have on record. I believe it is is all correct, but I would not mind outside verification, and amendments if needed.


    //================================================== =====
    //--- Instruction Processing Order and General Timing ---
    ================================================== =======


    1. Instructions in Global script Init (if starting a new game)
    2. Instructions in Global Script OnContinue (is resuming a game)
    3. Instructions from FFCs that run on screen init, excluding draw instructions.
    Note: Instructions are handled on a per-ffc basis, in ID order; so a script on ffc ID 1 runs,
    then a script on ffc ID 2, up to ffc ID 32. If an ffc has no script, it is skipped.
    4. Instructions immediately inside the run() function of a global active script, if the game has just loaded.
    5. Instructions in the global active script's infinite loop prior to Waitdraw,
    6. Instructions from an ffc script positioned after (an illegal)
    Waitdraw() instruction in that script from the previous frame.
    Note: Requires being on at least the second frame of a game session.
    7. Screen bitmap drawing.
    8. Enqueued Script Drawing from the global active script, (and from ffcs on the previous frame).
    9.. Drawing Instructions in the global active script prior to Waitdraw().
    10. Instructions in an ffc script, excluding draw commands.
    Note: Instructions are handled on a per-ffc basis, in ID order; so a script on ffc ID 1 runs,
    then a script on ffc ID 2, up to ffc ID 32. If an ffc has no script, it is skipped.
    11. Screen Scrolling (2.50.2, or later)
    12. Waitdraw() in a global active script.
    13. Engine writing to Link->Dir and Link->Tile.
    14. FFCs enqueue draws for the next frame.
    Note: Instructions are handled on a per-ffc basis, in ID order; so a script on ffc ID 1 runs,
    then a script on ffc ID 2, up to ffc ID 32. If an ffc has no script, it is skipped.
    15. Instructions from item action scripts.
    16. Instructions from item collect scripts.
    17. Instructions in the global active script, called after Waitdraw()
    17(b). Screen Scrolling ( 2.50.0, and 2.50.1 )]
    18. Instructions in an OnExit script, if the game is exiting.
    19. Return to (3).

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social