Added the "difficulty multiplier" as given by the osu! wiki. Please note that this will invalidate all of your saved scores.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added overridden methods read() and write() for reading from and writing to the options file within the GameOption enum, so that only 1 section needs to be changed when adding new options (instead of 3).
- Added 'displayName' field to the GameOption enum, instead of repeating it in the parseOptions() and saveOptions() methods.
- Added internal options (directories, port, theme song) into the GameOption enum for consistency.
- Removed GameOption.NULL.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This occurred when inserting beatmaps with null "bg" field into the database.
Also moved LOAD_HD_IMAGES option from "Custom" tab to "Display".
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Added getComboColors() method to Beatmap class, and the 'combo' field is now null if no combo is provided.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Pass the border color into CurveRenderState instead of determining it there; store the color as a static field in Curve (since it shouldn't change per-beatmap).
Also removed the leftover FrameBufferCache warning from #64.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Removed NEW_SLIDER option, and use the skin "SliderStyle" instead. Uses the new style by default, unless STYLE_PEPPYSLIDER is specified.
- Check if OpenGL 3.0 is supported before trying to draw new style sliders.
- Fixed compilation warnings; removed unneeded fields and imports.
- Filled in some missing Javadocs.
- Style changes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
New slider rendering works by rendering the slider to an
offscreen buffer
Add CurveRenderState.java and FrameBufferCache.java that were forgotten in the last commit
When restarting the program through the options menu, all sounds now get reloaded if the skin was changed.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Moved cursor-related code out of UI and into a new non-static "Cursor" class.
Also, the cursor is no longer reset after gameplay if it wasn't skinned.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Skins are now loaded from subdirectories of the root "Skins" directory, and can be changed in-game (but requires a restart).
- Changed the default skin directory to the osu! directory, if available.
This implements a full parser for skin.ini (excluding CTB/Mania elements) based on the current wiki information. None of the settings have been implemented yet.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Attempts to eliminate any confusion between OsuHitObject (raw, parsed hit objects) and HitObject (interface for game object types).
- Renamed "HitObject" interface to "GameObject", since these objects are specific to gameplay.
- Renamed "OsuHitObject" to "HitObject", since these objects are primarily containers for parsed data.
Sorry if the name-swapping is confusing; these should be better names in the long run.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Renamed "OsuFile" to "Beatmap". All related variables and methods with "osu" have also been renamed to "beatmap" (or variants of each).
- Renamed "OsuGroupNode" to "BeatmapSetNode". Avoids confusion since groups are identified by a "set ID", not a "group ID".
- Renamed "OsuGroupList" to "BeatmapSetList", for the same reason as above.
- Renamed "OsuDB" to "BeatmapDB", for the same reason as above.
- Moved classes directly related to parsed beatmaps (Beatmap, BeatmapSetList, BeatmapSetNode, OsuHitObject, and TimingPoint) into a new "beatmap" package.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Generally much cleaner than Kochi Gothic, and half the file size. Uses an older version of the font, since many glyphs were removed in later versions (due to the glyphs being supported in other Google fonts).
Droid Sans Fallback is licensed under the Apache License, Version 2.0.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Actually provide relevant information when an audio file can't be found.
- When loading timing points, don't reset the start index every time.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Fixes:
- Set the modified speed again after unpausing and loading from checkpoints.
- Changed countdown delays based on current speed.
- Changed color of highlighted song info text to that in osu!.
- Made playback images unskinnable.
Code changes:
- Changed playback field in Game class to the PlaybackSpeed object instead of just the button.
- Changed PlaybackSpeed.next() to a non-static method.
- Added/edited Javadocs.
- Changed image names.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Can watch HalfTime on half speed.
Reset pitch on leaving the game state.
Load songInfo when entering select song menu.
Playback button fades in on hover instead of expands.
Reverted spinner changes. It should be fixed separately.
The master volume can now be changed (using the mouse wheel) with the ALT key pressed in any menu, as in osu!.
Also improved the handling of dimmed tracks.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Don't call MusicController.loopTrackIfEnded() if a beatmap reloading thread is running.
Other changes:
- Fixed issue where long download result text would be drawn outside the result area by adding a clip.
- Changed default music offset from -150ms to -75ms.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Changed the time format displayed on the main menu to match osu!.
- If no beatmaps are loaded, redirect the user to the downloads menu instead of an empty song menu.
Also, start showing bar notifications at time 1 instead of 0 so it can be called in enter() methods without visual delays.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Error handling (related to #53):
- Catch all exceptions caused by creating HitObjects and throw a more informative error with the hit object information. This also allows multiple errors to be reported, instead of crashing at the first error.
- Added a fallback "DummyObject" HitObject to replace hit objects causing errors, which should allow the game to function despite any errors.
- Added a toString() method to OsuHitObject (resembling the raw format).
Bug fixes (caused by #52):
- Game is no longer paused when focus is lost during lead-in time or during breaks.
- Replay frames are no longer recorded when the game is paused.
- Pulsing cursor animation now works even during lead-in time.
- skipIntro() during replays now works properly.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Glyphs are now loaded for specific fonts as needed, not for all of them at once. This reduces lag and saves memory.
- Fixed glyphs not being loaded in the downloads menu.
- Moved Utils.loadGlyphs() calls directly above text drawing code (easier to maintain, and fixes a bug with text flickering once).
Also removed MusicController methods 'getTrackName()' and 'getArtistName()' (not needed).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Animate skip button during lead in.
- Update flashlight radius during lead in.
- Check if keys are set before calling gameKeyPressed().
- Deleted mouse moved/dragged events (no longer used).
- Renamed updateGameKeyPress().
- Added "auto"/"relax" mod checks to gameKeyPressed().
Also fixed a bug where the MenuButton class wasn't properly resetting image alpha/rotation in certain cases.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Replay Changes:
- Saves replay frames as if its repaying, then plays the replay at exact track position. This should give out exact results as the score screen.
- Calculates MD5 for beatmap files. (doesn't currently help anything)
- Reverse Slider ball (fixes#50)
Moves the cursor between hit objects and along hit object paths (slider curves, spinner circles).
- Added 'getPointAt(trackPosition)' and 'getEndTime()' methods to HitObject interface.
- Unhide default cursor for "auto" plays.
Other changes:
- Don't save replays for unranked plays ("auto", "relax", "autopilot" mods).
- For "auto" replays, don't parse replay frames: use default "auto" behavior instead.
- Fixed cursor location data not being reset upon entering states.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
...to account for empty space around the alphamap image.
Also removed the persistent checkpoint text during gameplay (not necessary with the bar notification).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Restricted view area using alpha maps and offscreen drawing. (credits: davedes)
- Added silver grades.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- When reading replay frames, the thread will now sleep for the time difference minus 1ms if possible (to avoid so much unnecessary looping).
- Fixed a bug where the 'replay' GameData field wasn't being set in some cases.
- Move cursor to skip button location when skipping intro in a replay.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Hard Rock now flips hit object coordinates along the x axis, as in osu!.
- Fixed a bug where replay data wasn't being shown during breaks.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Fixes a bug where a resolution change (by restarting through the app) wouldn't re-scale hit object coordinates. Scaled coordinates are now stored in HitObject fields.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- A bar notification is now shown after opsu! updates.
- Insert the current database version into the beatmap cache upon creation (fixes the initial version check) and only update the version if necessary.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added 'info' table to score database to store the database version. Upon startup, if the stored version is less than the source version, all update queries defined in ScoreDB.getUpdateQueries() will be run.
- Created "Replays" directory to store replay files. Replay files are created after gameplay.
- Added 'replay' column to the score database to hold replay file names.
- Created a Game.loadOsuFile() method to load game data.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added Replay.save() method to save replays to a file.
- Separated Replay loading from the constructor into a load() method.
- Added OsuWriter class to write replays.
- Parse replay seeds (what do they do?).
- Added Updater.getBuildDate() method to retrieve the current build date (for the replay 'version' field).
- Added osu! mode constants in OsuFile.
- Added methods to retrieve raw ReplayFrame coordinates.
- Added replay fields/methods to GameData and Game state.
- Added jponge/lzma-java dependency for LZMA compression, since it isn't implemented in Apache commons-compress...
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This drops less frames, but is still pretty bad. See #42.
- Changed some LinkedList classes to LinkedBlockingDeques and added some synchronized methods.
- Slight modifications to OpenALStreamPlayer (may or may not be slightly more accurate).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Basic implementation of viewing replays in the Game state.
- Added OsuReader class for reading certain osu! file types. (author: Markus Jarderot)
- Added Replay, ReplayFrame, and LifeFrame classes to capture replay data. (author: smoogipooo)
- Added 'keyPressed' parameter to HitObject.update().
- Added cursor-drawing methods in UI that take the mouse coordinates and pressed state as parameters.
- Added GameMod methods to retrieve/load the active mods state as a bitmask.
- Added Apache commons-compress dependency for handling LZMA decompression.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added modified copy of slick.gui.TextField: added CTRL+BACKSPACE for word deletion, and disabled left/right arrows to move cursor and CTRL+Z to undo.
- Fixed musicEnded() incorrectly setting the "trackEnded" upon swapping tracks. This has caused some nasty loops since #38.
- Fixed a null pointer exception in OsuDB from 0b03912.
- Fixed the song menu search bar transition being incorrectly reset when hitting backspace on a 0-length query.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
When cached, defer loading of timing points, breaks, and combo colors until directly before a game. Potentially cuts loading time by 50%, and saves a bit of memory.
Other changes:
- Don't store the default combo colors in the cache.
- Removed some PreparedStatements that only get executed once.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
opsu! will now check for updates upon launching, and will prompt the user to download and run a newer version, if available.
- The remote version file is just the filled "version" file, currently located in the gh-pages branch.
- The new version is downloaded to the working directory, and launched with ProcessBuilder.
Related changes:
- Added "file" property (containing the download URL) to "version" file.
- Added maven-artifact dependency for version comparisons.
- Added methods in Downloads class to retrieve the constructor parameters.
- Moved method for showing exit confirmation dialogs into UI.
- Moved method for reading from URLs into Utils.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Main menu:
-- 'd': opens downloads menu
-- 'r': plays random track
- Song menu:
-- SHIFT+DEL: opens beatmap deletion menu
Other changes:
- In the main menu, tracks now play from the beginning instead of the preview time.
- Fixed "next page" icon sometimes showing in the downloads menu when a next page didn't exist.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Also added a few checks for related "autopilot" mod (probably incomplete).
Fixed the wrong default background being shown in the ranking screen.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Notifications are now sent when a download is complete and when new songs are imported in the downloads menu.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- F7: cycles through FPS settings.
- F10: toggles mouse enable/disable state during gameplay.
Also added bar notifications for saving/loading checkpoints.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Added draw(), update(), and enter() methods in UI to do all the necessary calls (instead of letting the states handle them).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- New database ".opsu.db" stores a cached copy of all parsed beatmaps. All data will be read from this database unless the last modified time of a beatmap file does not match the one in the table.
- OsuParser inserts all new entries to the database in batch after parsing.
- Added *toString()/*fromString() methods for 'breaks', 'timingPoints', and 'combo' fields in OsuFile for use with the database.
- For any database format changes, update the DATABASE_VERSION field in OsuDB.
- Reloading beatmaps (F5) will now clear the beatmap cache.
Related changes:
- Added small DBController class for convenience.
- Changed 'bg' field of OsuFile to only contain the image file name, instead of the full path.
- Deleted printDatabase() method from ScoreDB.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Clicking the mouse wheel now pauses the game (with these options disabled).
- Created an "Input" category in the options menu.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Moved all MultiClip-handling methods into the MultiClip class.
- Destroy extra clips when starting and finishing new beatmaps.
- Reduced maximum number of extra clips to 20.
- Attempted fixes at multithreading issues.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Sliders no longer need to be held to the end, but near it (within a 300-hit offset) for perfect hit.
Also made a slight improvement to SongMenu.setFocus().
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Always show the bar until no ticks are left.
- Fade out the bar.
- Moved from "Custom" options into "Gameplay".
- Separated drawing from update logic.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Partial revert of changes made in that commit; also made song menu header/footer partially transparent again. Thanks to @fluddokt.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This is currently being used for the logo/play/exit buttons in the main menu.
Also fixed bug where mod multipliers weren't being read.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added a simple color change when hovering over an option in the options menu.
- Draw part of the song button before the start node, if any, for a more complete-looking scroll animation.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- The MenuButton class now fully supports hover effects (scale, fade, rotate) for Animations.
- Used a fixed location for the selection buttons in the song menu (previously based on the "back" button width, which varies widely in different skins).
- Added hover effects for "retry" and "exit" buttons in the ranking screen.
- Changed animation speed of back/skip buttons.
- Fixed a bug where main menu showed the incorrect number of songs loaded during searches.
- Removed unneeded draw() methods in Utils for color filters (since 69f5aa5).
- Moved Utils.drawCentered(Image, ...) into the Image class.
- Added overwritten Image class to Maven excludes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Reverted "Extends ScoresData bg to clock", as this was intended behavior.
- Fixed overlapping text in the options menu, and made it look more similar to the other menus.
- Fixed issues with the text and icon in the song menu header in certain resolutions.
- Fixed minor issue with ranking screen header text positioning.
- Decreased skip button hover scale.
- Some code style changes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Replaces the mods being shown in the options menu.
- Added all the (base) mod icons to the menu, with the unimplemented ones grayed out.
- Added a rotation effect to MenuButton, and now multiple effects can be set at once.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Replaced duplicate GameImage.process_sub() calls from related images with calling a single method, for easier editing.
- Suppress warnings from overwritten Slick2D classes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added "selection-*" images from Xiaounlimited's "Nexus Ivory" skin. These do the same thing as the F1-F3 keyboard buttons in the song menu.
- Removed the old wrench icon and replaced it with an "Other Options" button. F1 no longer opens the options menu.
- Moved the search bar to under the tabs and better simulate osu! behavior. Removed the old search icon.
- Added solid black bars at the top and bottom of the song menu. Moved the top divider closer to the end of the information text. Cropped song button images to fit between the bars.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Visual changes:
- Larger hit circles
- Circle overlay after drawing circle
- Fade in approach circles
- Fade in sliders
- Fade out hit lighting
- Hit Error Bar
- Reverse Slider ball rotation on repeats
- Fill bg image to screen while keeping aspect ratio
- Added a few more resolutions
- The music position bar in the main menu is now clickable (changes track position).
- Fixed scroll bar height function, and merged all scroll bar drawing into a single Utils.drawScrollbar() method.
- Fixed the buggy song menu scroll bar.
- Scaled the sizes/positions of the main menu music icons (previously fixed/hardcoded).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
mostly personal preferences though
Larger hit circles
Circle overlay after drawing circle
Fade in approach circles
Fade in sliders (I don't think it looks that bad)
Fade out hit lighting
Hit Error Bar
Probably need an option for this.
Miss locations(I don't know)
Reverse Slider ball rotation on repeats
- Added score management menu for deleting individual scores.
- Store generated title string lists in the beatmap menus to prevent performance issues.
Allow using the right mouse button (as well as left mouse button) in all states.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
New menus: beatmap options (erase scores/delete), delete beatmaps (single/all), reload songs.
- Pressing F3 or right-clicking in the song menu state will open the beatmap options menu.
- Pressing F5 in the song menu now opens a confirmation menu before reloading beatmaps.
- Deleted MainMenuExit state, which is replaced by MenuState.EXIT in ButtonMenu.
- Decreased Utils.FONT_XLARGE size (to fit in buttons).
Note: as of 800014e, song directory deletion is broken.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Removed the temporary directory (Options.TMP_DIR), which is no longer needed.
- Excluded original Slick2D classes that were overridden in pom.xml.
- Formatting changes and documentation.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- OsuGroupList.get().deleteSongGroup() will delete a song group from the list.
- OsuGroupList.get().deleteSong() will delete an individual song from the list (must be expanded), and will delete the song group if there are no remaining songs in the group.
- If possible, deleted beatmap files are moved to system trash (using JNA); otherwise, they are deleted immediately. This is done through Utils.deleteToTrash().
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Draw the playfield background in the song menu if a background cannot be drawn for the focused beatmap.
- Added ScoreDB.deleteScore() method to delete a score from the database.
- Added @author tags for curve-related classes (by fluddokt, #12).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- All beatmap set IDs are now stored in a set in OsuGroupList.
- OsuParser now checks the directory name for beatmap set IDs if the OsuFile doesn't contain one (for older beatmap formats).
Tweaks:
- Clear completed downloads when hitting "Import All".
- Call Download.updateReadSoFar() upon starting downloads instead of waiting for user to hover over the button (causing an unnecessary delay).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Rotate slider ball image along the curve.
- Show download speed and time remaining when hovering over the download info button.
- Maintain aspect ratio of beatmap background image during gameplay.
- Clear beatmap background image cache after reaching OsuFile.MAX_CACHE_SIZE.
- Multiply hit circle size by OsuHitObject.getXMultiplier().
- Scale MENU_BUTTON_BG based on SongMenu.MAX_SONG_BUTTONS.
- Fixed download search TextField retaining focus even after leaving the downloads menu.
- Include Unicode title/artist strings in searches.
- Parse x,y beatmap coordinates as floats (instead of integers), and only read Kiai time if present.
- Added 1600x1200 resolution.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
May rarly crash/not play on next music.
May have introduced other unknown bugs.
This may be due to loading it async.
Also loading of ogg is not loaded async anymore as it seems it doesn't
work very well.