User Pass
Home Sign Up Contact Log In
Page:
 
mandyross
offline
Link
 
Originally posted by pabst

mandyross brought in the correctness issue so blame him if you don't like your thread being derailed, but seriously ...


I was wrong ... it was just the chrome browser. It works great now.

I'd prefer for the calculated value to be the same as Bort's value, simply because it is easier to compare accurately with other dots. Even though I'd agree with you that Bort's calculation is strange, it's the one that is used as a reference point in the game so why the problem with using it?
 
avidday
offline
Link
 
Originally posted by pabst

was in your thread to point out that you can borrow some of my code to get rid of that absolutely absurd switch/case mess you have for SA's and shorten yours considerably in the process. But, nevermind. Don't use it.


I like the giant switch/case. It was added in while I was doing some debugging (wasn't the SA calculation that was wrong, it turned out) and I left it because I'm lazy. I could go back to the old formulas or even use yours, but why bother when it works? I'm not going for a "who can write the biggest, most complicated, impressive-looking formula" award or anything, nor am I trying to go for major optimizations. It's a browser script. If mine used 10x as many lines as it does and still worked correctly, would it matter? The only reason I can fathom for you to come in my thread and start criticizing my work is because mine actually WORKS and yours doesn't, which probably pisses you off. I understand that you've wrote a lot of scripts for GLB and fancy yourself to be the "Greasemonkey Guru" or something, but that doesn't mean you have to go around pissing on everyone else who writes something better than yours.

Plus, my script is far more readable than yours and easier for someone in the future to modify or re-use should I stop updating it, which may very well happen in the very near future given that I'm not really enjoying GLB any more.

Let me look back at an old version... Maybe these functions would make you happier:

function calcValSP (value){
var total=0
while (value >0) {
total = total + Math.ceil( parseFloat(value) /2.0);
value--;
}
return total;
}

function calcValSPB (value){
var total=0
while (value >0) {
total = total + Math.ceil( parseFloat(value) /2.0) + 1;
value--;
}
return total;
}

Since we're doing criticisms, did I mention that the way you calculate SA points is also wrong? Yeah, it is. The last SA costs more than the first four, hence the +1. You have one function that does the first four correctly, but isn't right for the last one.

Originally posted by mandyross
I was wrong ... it was just the chrome browser. It works great now.

I'd prefer for the calculated value to be the same as Bort's value, simply because it is easier to compare accurately with other dots. Even though I'd agree with you that Bort's calculation is strange, it's the one that is used as a reference point in the game so why the problem with using it?


You did the absolute right thing to help me out. You told me the problem you had and gave me the specific situation under which the script was failing so that I could fix it. You did nothing wrong.

Also, after you figure out how Bort is doing the calculation, it kind of makes sense (I said kind of...). Personally, I would have done it differently, but it's not my game, so it's not up to me. I just figured out how to do it and went with it.
Edited by avidday on Oct 4, 2011 07:00:11
Edited by avidday on Oct 4, 2011 06:56:38
Edited by avidday on Oct 4, 2011 06:41:51
Edited by avidday on Oct 4, 2011 06:39:25
Edited by avidday on Oct 4, 2011 06:36:04
 
avidday
offline
Link
 
Update: Minor bug fix.

If your calculator suddenly starts giving you NaN for the value, download the newest version. There is an incompatibility with another script out there and this should fix that problem.
 
pabst
offline
Link
 
Originally posted by avidday
The only reason I can fathom for you to come in my thread and start criticizing my work is because mine actually WORKS and yours doesn't, which probably pisses you off. I understand that you've wrote a lot of scripts for GLB and fancy yourself to be the "Greasemonkey Guru" or something, but that doesn't mean you have to go around pissing on everyone else who writes something better than yours.

The only thing funnier than that, Mr. I Hate Constructive Criticism And Will Resort To Personal Attacks If You Cross Me, ....

Originally posted by avidday
Since we're doing criticisms, did I mention that the way you calculate SA points is also wrong? Yeah, it is. The last SA costs more than the first four, hence the +1. You have one function that does the first four correctly, but isn't right for the last one.

... is that. You might want to look at that code again. You obviously didn't look hard enough.
 
Bloodfart
offline
Link
 
stop bitchin and write me some scripts you geeks
 
Bloodfart
offline
Link
 
specifically, a script that calculates the sp value on the VPB when you're done. now that would be handy.
 
avidday
offline
Link
 
Originally posted by Bloodfart
specifically, a script that calculates the sp value on the VPB when you're done. now that would be handy.


That would be EXACTLY what my script does. See the first post. You can run it before the VPB, during the VPB, or after the VPB. You'll get the same number Bort would give you.
 
xhail2skinsx
offline
Link
 
Originally posted by pabst

Bort's way which is wrong as far as I'm concerned, but it's mostly a Swift-esque Big Endian/Little Endian argument

Are xhail2skinsx and I the only people who get this reference?!?!?!? Christ.

1) I guess so lol

and

2) I don't see what pabst did wrong in this thread. All he did was offer some code and then all of a sudden it got turned into "well who's is actually right thread" by mandyross (not saying that is a bad thing; i'm just saying pabst didn't start the derailing of the original thread's purpose)
 
mandyross
offline
Link
 
Originally posted by xhail2skinsx

2) I don't see what pabst did wrong in this thread. All he did was offer some code and then all of a sudden it got turned into "well who's is actually right thread" by mandyross (not saying that is a bad thing; i'm just saying pabst didn't start the derailing of the original thread's purpose)


I think a mountain was made out of a molehill in this thread. I was lax with my use of the word "correct" initially - I meant the same value as the game gives, not the value that seems the most appropriate from a math point of view, and have since tried to explain this.

My apologies if anyone feels I derailed the thread though, it wasn't my intention at all.
 
avidday
offline
Link
 
Originally posted by mandyross
I think a mountain was made out of a molehill in this thread. I was lax with my use of the word "correct" initially - I meant the same value as the game gives, not the value that seems the most appropriate from a math point of view, and have since tried to explain this.

My apologies if anyone feels I derailed the thread though, it wasn't my intention at all.


I'll agree that, from a pure mathematical point of view, Bort's method is a little strange, but from my perspective, I'm just trying to make what you see from my scripts match what Bort is actually doing, whether it makes sense or not.

Also, I'll admit to having a string of bad days there and I was highly pissed about something else, which may have caused me to go off on pabst to an excessive degree. I apologize for my outburst and overactive sense of paranoia.

Now, go download this: http://goallineblitz.com/game/forum_thread.pl?thread_id=4753891&page=1#43769053 and let's all be friends.
 
Bane
Baconologist
offline
Link
 
I am feeling all the love

all you script writers are awesome

Thank You !

 
Page:
 


You are not logged in. Please log in if you want to post a reply.