Page 1 of 3 123 LastLast
Results 1 to 25 of 57

Thread: [Release] SCAR Titan 4.00 Pre-Alpha

  1. #1
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default [Release] SCAR Titan 4.00 Pre-Alpha

    Hey guys,

    Today I'm releasing the pre-alpha of SCAR Titan 4.00, the future of SCAR.

    SCAR 4 will be about 50% rewritten from scratch, the main IDE will be rewritten and like half of the core. Backwards compatibility to SCAR Divi is not being maintained to get a fresh start where I can lay out everything nicely without any old compatibility that has to be maintained. It would be fairly impossible anyway because of the changes to the scripting and such.

    Currently the application isn't much to look at yet, except for some basic functionality and some functions in the core, it doesn't do that much yet. But it's growing fast, as I go along I can merge in more stuff from Divi as well.

    Includes are now divided up into namespaces, each represented by a unit, for more info about that, check out the release topic. The core is also divided up into namespaces.

    To provide some measure of backwards compatibility, I've created the namespace Legacy, which contains the TLegacyPlugin class which can be used to load plugins written for SCAR Divi. The class lets you retrieve pointers to functions in the plugin. Types have to be declared in the script itself.

    Some new features are classes, interfaces, operator overloading, pointers, overloading, ... A more complete list can be found in the release topic as well.

    I've also gone ahead and write a wrapper unit for SMART in case anyone would like to use it with SCAR 4. It contains all functions from SMART 6.6 and it automatically links SMART functions into the core.

    The latter can be done by using the new core structure SCAR maintains. To make it easier to switch between in-/output methods, SCAR now has functions like Set_GetMousePos, which allows you to set a function which should be called by GetMousePos. That way one could for example easily switch between SMART or color based macroing without having to change large quantities of code.

    SCAR Titan compiles scripts to native machine code rather than interpreting scripts like SCAR Divi, this results in the scripts themselves being about 100 times faster, almost as fast as native code in plugins. This will reduce a lot of the need for plugins in general.

    The release topic: http://forums.scar-divi.com/thread-86.html
    The svn: http://svn.scar-divi.com/titan/
    The manual: http://wiki.scar-divi.com/titan/
    The SMART wrapper: http://svn.scar-divi.com/titan_wrappers/SMART.scar

    To use the SMART wrapper, put it in the Includes folder or the script's folder and include it by adding "uses SMART;" to the script. An example:
    SCAR Code:
    uses
      SMART, Mouse, Time;
    begin
      SmartSetup('http://world1.runescape.com/',
            'plugin.js?param=o0,a0,m1', 765, 503, 's');
      Wait(5000);
      repeat
        SetMousePos(Random(765), Random(503));
        Wait(100);
      until False;
    end.

    The Embedded_SMART.dll should be placed in the same folder as SCAR, this will soon change to the Plugins folder.

    I hope everyone will enjoy this new stage in SCAR's development.

    ~Freddy
    Last edited by Freddy1990; 07-13-2011 at 11:34 PM.

  2. #2
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Wooooah, Heavy stuff!

    It's looking great so far Freddy!!!

  3. #3
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Nice job freddy!

  4. #4
    Join Date
    Feb 2008
    Posts
    748
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Great work Freddy!

  5. #5
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    It's so fast!!!

    SCAR Code:
    var
      I, X : Integer;

    {$IFDEF SIMBA}
      T : Integer;
    {$ENDIF}

    begin
      {$IFDEF SIMBA}
        T := GetSystemTime;
      {$ENDIF}
      for I := 0 to $FFFFFF do
        X := I * 1;
      {$IFDEF SIMBA}
        WriteLn(GetSystemTime-t);
      {$ENDIF}
    end.

    SCAR: 72ms E2: Tested 10 times, average of 32ms
    Simba: I have no idea. I let it run for 10 seconds and nothing happened. E: 34694ms


    E3: I am confused and amazed at the same time.

    How can this be???
    SCAR Code:
    var
      I : Integer;      
      X : LongInt;

    {$IFDEF SIMBA}
      T : Integer;
    {$ENDIF}

    begin
      {$IFDEF SIMBA}
        T := GetSystemTime;
      {$ENDIF}
      for I := 0 to $FFFFFF do
        X := I * $FFFFFF;
      {$IFDEF SIMBA}
        WriteLn(GetSystemTime-t);
      {$ENDIF}
    end.
    SCAR: 0ms
    Simba: 34242ms.
    Last edited by Zyt3x; 07-14-2011 at 12:03 AM.

  6. #6
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    I actually forgot to mention something important... SCAR 4 supports c++ operators:
    SCAR Code:
    var
      i: Integer = 0;
    begin
      i += 2;
      Print(i++);
      Print(++i);
    end.

    EDIT:
    Quote Originally Posted by Zyt3x View Post
    I am confused and amazed at the same time.

    How can this be???
    SCAR Code:
    var
      I : Integer;      
      X : LongInt;

    {$IFDEF SIMBA}
      T : Integer;
    {$ENDIF}

    begin
      {$IFDEF SIMBA}
        T := GetSystemTime;
      {$ENDIF}
      for I := 0 to $FFFFFF do
        X := I * $FFFFFF;
      {$IFDEF SIMBA}
        WriteLn(GetSystemTime-t);
      {$ENDIF}
    end.
    SCAR: 0ms
    Simba: 34242ms.
    Well, you might get a more accurate reading with the Time.SysTime (GetSystemTime) function I just added, but yeah, it's possible because SCAR 4 compiles to native machine code, it runs the script directly on through the CPU instead of adding 500 layers of code that has to analyze every step of the process.
    Last edited by Freddy1990; 07-14-2011 at 12:10 AM.

  7. #7
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    OMG!! The C++ Thing got me and the speed too!.. LOL I'm sold. Although I would have liked: http://villavu.com/forum/showthread.php?t=65300

    It still got me.. Just because the operators are a hell of a lot easier for me. Hopefully it would let me write pro scripts much faster and easier.. Hmm Maybe a frost dragon one .
    I am Ggzz..
    Hackintosher

  8. #8
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    @Zyt3x: That last code you posted errors, though for some reason the error doesn't show, still working out some issues there... But anyway, this will give a more accurate measurement:
    SCAR Code:
    var
      I : Integer;      
      X : LongInt;
      T : Cardinal;

    begin
      {$IFDEF SIMBA}
        T := GetSystemTime;
      {$ELSE}        
        t := Time.SysTime;
      {$ENDIF}
      for I := 0 to $FFFFFF do
        X := I * 1;
      {$IFDEF SIMBA}
        WriteLn(GetSystemTime-t);
      {$ELSE}        
        Print(Time.SysTime-t);
      {$ENDIF}
    end.

  9. #9
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Exciting stuff mate. I trust this will be cross platform? You said it would be a while ago.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  10. #10
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    Exciting stuff mate. I trust this will be cross platform? You said it would be a while ago.
    You may have misunderstood me then I suppose, I do intend to build a cross-platform version at some point, but it will probably be a separated product, closer to SCAR Divi than SCAR Titan. I'm currently still waiting for cross-platform support to be added to Delphi, but that shouldn't be too long anymore. I do feel that due to my experience with programming for Windows and the fact that the majority of the users uses Windows, it is a priority to keep putting effort into that platform.

    On a side-note:

    SCAR Titan will not replace SCAR Divi. It contains a lot of things that might make it more difficult to pick up scripting for it, hence I will keep releasing updates to SCAR Divi and fixing bugs during the development of SCAR 4 and even SCAR 5 so people can use it to train their scripting skills and/or perform tasks that might not require an environment as complex as SCAR Titan. An example of this is that SCAR 4 will no longer feature window selection in such a way that it will be up to the scripter to handle windows. This will expand the flexibility of the system greatly, but increase the complexity slightly. A lot of tools and such will of course be offered to the scripter to compensate. For example, the SelectWnd function in the namespace Windows: http://wiki.scar-divi.com/titan/inde...dows.SelectWnd

    And finally:

    SCAR 4 is obviously under construction and still has quite a way to go. However, if someone were to want to develop for it, I will gladly prioritize the development of certain functions/features to help out.

    EDIT: When I'm not hibernating you can find me at irc.scar-divi.com #scar
    Last edited by Freddy1990; 07-14-2011 at 01:01 AM.

  11. #11
    Join Date
    Nov 2007
    Location
    46696E6C616E64
    Posts
    3,069
    Mentioned
    44 Post(s)
    Quoted
    302 Post(s)

    Default

    Love the c++ operators Nice work!
    There used to be something meaningful here.

  12. #12
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Another feature I forgot to mention is unicode support:
    SCAR Code:
    begin
      Print('ႤᆇᆺᇙፙጯᏬᓍᚙᠧᦹ');
    end.

  13. #13
    Join Date
    Jan 2011
    Location
    Denver, CO
    Posts
    1,351
    Mentioned
    2 Post(s)
    Quoted
    72 Post(s)

    Default

    Quote Originally Posted by Freddy1990 View Post
    I actually forgot to mention something important... SCAR 4 supports c++ operators
    I just jizzed.

    Quote Originally Posted by Freddy1990 View Post
    Another feature I forgot to mention is unicode support:
    SCAR Code:
    begin
      Print('ႤᆇᆺᇙፙጯᏬᓍᚙᠧᦹ');
    end.
    Also an outstanding feature, I remember running into some issues with this when I was trying to read characters unique to Portuguese with Simba.

  14. #14
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Will this support SRL Includes?? And do you know why srl wont work with my scar3.22portable?(win7). It gives me an error all the time.

  15. #15
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    The only really script changing changes that you have at the moment are the units. Everything else is really just adding cool new features as far as I can tell. And tbh the units is really the only thing that i don't like. It just seems like it takes up unecessary space and is meh.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  16. #16
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    Quote Originally Posted by Dan Cardin View Post
    The only really script changing changes that you have at the moment are the units. Everything else is really just adding cool new features as far as I can tell. And tbh the units is really the only thing that i don't like. It just seems like it takes up unecessary space and is meh.
    So the major speed increase doesn't matter?

  17. #17
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Yeah and all other cool stuff doesn't matter? From what I think they matter a lot!

    ~Home

  18. #18
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by KingKong View Post
    Will this support SRL Includes?? And do you know why srl wont work with my scar3.22portable?(win7). It gives me an error all the time.
    SCAR 4 is not backwards compatible and I doubt the SRL devs will be moving to SCAR 4 rathern than Simba. However, you're running a bit behind there... Get SCAR 3.25: http://www.scar-divi.com/

    Quote Originally Posted by Dan Cardin View Post
    The only really script changing changes that you have at the moment are the units. Everything else is really just adding cool new features as far as I can tell. And tbh the units is really the only thing that i don't like. It just seems like it takes up unecessary space and is meh.
    Well, it's how a programming language works... SCAR 4 is a lot more advanced, there was simply no way to keep using the (very messy) include method... This also offers a whole world of possibilities as well... You actually have to define something in the interface section of a unit to make it accessibly to other units, this means you can hide the inner workings of a unit from others units that shouldn't be accessed. It's basically similar to c++. You have the header files and the cpp files. The header file is the interface section and the cpp file si the implementation section.

    Aside from that, I don't really see how this is not a big change, the entire code is being rewritten, there's tons more OOP and functions becoming available... For example: http://wiki.scar-divi.com/titan/inde...tle=Inet.THTTP
    Last edited by Freddy1990; 07-14-2011 at 02:42 PM.

  19. #19
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Did that speedtest, guess zytex got a faster pc:

    simba: 57398 <- av. of 3 tests
    scar titan: 78 <- av. of 8 tests(no speed difference between them..)
    Working on: Tithe Farmer

  20. #20
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by masterBB View Post
    Did that speedtest, guess zytex got a faster pc:

    simba: 57398 <- av. of 3 tests
    scar titan: 78 <- av. of 8 tests(no speed difference between them..)
    Since the scripts are compiled directly to machine code, the difference in cpu speed will be more obvious when comparing running SCAR 4 on different machines. However, if you compare it to SCAR Divi, the obvious conclusion is that it's always tons faster of course.

  21. #21
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Did even more testing. It really is incredible fast.
    Simba Code:
    var
      I : Integer;
      A : Array of Integer;
      T : Cardinal;
    begin
      {$IFDEF SIMBA}
        T := GetSystemTime;
      {$ELSE}
        t := Time.SysTime;
      {$ENDIF}
      setLength(A,$FFFFFF);
      for I := 0 to $FFFFFE do
        A[I] := Random($FFFFFE);
      {$IFDEF SIMBA}
        WriteLn(GetSystemTime-t);
      {$ELSE}
        Print(Time.SysTime-t);
      {$ENDIF}
    end.

    327ms against 94131ms

    Wooot, even the wait function is improved:
    Simba Code:
    var
      T : Cardinal;
    begin
      {$IFDEF SIMBA}
        T := GetSystemTime;
        Wait(100);
        WriteLn(GetSystemTime-t);
      {$ELSE}
        t := Time.SysTime;
        Time.Wait(100);
        Print(Time.SysTime-t);
      {$ENDIF}
    end.

    94ms versus 109ms
    Last edited by masterBB; 07-14-2011 at 03:31 PM.
    Working on: Tithe Farmer

  22. #22
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Actually, the wait function still has to be adapted, it currently just waits, which is obvious, but for example, if you tell it to wait 5000000 ms, you have to wait that long before the script can stop.

    EDIT: That Random function will also be gone in the next build, it was predefined in the engine, took it out because Random is defined as Rnd in the namespace Math.
    Last edited by Freddy1990; 07-14-2011 at 03:09 PM.

  23. #23
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    I wonder, if I use the MML from simba with scar titan, will I be able to run srl even when your function names and such are different?
    Working on: Tithe Farmer

  24. #24
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    3,137
    Mentioned
    3 Post(s)
    Quoted
    5 Post(s)

    Default

    Well, it's probably possible to port it I suppose...

  25. #25
    Join Date
    Oct 2006
    Posts
    1,211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This looks really good Freddy, not gonna lie. I love the more OOP feel to it, and from the looks of those benchmarks of others, seems fast. Keep up the good work man, I'm sure this has great great potential. Thanks for the release
    Extinct.

    Formally known as Drags111.

Page 1 of 3 123 LastLast

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
  •