Page 1 of 5 123 ... LastLast
Results 1 to 25 of 125

Thread: The League of Scripters

  1. #1
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default The League of Scripters

    Welcome!

    This topic will be the home to the "League of Scripters" unofficial competition & league, where every week I'll be putting up a problem, which is open for anyone to try and solve!

    The emphasis on the problems is not to give hard tasks, but tasks that have plenty of room for improving their speed. As all skilled scripters will know, Scar's main flaw is in its slow pace, so being able to take a slow function and speeding it up a lot is a vital ability for kick ass scripts.

    Points will be awarded for the first submissions and for the fastest scripts. As I am unsure of how many people will enter, I can't give exact numbers, but probably the points will be distributed for the first half of entries and for the fastest third of entries, with the fastest script getting a bit more points than the first entry.

    Everyone is open to submit a script to solve the problem and you are allowed 2 submissions, with the first being completely ignored if you send in a second. 3rd submissions onwards will not be counted, so don't be too rash in deciding to submit. If a script doesn't work, then it can't get any points, but Scar version based changes will be corrected as needed.

    All entries are to be PM'd to me. Unless stated, you are fine with me publishing your script for each other to learn from. If you disagree, please say so in the PM, however you must then consent to me being able to send it to an independent judge in case anyone thinks I'm being biased or if I am unable to judge for whatever reason.

    Plugins are not allowed at all. However, you may rely on external sauces as long as they accessible from within Scar - this is as much about ingenuity as it is about scripting ability. Likewise, all scripts must be Scar scripts and be in the form of a function. I'll be using Scar 3.15b to run the speed tests. If you feel that my times differ from yours, bear in mind I probably have a much worse computer. Likewise, if you feel that my Scar version may affect the times, do say and I'll run re-tests through a newer version, but I don't see any future problems that would be affected by changes in Scar version.

    It will hopefully run a while and at the moment there are no prizes, but there is a possibility for prizes in the future.

    Any questions, ask else try to leave the topic spam free - no need to tell me you are planning to participate as I'll get the idea when you send in a submission

    League table:
    Nielsie = 18 + 5; 23
    Raymond = 12;
    Cardin = 10;
    Bullzeye = 10;
    Killerdou = 10;
    DansTheMan = 8;
    Senrath = 6;
    RM = 6;
    Markus = 4;
    Toot = 2;
    Widget = 2;
    ToF = 1;
    Nadeem = 0;

    Problem 5
    Your problem, whether or not you choose to accept it, is two fold this week. These are not tiered tasks - you may enter one and one only. The points awarded will depend on how many people submit for the same problem - the more that enter the same, the more points awarded for the winner.

    The problems will be classed as problem A and problem B.
    Problem A
    A most unfortunate problem has arisen - RS has updated and no longer uses the same font even in the same piece of uptext! All that you know is that they use some what consistent colours much like they do now, but they differ enough from char to char that someone will have to make a whole new approach to text finding to do this! Luckily, someone has, but they are ahving trouble getting the input to use and this is where you come in!

    Problem A requires an algorithm that takes in a bitmap of the top left quarter or so of the main screen and returns a TPA of all points where there is text. It is to be believed that no other text apart from the uptext is present, however similar colours may also be there, so the more accurate the better. Likewise, it shouldn't be restricted to just one uptext colour as we all know that the colours differ for different things ie main bit that is in white, a little yellow bit to show the default NPC action then another little white bit for how many other options there are. For testing, it should be able to work with the current RS uptext. This function should therefore have a layout similar to:
    SCAR Code:
    function mixsters_UptextFilterer(bitmap: Integer): TPointArray;

    Problem B
    Ok, so the scene continues from Problem A - RS has updated and uptext has been ruined. However, some intelligent individual notices that all the characters can successfully be converted to a consistent font. How to do this? Why, it's "easy" - the chars have a border colour that goes all the way around them and if he grabs this border and passes it through his own complex function, he can generate a TPA outline of the character that is consistent to a font. However, to match it against a font, he need an ingenious way to turn the TPA border into a solidly filled TPA.

    This is where you come in. You must create an algorithm that takes in a TPA of a single character's outline. You must then fill in the TPA so that a TPA of the character is returned with a solid fill. Be careful though, some tricky characters like 'H' or 'O' don't have a completely solid fill - they too much be returned correctly. As far as this problem goes, you can use a TPA generated from an item's border for testing or draw your own shapes and use them. For presentation, the function should resemble:
    SCAR Code:
    function mixsters_TPAFiller(input: TPointArray): TPointArray;
    But processing as a procedure with input as a var is also fine.

    The deadline will be in one week, but if there is a general mood of it being a bit pressurising, I will be fine with extending it.

    On another note, I think this will be the last of this season. Unless someone else wants to run it for a month or so, I think I will put it away and focus on the Jr comp as well as refining my current layout and organisation for this competition so that it can make a come back and hopefully run a lot smoother and generate a real buzz

    Problem 4 results
    1 entry.
    nielsie95 was the only entrant and I am quite sure it runs (had to get someone else to test though since Scar was being silly). Congratulations to nielsie! 5 points awarded, though I really could of and should of given more, but then he would get too far in front Script can be found here.

    Problem 3 winning script by nielsie can still be found here.
    Last edited by mixster; 10-24-2009 at 07:42 PM.
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  2. #2
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    I am still awaiting the first couple of problems as it is past 6PM

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  3. #3
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by Rasta Magician View Post
    I am still awaiting the first couple of problems as it is past 6PM

    ~RM
    He said they'd go up Friday.

  4. #4
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by senrath View Post
    He said they'd go up Friday.
    So Thursday is the 17th, wow?

    6pm GMT = ~15 mins from when I post this topic if you are unsure of how it relates to you
    Mixster, silly boy! Change Friday to Thursday, or 17th to 18th!

  5. #5
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by mixster View Post
    Friday 17th of September 2009
    Someone's been taking too many narcotics >.>

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  6. #6
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    No one saw anything.
    Long days do that to me - I was just trying to be somewhat accurate
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  7. #7
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Week one:
    Lower: Generate all prime numbers, 2 through 1000 (inclusive). Script must be able to handle prime number generation from 2 to x. Also, only 2 can be used for the starting "prime number" array - all others must use an algorithm to find them. The script should produce an array of integers which holds the prime numbers. As a checking point, there should be 168 primes found.

    Upper: Break down the number 1578833364 into all of its prime factors. The prime factors are all under 1000, but it should work it out as it goes as the highest prime may be much lower than that and so calculating the extra primes would be wasteful. As a checking point, 7 numbers are multiplied to make the number (may or may not be multiple number of same primes).
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  8. #8
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    So basically, a unique /r/equest?


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

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

    Default

    I have entered

  10. #10
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    hah, we did that in school once. Gotta give it a try with scar.. when i find the time though....

  11. #11
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    I only found 96 primes

    edit: nvm, got them all
    took: 328 ms
    ~RM
    Last edited by Sir R. M8gic1an; 09-19-2009 at 02:59 AM.

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

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

    Default

    Would compete but too lazy.
    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.

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

    Default

    i thought i was too lazy, but ended up with some more knowledge in the end, so im good.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  14. #14
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    So far a handful of entries - will be open till Wednesday midnight GMT for anyone thinking it's too late or they don't have the time.
    I would also like to encourage Jr Members to participate - prove to the Members that you can compete with them!
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  15. #15
    Join Date
    Dec 2008
    Location
    In a galaxy far, far away...
    Posts
    584
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oooh this is awesome will submit mine soon

    Edit2:
    Completed!



    ~NS
    Last edited by Nadeem; 09-19-2009 at 10:32 PM. Reason: Maybe I wasn't supposed to post my results yet...

  16. #16
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Submitted.

    SCAR Code:
    Time Running: 31 ms.
    Successfully executed

    Without printing the Primes, keeping them in a TIntegerArray.
    Jus' Lurkin'

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

    Default

    Quote Originally Posted by Torrent of Flame View Post
    Submitted.

    SCAR Code:
    Time Running: 31 ms.
    Successfully executed

    Without printing the Primes, keeping them in a TIntegerArray.
    our Method`s are identical. Mine is 31ms aswell. Using outside knowledge seems like cheating.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  18. #18
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Heh, the Lower problem took me longer than the Upper one because I had accidentally told my script to find all prime numbers from 2 to 2000 instead of 1000. Oops.

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

    Default

    Is this anything like the league of extraordinary gentlemen?
    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

  20. #20
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    The league of extraordinary scripters.
    I do visit every 2-6 months

  21. #21
    Join Date
    Mar 2007
    Location
    Players[-1].Loc
    Posts
    962
    Mentioned
    4 Post(s)
    Quoted
    5 Post(s)

    Default

    The league of extramediocre scripters

  22. #22
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I was actually going to call it the League of Extra Ordinary Scripters, but it sounded slightly patronising to me
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  23. #23
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Dan Cardin, huh? Mine flickers between 16-40ms randomly. It isnt a constant time.
    Jus' Lurkin'

  24. #24
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Hmmmm. The algorithm must be similar then.
    Jus' Lurkin'

  25. #25
    Join Date
    Oct 2006
    Location
    ithurtsithurtsithurtsithurts
    Posts
    2,930
    Mentioned
    7 Post(s)
    Quoted
    135 Post(s)

    Default

    Quote Originally Posted by Torrent of Flame View Post
    Hmmmm. The algorithm must be similar then.
    Probably. There really aren't all that many ways to go about these two problems.

Page 1 of 5 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
  •