Results 1 to 17 of 17

Thread: RockGone(RockX, RockY, RockCol: integer)

  1. #1
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default RockGone(RockX, RockY, RockCol: integer)

    Edit until MSI Comp over XD

    Join the fastest growing merchanting clan on the the net!

  2. #2
    Join Date
    Oct 2006
    Location
    C:\Program Files\SCAR 2.03
    Posts
    1,194
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You know this would be perfect for MSI... lol Although it probably wouldn't be noticed there atm because of the competition.

    Good work though I'll test and see what I can for you.
    [FONT="Garamond"][SIZE="3"]
    Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.
    [/SIZE][/FONT][URL="http://www.villavu.com/forum/forumdisplay.php?f=125"][IMG]http://i40.tinypic.com/r1lzdv.jpg[/IMG][/URL]

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

    Default

    Looks very nice, great work

    Quote Originally Posted by Special Ed View Post
    You know this would be perfect for MSI... lol Although it probably wouldn't be noticed there atm because of the competition.

    Good work though I'll test and see what I can for you.
    Yea! MSI COmpetition! I forgot that! xD Let me view it

    -Tsn.
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  4. #4
    Join Date
    Oct 2006
    Location
    C:\Program Files\SCAR 2.03
    Posts
    1,194
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey Another thing I noticed although it may not matter Inc is actually slower than Var:= Var + 1. Just a little tidbit of information. Also I suggest making RockCol an array of Integer that seems to make people happy nowadays, also would probably be more effective in this case as well.

    Also for

    SCAR Code:
    repeat
        Inc(rCount);
        Tol:= rCount mod 2;
        if (FindColorSpiralTolerance(rx, ry, RockCol, RockX - 15, RockY - 15, RockX + 15, Rocky + 15, Tol))then
          break;
      until(rCount >= 30);

    why not just make it

    SCAR Code:
    repeat
        rCount:= rCount + 1;
        if(FindColorSpiralTolerance(rx, ry, RockCol, RockX - 15, RockY - 15, RockX + 15, Rocky + 15, rCount))then
        Break;
      until(rCount >= 15);

    other than that it looks good, I still need to test though.
    [FONT="Garamond"][SIZE="3"]
    Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.
    [/SIZE][/FONT][URL="http://www.villavu.com/forum/forumdisplay.php?f=125"][IMG]http://i40.tinypic.com/r1lzdv.jpg[/IMG][/URL]

  5. #5
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    No, actually, Var:= Var + 1 is slower. I'm guessing that the Inc function is coded in assembler.

    EX (This is Delphi code, it won't work in scar):
    SCAR Code:
    function Inc(Var: Integer): Integer;
    asm
      INC Var
    end;


    Also, I don't really see why this would be hard for people to make :\
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  6. #6
    Join Date
    Oct 2006
    Location
    C:\Program Files\SCAR 2.03
    Posts
    1,194
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hrmm... Well When I tested it Var:= Var + 1 was faster for me. Here try it once for me and tell me your numbers. Hmmm... Well i tested it just now, for Inc(i) got from 219 - 266ms and for i:= i + 1 i got 216 - 235ms. (Both are from 0 - 100,000).

    I thought Inc would be faster too, because it is a direct command, but from what I've seen i:= i + 1 was faster.
    [FONT="Garamond"][SIZE="3"]
    Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.
    [/SIZE][/FONT][URL="http://www.villavu.com/forum/forumdisplay.php?f=125"][IMG]http://i40.tinypic.com/r1lzdv.jpg[/IMG][/URL]

  7. #7
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok it doesn't really matter. Anyways I used the mod thing because I wanted it to check twice for the color.

    Join the fastest growing merchanting clan on the the net!

  8. #8
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    What was so special about this one?
    I didn't get to see it.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  9. #9
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    he forgot that he cant show stuuf he's using in the MSI competition

  10. #10
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by R0b0t1 View Post
    No, actually, Var:= Var + 1 is slower. I'm guessing that the Inc function is coded in assembler.

    EX (This is Delphi code, it won't work in scar):
    ScarScript:By Drunkenoldma
    function Inc(Var: Integer): Integer; asm INC Var end;

    Also, I don't really see why this would be hard for people to make :\
    In the new version, freddy added a Inc that increases every value you put in, probably a ASM one.. I guess its slower because you need to call a method very time, that takes up a lot of time if you do it millions of times 'Pretty sure about it'. Also in delphi Inc for integers is slower than Int := Int + 1.. I might be wrong.. But i timed them ^^

    ~Raymond
    Verrekte Koekwous

  11. #11
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    R0b0t, Inc is slower in SCAR.
    In delphi, it's the same speed.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  12. #12
    Join Date
    Oct 2006
    Location
    C:\Program Files\SCAR 2.03
    Posts
    1,194
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    R0b0t, Inc is slower in SCAR.
    In delphi, it's the same speed.
    Huzzah! Another Victory!

    Either way, it was really awesome Wizzup? it used space age technology and "Had a button that ordered free pizza!" I can't believe you missed it!

    Naw... but it was pretty good, well coded at least.
    [FONT="Garamond"][SIZE="3"]
    Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.
    [/SIZE][/FONT][URL="http://www.villavu.com/forum/forumdisplay.php?f=125"][IMG]http://i40.tinypic.com/r1lzdv.jpg[/IMG][/URL]

  13. #13
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Special Ed View Post
    Huzzah! Another Victory!

    Either way, it was really awesome Wizzup? it used space age technology and "Had a button that ordered free pizza!" I can't believe you missed it!

    Naw... but it was pretty good, well coded at least.
    funny thing is I lost them, forgot to save. O well, I know what I did

    EDIT: Wizzy, made two different ones around 30-40 lines long each

    Join the fastest growing merchanting clan on the the net!

  14. #14
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I got one which is one line long...
    Administrator's Warning:


  15. #15
    Join Date
    Apr 2007
    Location
    The Buckeye State
    Posts
    482
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well aren't you so special Sumilion :P.

    Guess i'll have to wait for the comp. to be over before i can look at it.
    I like my coffee black just like my metal.

  16. #16
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sumilion View Post
    I got one which is one line long...
    rockgone(x,y,......)

  17. #17
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so do i lol, but I wanted to make a more advanced one that might be a little more useful. in fact, I dont even have one in my powerminer. Just use if( not FollowRock)

    Join the fastest growing merchanting clan on the the net!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. function SendKeyboard(FKey:Integer; Text:String): Integer;
    By Daniel in forum Research & Development Lounge
    Replies: 4
    Last Post: 07-18-2007, 04:28 PM

Posting Permissions

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