- Many code style changes.
- Don't increment combo if missing the last slider circle.
- Added player name in ranking screen.
- Don't show null/default player names.
- Only import replays with .osr extension.
- Display loading status for importing replays.
- Moved MD5InputStreamWrapper to package "opsu.io".
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>
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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
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>
- 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>
- 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>
- 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>
- 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>
- 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>
- 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>
Updates:
- Added some buttons to downloads menu: clear inactive downloads, import beatmaps, reset search, and show/hide unranked maps.
- Small changes to OsuParser, OszUnpacker, and OsuGroupList (mostly adding return values) to allow parsing only newly unpacked beatmaps.
- Added alpha fade hover effect to MenuButton, as an alternative to expanding (used for 3-part menu buttons).
- Added text rendering fields to MenuButton (also for the 3-part menu buttons).
- Added sound effects to downloads menu.
Fixes:
- Check downloads for illegal filename characters, and remove them if necessary.
- The number of results and downloads shown now supports all resolutions.
- Confirmation dialog no longer appears when restarting the application (since downloads are static).
- Do not set a focus node immediately if the theme song will be played.
- Always play the theme song if no songs are loaded (even if disabled in settings).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
The downloads menu can be accessed through the button on the right side of the main menu. The downloader supports searching and concurrent downloads (NOTE: this is limited by the download server!). Double-click any search result to begin downloading it to the SongPacks directory; cancel the download by hitting the red 'x' in the upper-right corner. A confirmation will appear if trying to quit opsu! while downloads are running.
New classes:
- Download: represents an individual download from a remote address to a local path, and provides status and progress information; downloads files using Java NIO.
- DownloadNode: holds a Download object as well as additional beatmap fields, and handles drawing.
- DownloadList: manages the current list of downloads.
- DownloadsMenu: game state controller.
- DownloadServer: interface for a beatmap download server.
- BloodcatServer: implements DownloadServer using Bloodcat.
- ReadableByteChannelWrapper: wrapper for ReadableByteChannel that tracks progress.
Added images:
- "downloads" image by @kouyang.
- "search-background" image from "Minimalist Miku" skin (listed in credits).
- "delete" icon by Visual Pharm (https://www.iconfinder.com/icons/27842/) under CC BY-ND 3.0.
Other changes:
- Added up/down/left/right Expand directions to MenuButton class.
- Removed width/height parameters from OsuParser (leftovers).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>