Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 57

Thread: [Release] SCAR Titan 4.00 Pre-Alpha

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

    Default

    I didn't mean the other stuff wasn't big changes, I meant that they weren't really things that would hugely break backwards comaptibility or be hugely different in terms of how you script. Don't get me wrong I like the speed and c++ operators and such.

    As for units, I wasn't talking about the header file/cpp file distinctions. I meant that the actual including seemed a bit clunky but after looking at it again the only thing I don't particularly like is having to do folder.include. It just seems odd. Oh well, no doubt you know better than I and I'll get used to it.

    Edit: also is there any particular purpose that you are aiming to have Titan be leaning towards? I mean you split color into it's own unit, I would think that things that you expected to be used in every script to be built in. And if not color or types then....?
    Last edited by Dan Cardin; 07-14-2011 at 04:36 PM.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    Quote Originally Posted by Dan Cardin View Post
    I didn't mean the other stuff wasn't big changes, I meant that they weren't really things that would hugely break backwards comaptibility or be hugely different in terms of how you script. Don't get me wrong I like the speed and c++ operators and such.

    As for units, I wasn't talking about the header file/cpp file distinctions. I meant that the actual including seemed a bit clunky but after looking at it again the only thing I don't particularly like is having to do folder.include. It just seems odd. Oh well, no doubt you know better than I and I'll get used to it.

    Edit: also is there any particular purpose that you are aiming to have Titan be leaning towards? I mean you split color into it's own unit, I would think that things that you expected to be used in every script to be built in. And if not color or types then....?
    reflection :P
    Extinct.

    Formally known as Drags111.

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

    Default

    Quote Originally Posted by Dan Cardin View Post
    I didn't mean the other stuff wasn't big changes, I meant that they weren't really things that would hugely break backwards compatibility or be hugely different in terms of how you script. Don't get me wrong I like the speed and c++ operators and such.

    As for units, I wasn't talking about the header file/cpp file distinctions. I meant that the actual including seemed a bit clunky but after looking at it again the only thing I don't particularly like is having to do folder.include. It just seems odd. Oh well, no doubt you know better than I and I'll get used to it.

    Edit: also is there any particular purpose that you are aiming to have Titan be leaning towards? I mean you split color into it's own unit, I would think that things that you expected to be used in every script to be built in. And if not color or types then....?
    Yeah, I get it... The using of Folders in the unit name was a design choice I took to avoid ambiguity and clashing unit names, I discussed it with kaitnieks and we both agreed it was the best choice. Of course we're used to Delphi which uses units and almost no include files.

    I'm dividing everything up into namespaces to get a more tidy overview of things. Aside from color there will also be a namespace Bitmap, DTM and OCR.

  4. #29
    Join Date
    Feb 2006
    Location
    Pennsylvania
    Posts
    1,524
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Great work Freddy

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

    Default

    what happens if the included file and the unit name dont match
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    Quote Originally Posted by Dan Cardin View Post
    what happens if the included file and the unit name dont match
    Compiling error

  7. #32
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,193
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    Looks great Freddy. I might try coding on it just to get some C++ practice.

    ~BraK

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

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

    Default

    How is crash handling? I currently have issues where if smart crashes with simba then everything just crashes and I'll never know what the error was.
    Extinct.

    Formally known as Drags111.

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

    Default

    Hmm, like every version of SCAR it comes with built-in error reporting

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

    Default

    Also Freddy, is there a way to do inherited including of units? Like if i have a Reflection unit and it has
    Code:
    uses
        SMART;
    if I just include Reflection will SMART automatically be included as well?
    Extinct.

    Formally known as Drags111.

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

    Default

    No, if you want to use an include you have to include the unit.

  12. #37
    Join Date
    Nov 2006
    Location
    Planet Earth
    Posts
    351
    Mentioned
    0 Post(s)
    Quoted
    26 Post(s)

    Default

    wow great work Freddy, keep it up!

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

    Default

    Works great so far! Porting some random stuff to play with it
    Extinct.

    Formally known as Drags111.

  14. #39
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    SCAR 3.25: 85223ms
    Simba (PS): 113350ms

    SCAR 4: 218ms
    Simba (Lape): 3729ms

    Simba Code:
    program new;
    var
      I: LongInt;
      A: array[0..$FFFFFE] of LongInt;
      T: LongInt;
    begin
      T := GetTickCount();
      for I := 0 to $FFFFFE do
        A[I] := Random($FFFFFF);
      WriteLn(GetTickCount() - T);
    end.

    SCAR Code:
    program new;
    var
      I: LongInt;
      A: array[0..$FFFFFE] of LongInt;
      T: LongInt;
    begin
      T := Time.SysTime();
      for I := 0 to $FFFFFE do
        A[I] := Math.Rnd($FFFFFF);
      Print(Time.SysTime() - T);
    end.
    Last edited by Dgby714; 07-15-2011 at 03:26 AM.

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

  15. #40
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Freddy what are you using to compile this code? Have you moved away from an interpreter?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

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

    Default

    Quote Originally Posted by Nava2 View Post
    Freddy what are you using to compile this code? Have you moved away from an interpreter?
    http://paxcompiler.com/

    The engine can do pretty much anything, even compile to exe and dll files. SCAR 5 should normally feature the multi language support, compiling to exe, threading and more as it will move to a project based system. However, I've decided to leave all of this out to keep down the development time and keep things somewhat familiar in SCAR 4.

    In the future the engine should also support c++ scripting and inline assembler.

    There's still a few issues with the engine that have to be addressed, but since it's a commercial product, it's fairly easy to get things fixed/added.
    Last edited by Freddy1990; 07-15-2011 at 08:14 AM.

  17. #42
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Freddy1990 View Post
    http://paxcompiler.com/

    The engine can do pretty much anything, even compile to exe and dll files. SCAR 5 should normally feature the multi language support, compiling to exe, threading and more as it will move to a project based system. However, I've decided to leave all of this out to keep down the development time and keep things somewhat familiar in SCAR 4.

    In the future the engine should also support c++ scripting and inline assembler.

    There's still a few issues with the engine that have to be addressed, but since it's a commercial product, it's fairly easy to get things fixed/added.
    =) I just had Drags see if it had inline awhile ago, was bumed to see it not there. nice that it will be tho

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

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

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

    Default

    SCAR Code:
    // Remember to choose the desktop as simba's active window.
    {$IFDEF SIMBA}
    {$ELSE}
    uses
      Windows, Color, Time;
    {$ENDIF}

    var
      T, I : Integer;
    {$IFDEF SIMBA}
    {$ELSE}
      H : HWND;
      DC : HDC;
    {$ENDIF}
     
    begin
      {$IFDEF SIMBA}            
     
        T := GetSystemTime;  
        for I := 0 to $FF do
          CountColor(clBlack, 0, 0, 100, 100);
        WriteLn(GetSystemTime - T);          
       
      {$ELSE}
        H := GetDesktopWnd;
        DC := GetDC(H);
           
        T := SysTime;  
        for I := 0 to $FF do
          CountColor(DC, 0, 0, 0, 100, 100);  
        Print(SysTime - T);            
       
        ReleaseDC(H, DC);
      {$ENDIF}
    end.

  20. #45
    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
    Freddy, does scar support mousekeys?
    Not yet, I'm hoping to get that done tonight. I just added FindColor and some tolerance support. Currently there's only support for tolerance algorithms 0 and 1 though, but the rest should follow soon. You'll also be able to use your own script-defined algorithms:

    SCAR Code:
    uses
      Types, Tolerance;
     
    function MyCompareColors(const c1, c2, Tol: Integer): Boolean;
    begin
      Print(ToStr(c1) + ', ' + ToStr(c2) + ', ' + ToStr(Tol));
      Result := False;
    end;

    begin                              
      Print(CompareColors(1, 2, 3));
      Set_CompareColors(@MyCompareColors);
      Print(CompareColors(1, 2, 3));
    end.

    Code:
    Succesfully compiled (16ms)
    true
    1, 2, 3
    false
    Script finished (0ms)
    And:

    SCAR Code:
    uses
      Types, Tolerance;
     
    function MyGetTol(const c1, c2: Integer): Integer;
    begin
      Result := 9001;
    end;

    begin                              
      Print(GetTol(1, 2));
      Set_GetTol(@MyGetTol);
      if GetTol(1, 2) > 9000 then
        Print('It''s over 9000!');
    end.

    Code:
    Succesfully compiled (16ms)
    1
    It's over 9000!
    Script finished (0ms)
    (Note that SimilarColors will also be used internally for tolerance comparison in find functions)
    Last edited by Freddy1990; 07-15-2011 at 10:58 AM.

  21. #46
    Join Date
    Jan 2008
    Location
    10° north of Hell
    Posts
    2,035
    Mentioned
    65 Post(s)
    Quoted
    164 Post(s)

    Default

    Quote Originally Posted by Zyt3x View Post
    SCAR Code:
    // Remember to choose the desktop as simba's active window.
    {$IFDEF SIMBA}
    {$ELSE}
    uses
      Windows, Color, Time;
    {$ENDIF}

    var
      T, I : Integer;
    {$IFDEF SIMBA}
    {$ELSE}
      H : HWND;
      DC : HDC;
    {$ENDIF}
     
    begin
      {$IFDEF SIMBA}            
     
        T := GetSystemTime;  
        for I := 0 to $FF do
          CountColor(clBlack, 0, 0, 100, 100);
        WriteLn(GetSystemTime - T);          
       
      {$ELSE}
        H := GetDesktopWnd;
        DC := GetDC(H);
           
        T := SysTime;  
        for I := 0 to $FF do
          CountColor(DC, 0, 0, 0, 100, 100);  
        Print(SysTime - T);            
       
        ReleaseDC(H, DC);
      {$ENDIF}
    end.
    You know there is {$IFNDEF Simba} right?

    Quote Originally Posted by Freddy1990 View Post
    Not yet, I'm hoping to get that done tonight. I just added FindColor and some tolerance support. Currently there's only support for tolerance algorithms 0 and 1 though, but the rest should follow soon. You'll also be able to use your own script-defined algorithms:

    SCAR Code:
    uses
      Types, Tolerance;
     
    function MyCompareColors(const c1, c2, Tol: Integer): Boolean;
    begin
      Print(ToStr(c1) + ', ' + ToStr(c2) + ', ' + ToStr(Tol));
      Result := False;
    end;

    begin                              
      Print(CompareColors(1, 2, 3));
      Set_CompareColors(@MyCompareColors);
      Print(CompareColors(1, 2, 3));
    end.

    Code:
    Succesfully compiled (16ms)
    true
    1, 2, 3
    false
    Script finished (0ms)
    And:

    SCAR Code:
    uses
      Types, Tolerance;
     
    function MyGetTol(const c1, c2: Integer): Integer;
    begin
      Result := 9001;
    end;

    begin                              
      Print(GetTol(1, 2));
      Set_GetTol(@MyGetTol);
      if GetTol(1, 2) > 9000 then
        Print('It''s over 9000!');
    end.

    Code:
    Succesfully compiled (16ms)
    1
    It's over 9000!
    Script finished (0ms)
    (Note that SimilarColors will also be used internally for tolerance comparison in find functions)
    Can't they just override the functions? There a reason there are Set_* procedures?

    Dg's Small Procedures | IRC Quotes
    Thank Wishlah for my nice new avatar!
    Quote Originally Posted by IRC
    [22:12:05] <Dgby714> Im agnostic
    [22:12:36] <Blumblebee> :O ...you can read minds

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

    Default

    Quote Originally Posted by Dgby714 View Post
    You know there is {$IFNDEF Simba} right?
    Totally forgot about that one

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

    Default

    Quote Originally Posted by Dgby714 View Post
    Can't they just override the functions? There a reason there are Set_* procedures?
    This allows you to set the algorithm globally, I'll probably also add a get method, however, with this the method the algorithm is also used internally by all tolerance functions. Imo it's the most flexible way to do it, and it's pretty clean too.

  24. #49
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    I'm very impressed, you have a lot of really nice things planned. Good luck and I hope it turns out as nice as it sounds.

  25. #50
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    PaxCompiler is awesome
    Looking good, Freddy! Looks like Titan is getting some of the best components around.
    Last edited by nielsie95; 07-15-2011 at 01:09 PM.
    Hup Holland Hup!

Page 2 of 3 FirstFirst 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
  •