Now using official formulas for circle diameter and timing offsets.

The previous formulas were extremely close, so you shouldn't notice any gameplay differences at all.

Circle diameter:
- Previously: 104 - (CS * 8)
- Now: 108.848 - (CS * 8.9646)

Timing offsets: added 1.5ms to 300, 100, and 50 hit result offsets.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han 2015-08-30 19:01:40 -05:00
parent 9d19dacab4
commit 8892973d98
5 changed files with 20 additions and 22 deletions

View File

@ -60,11 +60,10 @@ public class Circle implements GameObject {
/** /**
* Initializes the Circle data type with map modifiers, images, and dimensions. * Initializes the Circle data type with map modifiers, images, and dimensions.
* @param container the game container * @param container the game container
* @param circleSize the map's circleSize value * @param circleDiameter the circle diameter
*/ */
public static void init(GameContainer container, float circleSize) { public static void init(GameContainer container, float circleDiameter) {
diameter = (104 - (circleSize * 8)); diameter = circleDiameter * HitObject.getXMultiplier(); // convert from Osupixels (640x480)
diameter = (diameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480)
int diameterInt = (int) diameter; int diameterInt = (int) diameter;
GameImage.HITCIRCLE.setImage(GameImage.HITCIRCLE.getImage().getScaledCopy(diameterInt, diameterInt)); GameImage.HITCIRCLE.setImage(GameImage.HITCIRCLE.getImage().getScaledCopy(diameterInt, diameterInt));
GameImage.HITCIRCLE_OVERLAY.setImage(GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(diameterInt, diameterInt)); GameImage.HITCIRCLE_OVERLAY.setImage(GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(diameterInt, diameterInt));

View File

@ -111,15 +111,14 @@ public class Slider implements GameObject {
/** /**
* Initializes the Slider data type with images and dimensions. * Initializes the Slider data type with images and dimensions.
* @param container the game container * @param container the game container
* @param circleSize the map's circleSize value * @param circleDiameter the circle diameter
* @param beatmap the associated beatmap * @param beatmap the associated beatmap
*/ */
public static void init(GameContainer container, float circleSize, Beatmap beatmap) { public static void init(GameContainer container, float circleDiameter, Beatmap beatmap) {
containerWidth = container.getWidth(); containerWidth = container.getWidth();
containerHeight = container.getHeight(); containerHeight = container.getHeight();
diameter = (104 - (circleSize * 8)); diameter = circleDiameter * HitObject.getXMultiplier(); // convert from Osupixels (640x480)
diameter = (diameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480)
int diameterInt = (int) diameter; int diameterInt = (int) diameter;
followRadius = diameter / 2 * 3f; followRadius = diameter / 2 * 3f;

View File

@ -80,16 +80,16 @@ public abstract class Curve {
* Should be called before any curves are drawn. * Should be called before any curves are drawn.
* @param width the container width * @param width the container width
* @param height the container height * @param height the container height
* @param circleSize the circle size * @param circleDiameter the circle diameter
* @param borderColor the curve border color * @param borderColor the curve border color
*/ */
public static void init(int width, int height, float circleSize, Color borderColor) { public static void init(int width, int height, float circleDiameter, Color borderColor) {
Curve.borderColor = borderColor; Curve.borderColor = borderColor;
ContextCapabilities capabilities = GLContext.getCapabilities(); ContextCapabilities capabilities = GLContext.getCapabilities();
mmsliderSupported = capabilities.GL_EXT_framebuffer_object; mmsliderSupported = capabilities.GL_EXT_framebuffer_object;
if (mmsliderSupported) if (mmsliderSupported)
CurveRenderState.init(width, height, circleSize); CurveRenderState.init(width, height, circleDiameter);
else { else {
if (Options.getSkin().getSliderStyle() != Skin.STYLE_PEPPYSLIDER) if (Options.getSkin().getSliderStyle() != Skin.STYLE_PEPPYSLIDER)
Log.warn("New slider style requires FBO support."); Log.warn("New slider style requires FBO support.");

View File

@ -64,15 +64,14 @@ public class CurveRenderState {
* Should be called before any curves are drawn. * Should be called before any curves are drawn.
* @param width the container width * @param width the container width
* @param height the container height * @param height the container height
* @param circleSize the circle size * @param circleDiameter the circle diameter
*/ */
public static void init(int width, int height, float circleSize) { public static void init(int width, int height, float circleDiameter) {
containerWidth = width; containerWidth = width;
containerHeight = height; containerHeight = height;
// equivalent to what happens in Slider.init() // equivalent to what happens in Slider.init()
scale = (int) (104 - (circleSize * 8)); scale = (int) (circleDiameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480)
scale = (int) (scale * HitObject.getXMultiplier()); // convert from Osupixels (640x480)
//scale = scale * 118 / 128; //for curves exactly as big as the sliderball //scale = scale * 118 / 128; //for curves exactly as big as the sliderball
FrameBufferCache.init(width, height); FrameBufferCache.init(width, height);
} }

View File

@ -1482,14 +1482,15 @@ public class Game extends BasicGameState {
// Stack modifier scales with hit object size // Stack modifier scales with hit object size
// StackOffset = HitObjectRadius / 10 // StackOffset = HitObjectRadius / 10
int diameter = (int) (104 - (circleSize * 8)); //int diameter = (int) (104 - (circleSize * 8));
float diameter = 108.848f - (circleSize * 8.9646f);
HitObject.setStackOffset(diameter * STACK_OFFSET_MODIFIER); HitObject.setStackOffset(diameter * STACK_OFFSET_MODIFIER);
// initialize objects // initialize objects
Circle.init(container, circleSize); Circle.init(container, diameter);
Slider.init(container, circleSize, beatmap); Slider.init(container, diameter, beatmap);
Spinner.init(container, overallDifficulty); Spinner.init(container, overallDifficulty);
Curve.init(container.getWidth(), container.getHeight(), circleSize, (Options.isBeatmapSkinIgnored()) ? Curve.init(container.getWidth(), container.getHeight(), diameter, (Options.isBeatmapSkinIgnored()) ?
Options.getSkin().getSliderBorderColor() : beatmap.getSliderBorderColor()); Options.getSkin().getSliderBorderColor() : beatmap.getSliderBorderColor());
// approachRate (hit object approach time) // approachRate (hit object approach time)
@ -1500,9 +1501,9 @@ public class Game extends BasicGameState {
// overallDifficulty (hit result time offsets) // overallDifficulty (hit result time offsets)
hitResultOffset = new int[GameData.HIT_MAX]; hitResultOffset = new int[GameData.HIT_MAX];
hitResultOffset[GameData.HIT_300] = (int) (78 - (overallDifficulty * 6)); hitResultOffset[GameData.HIT_300] = (int) (79.5f - (overallDifficulty * 6));
hitResultOffset[GameData.HIT_100] = (int) (138 - (overallDifficulty * 8)); hitResultOffset[GameData.HIT_100] = (int) (139.5f - (overallDifficulty * 8));
hitResultOffset[GameData.HIT_50] = (int) (198 - (overallDifficulty * 10)); hitResultOffset[GameData.HIT_50] = (int) (199.5f - (overallDifficulty * 10));
hitResultOffset[GameData.HIT_MISS] = (int) (500 - (overallDifficulty * 10)); hitResultOffset[GameData.HIT_MISS] = (int) (500 - (overallDifficulty * 10));
//final float mult = 0.608f; //final float mult = 0.608f;
//hitResultOffset[GameData.HIT_300] = (int) ((128 - (overallDifficulty * 9.6)) * mult); //hitResultOffset[GameData.HIT_300] = (int) ((128 - (overallDifficulty * 9.6)) * mult);