Results 1 to 7 of 7

Thread: New format is much faster when looping

  1. #1
    I'm working on converting my time flow accelerator and dynamic weather changer (some of you may be familiar with these) to arma, and I thought I may have to scrap the time flow changer because it was sucking down processor power if it was running precisely enough to not look like crap.

    Once I converted it to the new format using proper loops and such though, it flies.

    Nearest I can figure, the old format needs to reread the script in memory from top to the line marker everytime, but the new format doesn't since It's using proper loops.

    --------------------------------------------
    Doesn't seem like it makes as big a difference as I thought at first. It undoubtedly makes a difference, it's just not *that* big, although it may be for certain very large scripts. I don't know.



    Everything I have released for ARMA can be found here.

  2. #2
    Sounds great!

    Still fooling around testing some of the new script commands and hopefully documentation will improve in a not to distant future...

    /KC

  3. #3
    Interesting!

    Which commands and structures in particular were you using?
    Were you able to do a side-by-side comparison of their performance in OFP vs. ArmA?

  4. #4
    First Sergeant
    Join Date
    Mar 10 2006
    Location
    KC, MO, USA
    Posts
    897
    Author of the Thread
    No, side by side, both in arma. Considering that, for me, arma actually runs better overall (more men + better graphics), it would be impossible to compare the 2 games side by side in this manner.

    But a sqf using a
    while {condition} do
    {
    dostuff
    };
    structure is better than using a sqs with a
    #loop
    dostuff
    ? condition : goto "loop"
    style structure.

    I'm not really sure by what percentage or whatever. I'm thinking it's going to vary by file lengh and the exact location of the loop anyways.

  5. #5
    But while isn't really new to ArmA. "While" has been around for a while...

    Did you use any other new structures that executed faster?

  6. #6
    Quote Originally Posted by (Kronzky @ Dec. 19 2006,16:38)
    But while isn't really new to ArmA. "While" has been around for a while...

    Did you use any other new structures that executed faster?
    While isn't new, what is new is the ability to use while in scripts with new commands such as sleep to replace the goto structure.
    VBS2 Designer

    Quote Originally Posted by Armored_Sheep View Post
    I like to call Arma a sandbox game that works pretty much like LEGO - you buy it not just because you want to have a nice car from the main picture on its box, do you?

  7. #7
    First Sergeant
    Join Date
    Mar 10 2006
    Location
    KC, MO, USA
    Posts
    897
    Author of the Thread
    No, I'm saying the difference is the sqf script syntax running a real loop better than a fake loop.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •