pwnaz0r
2007-10-11 01:37:13
Ben Land
Creativity (20 / 25)
Didn't see anything way out of the ordinary. Used HSL so that adds some points. He did create a plugin, I didn't really count that in technique but I think it should make up somewhere.
Professional(15 / 15)
Parameters were kept general. Properly creditted, Good job.
Technique (25 / 30)
Used great functions in source of FindColorsHSLFast( sorry guys, no source for you ;) ).
Standards (15 / 15)
30% of the length of his procedure was commenting (more than a paragraph of commenting. Then commenting on every line. He also used the SRL Commenting… thing :).
Requirements (40 / 50)
Average was around 60ms. Thats really why I took 10 points off. (I saw somewhere where you said 4ms :p?).
115 / 135
[ATTACH]7477[/ATTACH] - Bens Plugin(Crazy Fast)
{*******************************************************************************
procedure FindRocks(var Points: TPointArray; RockType: Integer);
by: BenLand100
Description: Finds rocks in Varrock using HSL
Returns midpoints of rocks found in the Points array
Use the following values for RockType:
0 - Copper
1 - Tin
2 - Iron
3 - Silver
4 - Clay
*******************************************************************************}
procedure FindRocks(var Points: TPointArray; RockType: Integer);
var
Temp: TPointArray;
Len, Count, i, e: Integer;
begin
SetLength(Points,169830);
case RockType of
{Copper} 0: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,28,50,50,5,20,30);
{Tin} 1: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,2,10,50,7,20,30);
{Iron} 2: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,17,50,30,2,20,20);
{Silver} 3: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,43,18,60,5,10,40);
{Clay} 4: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,40,55,70,2,20,20);
end;
Len:= GroupCentersMin(Points,Len,30,10);
SetLength(Temp,1600);
i:= 0;
e:= Len - 1;
{The FindColorsHSLFast in the following section identifies the rock color
that is the lightest color on the rock for Varrock rocks. It could be
adjusted to work for other new rocks by putting in the HSL values for the
rocks of the new area.}
//Simplified Excluding Quicksort Algorithm
while i < Len do
begin
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[e].X-15,Points[e].Y-15,Points[e].X+15,Points[e].Y+15,Temp,1600,45,75,40,12,20,20);
e:= e - 1;
Len:= Len - 1;
until ((Count >= 150) and (Count <= 700)) or (e < 0);
Len:= Len + 1;
e:= e + 1;
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[i].X-15,Points[i].Y-15,Points[i].X+15,Points[i].Y+15,Temp,1600,45,75,40,12,20,20);
i:= i + 1;
until ((Count < 150) or (Count > 700)) or (i - 1 > e);
i:= i - 1;
if i >= e then break;
Points[i]:= Points[e];
Len:= Len - 1;
end;
SetLength(Temp,0);
SetLength(Points,Len);
end;
SKy Scripter
Creativity (22 / 25)
He submitted alot of functions. He also used Length and Width. I liked it. I think he deserves it because he did put some effort into it.
Professional(15 / 15)
His plugin looked really nice. He included source. He did comment.
Technique (25 / 30)
The technique was standard. As he said himself
// OK! i had a really bad start on this, I Didnt have enought time
// to make it detect all the rock colors using HSL or RGB
// so i just have colors placed in here. Also it should do bad
// Because it uses Object Searching. With the height, width and ect.
Standards (13 / 15)
Correctly commented. It was fine. Didn't really comment on the procedures though
Requirements (30 / 50)
Didn't really work all that great. Worked pretty well though ;)
105 / 135
[ATTACH]7478[/ATTACH] - Sky Plugin and script
N3ss3s
Creativity (25 / 25)
Submitted three functions. One used HSL, one used finding in bitmaps, all used Wizzy plugin. Exactly what I looked for, different styles, great job! The bitmap one was the fastest.
Professional(15 / 15)
Commented all procedure. Good job.
Technique (20 / 30)
Mostly because of the bitmap one. Good job.
Standards (10 / 15)
Standards are… different. Anyways, you didn't use the SRL Commenting thing etheir.
Requirements (35 / 50)
Im going to have to score you about the same as SKy, probably because even though one of your procedures didn't really work (HSL one), it was still a good idea.
105 / 135
Function FindRock(All: Boolean; var RockTPA: TPointArray; Color: Integer): Boolean;
Var
I, D, C, B, X, Y, A, Z, M, N: Integer;
Var
TPA: TPointArray;
Begin
A := GetClientWindowHandle;
B := GetSystemTime;
C := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
I := BitmapFromString(762, 502, '');
CopyClientToBitmap(i, 0, 0, 762, 502);
SetTargetBitmap(i);
FindColorsTolerance(TPA, Color, MSX1, MSY1, MSX2 - 5, MSY2 + 5, 0);
Z := GetArrayLength(TPA);
If(Not(Z <= 0))Then
Begin
For D := 0 To Z - 1 Do
Begin
FastSetPixel(i, TPA[d].x, TPA[d].y, 255);
End;
X := MSX2;
Y := MSY2;
If(Not(All))Then
Begin
If(FindColorSpiral2(X, Y, 255, MSX1, MSY1, MSX2, MSY2))Then
Begin
Result := True;
FindColorsTolerance(TPA, 255, X - 15, Y - 15, X + 15, Y + 15, 0);
SetArrayLength(RockTPA, 1);
RockTPA[0] := MiddleTPA(TPA);
End;
End Else
Begin
FindColorsSpiralTolerance(MSCX, MSCY, RockTPA, 255, MSX1, MSY1, MSX2, MSY2, 0);
If(GetArrayLength(TPA) > 0)Then
Begin
Result := True;
End;
End;
End;
FreeBitmap(i);
SetClientWindowHandle(A);
ColorToleranceSpeed(C);
M := GetSystemTime;
N := M - B;
Writeln(IntToStr(N));
End;
So congrats to Ben! if ben gives me permission, I will post the procedures and the plugin. Hopefully, the next competition that is hosted will have more people entering.