Difference between revisions of "User talk:Hubris"
(problem downloading Hubris) |
RednaxelaBot (talk | contribs) m (Using <syntaxhighlight>.) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Hey Martin (I assume?), I get a permission error when I try to download Hubris. ("Sorry, you are not authorized to view this page.") I know sometimes you've posted bots that you only wanted running from your clients, so I thought nothing of it at first, but now that I see it's gotten no battles, I thought I should let you know... Nice to see you posting a new version, good luck, --[[User:Voidious|Voidious]] 14:05, 7 May 2009 (UTC) | Hey Martin (I assume?), I get a permission error when I try to download Hubris. ("Sorry, you are not authorized to view this page.") I know sometimes you've posted bots that you only wanted running from your clients, so I thought nothing of it at first, but now that I see it's gotten no battles, I thought I should let you know... Nice to see you posting a new version, good luck, --[[User:Voidious|Voidious]] 14:05, 7 May 2009 (UTC) | ||
+ | |||
+ | Hm that's odd. I'll have to provide it from another location I guess. Yeah it's me .. the 'email me my password' feature failed so I made a new account. --[[User:Hubris|Hubris]] | ||
+ | *It should work now. The dumb file management interface for Comcast has a public / private flag that defaults to private. New since the last time I've uploaded anything to Comcast. | ||
+ | |||
+ | He he, I start to wonder why many old robocoders start to remember the Robocode again. I'm going to post the {{[[Template:Welcome|Welcome]]}} to you but luckily I see the package name first (which make me know it is you). Maybe asking [[User:Voidious|Voidious]] to recover your password is posible? (@[[User:Voidious|Voidious]], script is at maintenance/changepassword.php) » <span style="font-size:0.9em;color:darkgreen;">[[User:Nat|Nat]] | [[User_talk:Nat|Talk]]</span> » 15:03, 7 May 2009 (UTC) | ||
+ | *Now that I've gotten into work, where the password is remembered, I am reminded by its length what it is, so no need to get the email thingy working on my account. As far as what makes me remember Robocode, I have kept my source code on a USB drive since .. well since my first, a 256meg deal that I just retired in favor of a 4gig. The old one worked just fine but I grabbed the bigger one for a web site relocation that I ended up not doing, but I digress. Lots of stuff I still mean to program, and lots that I mean to program more elegantly. For example, I had a 'find the points of intersection of two circles' that worked but was really large and probably slow. I replaced it with a few lines of code that gives me what I really wanted, the angular distance. | ||
+ | |||
+ | <syntaxhighlight>public BearingOffsetRange getRangeOfIntersection( Circle other ) { | ||
+ | BearingOffsetRange bearingOffsetRange = null; | ||
+ | double d = this.getDistance( other ).distance(); | ||
+ | double r2 = other.radius(); | ||
+ | if( d != 0.0 && Constraints.isInRange( d - r2, this.r, d + r2 ) ) { | ||
+ | double x = ( this.rSquared - r2 * r2 + d * d ) / ( d + d ); | ||
+ | double y = Math.sqrt( this.rSquared - x * x ); | ||
+ | double theta = Math.atan( y / x ); | ||
+ | bearingOffsetRange = new BearingOffsetRange( -theta, theta ); | ||
+ | } | ||
+ | return bearingOffsetRange; | ||
+ | }</syntaxhighlight> | ||
+ | |||
+ | Stuff like that. You can see it at work as my wave crashes over my opponent (whom I represent as a circle rather than a box), assuming you enable painting and press 'w' to tell Hubris to paint its waves. I use it to measure the range of angles that would have scored a hit. | ||
+ | |||
+ | I've still got my white whales that I can't let go, such as bullet shielding. |
Latest revision as of 09:42, 1 July 2010
Hey Martin (I assume?), I get a permission error when I try to download Hubris. ("Sorry, you are not authorized to view this page.") I know sometimes you've posted bots that you only wanted running from your clients, so I thought nothing of it at first, but now that I see it's gotten no battles, I thought I should let you know... Nice to see you posting a new version, good luck, --Voidious 14:05, 7 May 2009 (UTC)
Hm that's odd. I'll have to provide it from another location I guess. Yeah it's me .. the 'email me my password' feature failed so I made a new account. --Hubris
- It should work now. The dumb file management interface for Comcast has a public / private flag that defaults to private. New since the last time I've uploaded anything to Comcast.
He he, I start to wonder why many old robocoders start to remember the Robocode again. I'm going to post the {{Welcome}} to you but luckily I see the package name first (which make me know it is you). Maybe asking Voidious to recover your password is posible? (@Voidious, script is at maintenance/changepassword.php) » Nat | Talk » 15:03, 7 May 2009 (UTC)
- Now that I've gotten into work, where the password is remembered, I am reminded by its length what it is, so no need to get the email thingy working on my account. As far as what makes me remember Robocode, I have kept my source code on a USB drive since .. well since my first, a 256meg deal that I just retired in favor of a 4gig. The old one worked just fine but I grabbed the bigger one for a web site relocation that I ended up not doing, but I digress. Lots of stuff I still mean to program, and lots that I mean to program more elegantly. For example, I had a 'find the points of intersection of two circles' that worked but was really large and probably slow. I replaced it with a few lines of code that gives me what I really wanted, the angular distance.
public BearingOffsetRange getRangeOfIntersection( Circle other ) {
BearingOffsetRange bearingOffsetRange = null;
double d = this.getDistance( other ).distance();
double r2 = other.radius();
if( d != 0.0 && Constraints.isInRange( d - r2, this.r, d + r2 ) ) {
double x = ( this.rSquared - r2 * r2 + d * d ) / ( d + d );
double y = Math.sqrt( this.rSquared - x * x );
double theta = Math.atan( y / x );
bearingOffsetRange = new BearingOffsetRange( -theta, theta );
}
return bearingOffsetRange;
}
Stuff like that. You can see it at work as my wave crashes over my opponent (whom I represent as a circle rather than a box), assuming you enable painting and press 'w' to tell Hubris to paint its waves. I use it to measure the range of angles that would have scored a hit.
I've still got my white whales that I can't let go, such as bullet shielding.