SRL Archive - SRL Archives

RockGone(RockX, RockY, RockCol: integer)


pwnaz0r

2007-10-29 17:44:34

Edit until MSI Comp over XD

Special Ed

2007-10-29 18:01:58

You know this would be perfect for MSI… lol :D 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.

the scar noob

2007-10-29 18:10:34

Looks very nice, great work ;)

From: Special Ed
You know this would be perfect for MSI… lol :D 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.

Special Ed

2007-10-29 18:34:41

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

  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

  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.

R0b0t1

2007-10-29 18:38:31

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):

function Inc(Var: Integer): Integer;
asm
INC Var
end;


Also, I don't really see why this would be hard for people to make :\

Special Ed

2007-10-29 19:31:15

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.

pwnaz0r

2007-10-29 19:59:32

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

Wizzup?

2007-10-30 02:35:16

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

ShowerThoughts

2007-10-30 04:03:33

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

mastaraymond

2007-10-30 11:15:04

From: R0b0t1
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 [LEFT]function Inc(Var: Integer): Integer; asm INC Var end; [/LEFT]

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 :rolleyes: '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

Wizzup?

2007-10-30 11:25:03

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

Special Ed

2007-10-30 18:16:00

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


Huzzah! Another Victory! :D

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.

pwnaz0r

2007-10-30 18:54:22

From: Special Ed
Huzzah! Another Victory! :D

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 :D

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

Sumilion

2007-10-31 11:38:04

I got one which is one line long…

Esteban

2007-10-31 16:24:55

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.

ShowerThoughts

2007-10-31 17:01:03

From: Sumilion
I got one which is one line long…

rockgone(x,y,……) ;) :p

pwnaz0r

2007-10-31 17:34:24

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)