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>
The minimum batch loading size is now based on the beatmap cache size instead of an arbitrary constant.
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>
Downloads failing due to connection errors will now send a bar notification instead of throwing an ErrorHandler dialog.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Instead of being loaded individually from the database, OsuFiles are now loaded in batch by traversing the database. In most cases, this should cause a ~10% loading speed improvement. Defaults to the previous approach if few OsuFiles are being loaded.
Other changes:
- Don't drop indexes upon batch insertion if few entries are being inserted.
- Trying to increase fetch size with setFetchSize(100).
- Added more parser statuses.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added indexes.
- Only call OsuDB.insert() if necessary.
- Drop/recreate indexes for batch inserts.
- Added pragmas for "locking_mode" and "journal_mode".
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>
Added copy of GameContainer.java:
- updateAndRender() no longer calls Log.error(), and re-throws the original exception as a SlickException. This prevents errors from being logged twice, and now the relevant one is shown in the error popup (instead of a useless "failure" message).
- getBuildVersion() no longer calls Log.error(), and removed slick build information from "version" file.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Maven version and build date are now written to "res/version".
- The GitHub Issues form is auto-filled with error information if available. (reference: fluddokt/opsu@53fe3d9)
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>
Also changed drawSymbolString() and drawFixedSizeSymbolString() methods slightly: coordinates are now floats, and drawSymbolString() takes an 'alpha' argument.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Boolean and integer option values are now stored in a GameOption field instead of individual static fields in the Options class.
- Added default method bodies for getValueString(), click(), and drag() based on the option type.
Also made the options file parser continue after a NumberFormatException instead of quitting immediately.
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>
- Removed 'isSpinner' field from GameData.hitResult() since it's now being passed the full OsuHitObject.
- Minor Javadoc fixes.
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>
Image locations are now searched separately and in order, instead of just relying on ResourceLoader. Fixes issues with some images in the skins directory not being loaded at all, as well as image arrays being loaded from mixed locations.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>