2022-03-11 06:30:01 +00:00
|
|
|
package funkin.util;
|
|
|
|
|
|
|
|
import flixel.util.FlxColor;
|
2022-04-18 23:36:09 +00:00
|
|
|
import lime.app.Application;
|
2022-03-11 06:30:01 +00:00
|
|
|
|
|
|
|
class Constants
|
|
|
|
{
|
2023-01-23 03:25:45 +00:00
|
|
|
/**
|
|
|
|
* ENGINE AND VERSION DATA
|
|
|
|
*/
|
|
|
|
// ==============================
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The title of the game, for debug printing purposes.
|
|
|
|
* Change this if you're making an engine.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final TITLE:String = "Friday Night Funkin'";
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The current version number of the game.
|
|
|
|
* Modify this in the `project.xml` file.
|
|
|
|
*/
|
|
|
|
public static var VERSION(get, null):String;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A suffix to add to the game version.
|
|
|
|
* Add a suffix to prototype builds and remove it for releases.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final VERSION_SUFFIX:String = ' PROTOTYPE';
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
#if debug
|
|
|
|
static function get_VERSION():String
|
|
|
|
{
|
|
|
|
return 'v${Application.current.meta.get('version')} (${GIT_BRANCH} : ${GIT_HASH})' + VERSION_SUFFIX;
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
static function get_VERSION():String
|
|
|
|
{
|
|
|
|
return 'v${Application.current.meta.get('version')}' + VERSION_SUFFIX;
|
|
|
|
}
|
|
|
|
#end
|
|
|
|
|
|
|
|
/**
|
|
|
|
* URL DATA
|
|
|
|
*/
|
|
|
|
// ==============================
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Link to download the game on Itch.io.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final URL_ITCH:String = 'https://ninja-muffin24.itch.io/funkin/purchase';
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Link to the game's page on Kickstarter.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final URL_KICKSTARTER:String = 'https://www.kickstarter.com/projects/funkin/friday-night-funkin-the-full-ass-game/';
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GIT REPO DATA
|
|
|
|
*/
|
|
|
|
// ==============================
|
|
|
|
|
|
|
|
#if debug
|
|
|
|
/**
|
|
|
|
* The current Git branch.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final GIT_BRANCH:String = funkin.util.macro.GitCommit.getGitBranch();
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The current Git commit hash.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final GIT_HASH:String = funkin.util.macro.GitCommit.getGitCommitHash();
|
2023-01-23 03:25:45 +00:00
|
|
|
#end
|
|
|
|
|
|
|
|
/**
|
|
|
|
* COLORS
|
|
|
|
*/
|
|
|
|
// ==============================
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The color used by the enemy health bar.
|
|
|
|
*/
|
|
|
|
public static final COLOR_HEALTH_BAR_RED:FlxColor = 0xFFFF0000;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The color used by the player health bar.
|
|
|
|
*/
|
|
|
|
public static final COLOR_HEALTH_BAR_GREEN:FlxColor = 0xFF66FF33;
|
|
|
|
|
2023-06-02 19:25:28 +00:00
|
|
|
/**
|
2023-06-22 05:41:01 +00:00
|
|
|
* The base colors of the notes.
|
2023-06-02 19:25:28 +00:00
|
|
|
*/
|
2023-06-22 05:41:01 +00:00
|
|
|
public static final COLOR_NOTES:Array<FlxColor> = [0xFFFF22AA, 0xFF00EEFF, 0xFF00CC00, 0xFFCC1111];
|
2023-06-02 19:25:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* STAGE DEFAULTS
|
|
|
|
*/
|
|
|
|
// ==============================
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default difficulty for charts.
|
|
|
|
*/
|
|
|
|
public static final DEFAULT_DIFFICULTY:String = 'normal';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default player character for charts.
|
|
|
|
*/
|
|
|
|
public static final DEFAULT_CHARACTER:String = 'bf';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default stage for charts.
|
|
|
|
*/
|
|
|
|
public static final DEFAULT_STAGE:String = 'mainStage';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default song for if the PlayState messes up.
|
|
|
|
*/
|
|
|
|
public static final DEFAULT_SONG:String = 'tutorial';
|
|
|
|
|
2023-06-22 05:41:01 +00:00
|
|
|
/**
|
|
|
|
* Default variation for charts.
|
|
|
|
*/
|
|
|
|
public static final DEFAULT_VARIATION:String = 'default';
|
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
/**
|
2023-06-27 17:43:42 +00:00
|
|
|
* HEALTH VALUES
|
|
|
|
*/
|
|
|
|
// ==============================
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The player's maximum health.
|
|
|
|
* If the player is at this value, they can't gain any more health.
|
|
|
|
*/
|
|
|
|
public static final HEALTH_MAX:Float = 2.0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The player's starting health.
|
|
|
|
*/
|
|
|
|
public static final HEALTH_STARTING = HEALTH_MAX / 2.0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The player's minimum health.
|
|
|
|
* If the player is at or below this value, they lose.
|
|
|
|
*/
|
|
|
|
public static final HEALTH_MIN:Float = 0.0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player gains when hitting a note with the KILLER rating.
|
|
|
|
*/
|
2023-06-27 21:22:51 +00:00
|
|
|
public static final HEALTH_KILLER_BONUS:Float = 2.0 / 100.0 * HEALTH_MAX; // +2.0%
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player gains when hitting a note with the SICK rating.
|
|
|
|
*/
|
2023-06-27 21:22:51 +00:00
|
|
|
public static final HEALTH_SICK_BONUS:Float = 1.5 / 100.0 * HEALTH_MAX; // +1.0%
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player gains when hitting a note with the GOOD rating.
|
|
|
|
*/
|
2023-06-27 21:22:51 +00:00
|
|
|
public static final HEALTH_GOOD_BONUS:Float = 0.75 / 100.0 * HEALTH_MAX; // +0.75%
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player gains when hitting a note with the BAD rating.
|
|
|
|
*/
|
2023-06-27 21:22:51 +00:00
|
|
|
public static final HEALTH_BAD_BONUS:Float = 0.0 / 100.0 * HEALTH_MAX; // +0.0%
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player gains when hitting a note with the SHIT rating.
|
|
|
|
* If negative, the player will actually lose health.
|
|
|
|
*/
|
2023-06-27 21:22:51 +00:00
|
|
|
public static final HEALTH_SHIT_BONUS:Float = -1.0 / 100.0 * HEALTH_MAX; // -1.0%
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player gains, while holding a hold note, per second.
|
|
|
|
*/
|
|
|
|
public static final HEALTH_HOLD_BONUS_PER_SECOND:Float = 7.5 / 100.0 * HEALTH_MAX; // +7.5% / second
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player loses upon missing a note.
|
|
|
|
*/
|
2023-06-27 21:22:51 +00:00
|
|
|
public static final HEALTH_MISS_PENALTY:Float = 4.0 / 100.0 * HEALTH_MAX; // 4.0%
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player loses upon pressing a key when no note is there.
|
|
|
|
*/
|
2023-06-27 21:22:51 +00:00
|
|
|
public static final HEALTH_GHOST_MISS_PENALTY:Float = 2.0 / 100.0 * HEALTH_MAX; // 2.0%
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player loses upon letting go of a hold note while it is still going.
|
|
|
|
*/
|
|
|
|
public static final HEALTH_HOLD_DROP_PENALTY:Float = 0.0; // 0.0%
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The amount of health the player loses upon hitting a mine.
|
|
|
|
*/
|
2023-06-27 21:22:51 +00:00
|
|
|
public static final HEALTH_MINE_PENALTY:Float = 15.0 / 100.0 * HEALTH_MAX; // 15.0%
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* If true, the player will not receive the ghost miss penalty if there are no notes within the hit window.
|
|
|
|
* This is the thing people have been begging for forever lolol.
|
|
|
|
*/
|
2023-07-08 05:03:46 +00:00
|
|
|
public static final GHOST_TAPPING:Bool = false;
|
2023-06-27 17:43:42 +00:00
|
|
|
|
|
|
|
/**
|
2023-01-23 03:25:45 +00:00
|
|
|
* OTHER
|
|
|
|
*/
|
|
|
|
// ==============================
|
2023-07-13 05:13:26 +00:00
|
|
|
public static final LIBRARY_SEPARATOR:String = ':';
|
2023-01-23 03:25:45 +00:00
|
|
|
|
2023-06-02 19:25:28 +00:00
|
|
|
/**
|
|
|
|
* All MP3 decoders introduce a playback delay of `528` samples,
|
|
|
|
* which at 44,100 Hz (samples per second) is ~12 ms.
|
|
|
|
*/
|
|
|
|
public static final MP3_DELAY_MS:Float = 528 / 44100 * 1000;
|
|
|
|
|
2023-01-23 03:25:45 +00:00
|
|
|
/**
|
|
|
|
* The scale factor to use when increasing the size of pixel art graphics.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final PIXEL_ART_SCALE:Float = 6;
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The BPM of the title screen and menu music.
|
|
|
|
* TODO: Move to metadata file.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final FREAKY_MENU_BPM:Float = 102;
|
2023-01-23 03:25:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The volume at which to play the countdown before the song starts.
|
|
|
|
*/
|
2023-06-02 19:25:28 +00:00
|
|
|
public static final COUNTDOWN_VOLUME:Float = 0.6;
|
|
|
|
|
2023-06-22 05:41:01 +00:00
|
|
|
public static final STRUMLINE_X_OFFSET:Float = 48;
|
|
|
|
public static final STRUMLINE_Y_OFFSET:Float = 24;
|
|
|
|
|
2023-06-02 19:25:28 +00:00
|
|
|
/**
|
|
|
|
* The default intensity for camera zooms.
|
|
|
|
*/
|
|
|
|
public static final DEFAULT_ZOOM_INTENSITY:Float = 0.015;
|
2023-01-23 03:25:45 +00:00
|
|
|
|
2023-06-02 19:25:28 +00:00
|
|
|
/**
|
|
|
|
* The default rate for camera zooms (in beats per zoom).
|
|
|
|
*/
|
|
|
|
public static final DEFAULT_ZOOM_RATE:Int = 4;
|
2022-03-11 06:30:01 +00:00
|
|
|
}
|