This causes a noticeable drop in memory usage in most cases.
Also renamed the "crash" popup since the game doesn't necessarily crash.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- MusicController.getPosition() now returns time even when track is paused. (e.g. song progress bar in main menu won't reset when paused)
- Force unpause track when entering the song menu.
- Rewrote Game.RESTART_* constants as enums.
- Cleaned up logo play/exit button scaling.
- MainMenu.previous is now non-static.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Stop loading all images on startup.
- Game images are preloaded before the song starts.
- Destroy skin images immediately after finishing a beatmap, potentially saving lots of memory.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- To scale an image, override process_sub() in its enum definition. All GameImages call the process() method when loaded.
- Skin GameImage overrides will now call process() immediately, so there's no more need for the hackish scaling status.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added enum classes SoundEffect and HitSound.
- Added a SoundComponent interface for sound effects and hit sounds, and extended playSound() and playHitSound() methods to play any SoundComponent.
- Moved features related to sample sets to the HitSound class, and rewrote sample sets as an internal enum class.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
The class was originally named with the intent of adding many other GUI classes, but this never happened.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
When pressing the "next" button, songs will only be pushed when a new track plays. Fixes a potential null pointer crash.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Properly handle bad input and log a warning. The game may run with some gameplay errors (ex. if no base TimingPoint is parsed), but it should not crash.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Moved the bulk of hit object parsing into the OsuHitObject constructor, and made all fields private. Only combo-related data is still set by OsuParser.
- Added 'isCircle()', 'isSlider()', 'isSpinner()', and 'isNewCombo()' methods for convenience.
Other changes:
- Fixed difficulty overrides are no longer affected by game mods.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Game keys (default Z/X) can be changed to any letter or digit in the options screen.
Other changes:
- Mouse/keyboard input in the "Game Paused Menu" state is now the same as in the game state (i.e. all game keys available).
- Moved 'isInputKeyPressed()' into "Utils" class ("Game" state didn't even call it).
- Trimmed 'failsound.wav'.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Parse and store the end time for every beatmap (i.e. end time of last hit object).
- Added a 'length' sorting tab.
- Added 'length' search condition.
- Removed 'getTrackLength()' and 'getTrackLengthString()' methods, as they are no longer needed.
- Added a loader spritesheet animation to render during MP3 conversions (in place of track length rendering upon completion).
Other changes:
- Added a yellow progress circle during lead-in time.
- Fixed sorting tab positioning.
- Slightly increased button animation speed in "Main Menu Exit" state.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Halves all difficulty values and grants 3 "lives" instead of 1, with a score multiplier of 0.5x.
Other changes:
- Fixed score display in game state if score exceeds 8 digits.
- Added a "HP_DRAIN_MULTIPLIER" constant for steady HP drain/increase (to replace numeric constants).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Overhauled OsuTimingPoint class: parsing is done in the constructor, and fields are no longer public.
- Improved consistency of static/non-static fields in a couple of classes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- A checkpoint (track position) can be set in the options screen, and also while playing by pressing "CTRL+S".
- A checkpoint can be loaded by pressing "CTRL+L" while playing. This will reset all game data and begin from the checkpoint time; the ranking screen will be skipped upon song completion.
Other changes:
- Don't draw grade if no objects have been processed (previously defaulted to GRADE_D).
- Calculate slider start/end angles based on a step difference (previously an arbitrary 0.01 difference).
- Always end a slider curve base on the last control point.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Search textfield now properly retains focus in song selection menu.
- Clearing an invalid search no longer changes the current song.
Other changes:
- Fixed skip image not being resized correctly.
- Added menuclick sounds when selecting a new song.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Cursor is now scaled based on window size.
- Cursor now rotates slowly (new style only).
- Cursor now expands upon mouse press.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Main Menu: "P" (play), "Q" (quit)
- Game: Ctrl + "R" (restart)
Other changes:
- Song Menu search textfield no longer retains focus in different states.
- Added a new tab in Game Options screen containing the values.
Other changes:
- Corrected "Hard Rock" difficulty modifiers.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- GameImage now stores both a default image and skin image, returning the skin image whenever available.
- Default images are loaded once on startup, instead of before every game.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added a GameImage enum for more organized loading of image resources.
- Game image loading now takes place directly before each beatmap is loaded.
- Added option 'IGNORE_BEATMAP_SKINS' to disable this feature.
Other changes:
- Slight correction in readme file: apparently the JAR will not run in the osu! program folder.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Credits: https://osu.ppy.sh/forum/t/198483 (image by Xiaounlimited)
Other changes:
- Added "Unranked" text image, currently displayed for "Auto" mod plays only (image by XinCrin).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fixed Game not loading OsuFile for maps in a song group. (blame: 5612336)
- Implemented rotations for reverse arrows, and added a new one by Alic1a.
- "Auto" mod: pausing no longer requires click to unpause, and mod images are permanently drawn.
- Program now loads from Main Menu instead of Options (unnecessary complications for the sake of a transition).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Separated options into "Display", "Music", and "Gameplay" tabs.
- New options: VolumeHitSound, DimLevel, PerfectHit
- Added options that were previously missing from Game Options screen.
- Added sounds to Game Options screen.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- This can be switched off in the configuration file.
- Credits: https://osu.ppy.sh/forum/t/98954
Other changes:
- Removed OsuFile setters/getters from Game state, replaced with a 'getOsuFile()' method in MusicController (a more logical location).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- "Skins" directory is created in the root folder, and reads files directly from there (for now). NOT ALL FILES ARE SUPPORTED.
- To change the path (e.g. to an installed skin), edit the path in the configuration file.
Other changes:
- Renamed some files: directories now begin with a capital letter (to match osu! naming), and '.osu_tmp' renamed to '.opsu_tmp'.
- Disabled mouse grabbing, as this does not seem to work properly for touchscreen devices. (partial revert of ab487c5)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added support for both the new (2013+) and old cursor styles. These can be toggled on/off in the configuration file.
- Added cursor images by XinCrin (old style) and teinecthel (new style).
Other changes:
- Refactoring: Created a "Utils" module, containing methods and constants that didn't belong in the "Options" state and some duplicated drawing methods.
- Mouse is now grabbed during gameplay.
- Removed 'optionsChanged' switch, simplifying adding new options.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added SoundController module, which uses Java Sound since OpenAL has a slight delay on playing sounds.
- Uploaded all effect WAVs. (credits: WWWskin, AL's IA, Fantasy's Skin, Minimalist Miku)
- Added a missing entry in credits.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>