improved debugging and more adjustments

This commit is contained in:
2017-07-14 23:41:20 -05:00
parent d65b94cd49
commit da494d22a3
5 changed files with 32 additions and 17 deletions

View File

@@ -45,9 +45,10 @@ public class RhythmMapAlgorithm implements Runnable {
this.healthMod = healthMod;
umMax = analyzer.getUMMaxValue();
avgUM = analyzer.getUmAvg();
bassMax = analyzer.getBassMaxValue();
avgBass = analyzer.getBassAvg();
avgUM = analyzer.getUmAvg();
}
@Override
@@ -56,15 +57,15 @@ public class RhythmMapAlgorithm implements Runnable {
for (int index = 0; index < bassPeaks.size; index++) {
if (bassPeaks.get(index) != 0 || UMPeaks.get(index) != 0) {
int warningTime = (int) ((3/speedMod)*windowPerSecond);
if ((index+warningTime < bassPeaks.size) && bassPeaks.get(index + warningTime) >= avgBass*3f/4f) {
if ((index+warningTime < bassPeaks.size) && bassPeaks.get(index + warningTime) >= avgBass) {
//TODO basic void circle spawning
float endRadius = bassPeaks.get(index + warningTime)/bassMax*(Polyjet.GAME_AREA_HEIGHT/4f);
float endRadius = (bassPeaks.get(index + warningTime)/bassMax)*(Polyjet.GAME_AREA_HEIGHT/2f);
map.addToMap(Entities.VOID_CIRCLE,
endRadius,
rand.nextFloat()*Polyjet.GAME_AREA_WIDTH,
rand.nextFloat()*Polyjet.GAME_AREA_HEIGHT,
endRadius/avgSPB,
endRadius/(avgSPB*0.5f),
3f/speedMod
);
}
@@ -78,8 +79,8 @@ public class RhythmMapAlgorithm implements Runnable {
map.addToMap(Entities.PELLET,
xSpawnLocation,
Polyjet.GAME_AREA_HEIGHT-0.25f,
180*rand.nextFloat()+90,
speedMod*(1f/avgSPB));
140*rand.nextFloat()+110f,
(Polyjet.GAME_AREA_HEIGHT/4f)/avgSPB);
}
}