[Home]History of Voidious/WaveRecorder

Robo Home | Changes | Preferences | AllPages


Revision 2 . . October 24, 2006 15:01 EST by Voidious [updated WaveRecorder with some new segments]
Revision 1 . . October 16, 2006 5:50 EST by Voidious [WaveRecorder, a bot that just records wave data]
  

Difference (from prior major revision) (no other diffs)

Added: 11a12
import java.util.ArrayList;

Changed: 25c26



Changed: 29c30,32
private double _timeSinceVChange? = 0;
private long _timeSinceVChange? = 0;
private long _timeSinceZeroVelocity? = 0;
private long _timeSinceMaxVelocity? = 0;

Added: 31a35,36
private Wave _lastWave = null;
private ArrayList _enemyPositions = new ArrayList();

Changed: 55,56c60
// CREDIT: RaikoMicro's gun, by Jamougha
// http://robowiki.net?RaikoMicro
// CREDIT: Jamougha and PEZ for event based waves.

Added: 65a70,80
_enemyPositions.add(_enemyLocation);
double distanceLastEightTicks? = _enemyLocation.distance(
((Point2D.Double)_enemyPositions.get(
Math.max(0, _enemyPositions.size() - 9))));
double distanceLastFifteenTicks? = _enemyLocation.distance(
((Point2D.Double)_enemyPositions.get(
Math.max(0, _enemyPositions.size() - 16))));
double distanceLastTwentyFiveTicks? = _enemyLocation.distance(
((Point2D.Double)_enemyPositions.get(
Math.max(0, _enemyPositions.size() - 26))));


Added: 72a88,90
_timeSinceZeroVelocity?++;
_timeSinceMaxVelocity?++;


Added: 81a100,108

if (Math.abs(e.getVelocity()) <= 1) {
_timeSinceZeroVelocity? = 0;
}

if (Math.abs(e.getVelocity()) > 7) {
_timeSinceMaxVelocity? = 0;
}


Changed: 93c120,128


double reverseWallDistance = 3;
for (double d = 0; d < 3; d += 0.01) {
if (!gunWallDistance(-d * maxEscapeAngle?)) {
reverseWallDistance = d;
break;
}
}


Changed: 103c138,141
w.timeSinceVChange? = (long)_timeSinceVChange?;
w.timeSinceVChange? = _timeSinceVChange?;
w.timeSinceZeroVelocity? = _timeSinceZeroVelocity?;
w.timeSinceMaxVelocity? = _timeSinceMaxVelocity?;


Added: 104a143
w.reverseWallDistance = reverseWallDistance;

Added: 105a145,148
w.distanceLastEightTicks? = distanceLastEightTicks?;
w.distanceLastFifteenTicks? = distanceLastFifteenTicks?;
w.distanceLastTwentyFiveTicks? = distanceLastTwentyFiveTicks?;
w.fireTime = getTime() + 1;

Changed: 113c156,158
w.firing = true;
if (_lastWave != null) {
_lastWave.firing = true;
}

Added: 114a160,161

_lastWave = w;

Added: 139a187,188
output += w.timeSinceZeroVelocity? + " : ";
output += w.timeSinceMaxVelocity? + " : ";

Changed: 142c191,195
output += round(w.relativeHeading, 4) + "\n";
output += round(w.reverseWallDistance, 3) + " : ";
output += round(w.relativeHeading, 4) + " : ";
output += round(w.distanceLastEightTicks?, 1) + " : ";
output += round(w.distanceLastFifteenTicks?, 1) + " : ";
output += round(w.distanceLastTwentyFiveTicks?, 1) + "\n";

Changed: 160c213
while (x < 1000 && getDataFile?(_enemyName + "." + x + ".txt").exists()) {
while (x < 1000 && getDataFile?(_enemyName + "." + x + ".w2.txt").exists()) {

Changed: 164c217
getDataFile?(_enemyName + "." + x + ".txt"));
getDataFile?(_enemyName + "." + x + ".w2.txt"));

Changed: 209c262,263
long timeSinceVChange?;
long timeSinceVChange?, timeSinceZeroVelocity?, timeSinceMaxVelocity?,
fireTime;

Changed: 211c265,268
double velocity, distance, latVel, wallDistance, relativeHeading;
double velocity, distance, latVel, wallDistance, reverseWallDistance,
relativeHeading;
double distanceLastEightTicks?, distanceLastFifteenTicks?,
distanceLastTwentyFiveTicks?;

Changed: 224c281
<= (distanceTraveled+=bulletVelocity) + (.5*bulletVelocity)) {
<= (getTime() - fireTime + 1.5) * bulletVelocity) {

Robo Home | Changes | Preferences | AllPages
Search: