- 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>
New track is "On the Bach" by Jingle Punks, from the YouTube Audio Library (https://www.youtube.com/audiolibrary/music).
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>
- Page back/forward are now expanding buttons instead of static images.
- Fixed a mistake in DownloadList.
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>
Fixes a bug during gameplay where if the music track ends before the last hit object is processed (esp. spinners), the game would hang.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Moved all curve-related classes into a new package.
- Added some fields and methods to Curve abstract class.
- Removed the old (no longer used) Bezier subclass.
- Changed Error throwing to ErrorHandler.error() calls.
- Formatted code.
Also fixed a crash when reaching the ranking screen with the "Auto" mod active.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
New slider curve types (CircumscribedCircle, LinearBezier) and other fixes.
- Better rendering of multi-repeat arrows.
- Fixed circle color ordering.
- Better multipliers for hit object coordinates.
Prevents a bug due to threading where the theme song can still be playing in the song menu (when songs are loaded) if the user clicks fast enough.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added history icon by Google: https://www.iconfinder.com/icons/326655/
- Draw history icon and elapsed time next to score buttons if they were achieved within 24 hours. Conforming to osu! behavior, the elapsed time is not updated in real-time.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fixed bug when having "Sudden Death" and Easy "mods" enabled at the same time. Additional "lives" are no longer granted.
- Fixed bug where GameMod active states weren't being reset upon restart.
- Fixed bug where GameMods were drawn as if inactive when viewing scores. Alpha levels are now only set when drawing the button (i.e. calling GameMod.draw()).
- Moved large grade scaling into GameImage, and slightly padded the right side when drawing.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fixed a crash when closing the application in the ranking screen when viewing a score.
- Fixed a minor bug where OsuGroupList fields were not being erased upon restart.
- Dim the track volume by 50% when viewing a score.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Added a scrollable score history area in the song menu. Clicking on any score button will open the ranking screen.
Details:
- All drawing is performed by ScoreData.
- Store scores for the current focus node, and display up to "MAX_SCORE_BUTTONS" at a time; "startScore" is the starting index.
- When hovered over the score area, show scroll bar if needed. When hovered over individual score buttons, change colors and show the rank.
- Scrolling with the mouse in the score area overrides song scrolling.
- Store scaled grade images as a Grade field.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Implemented basic features (mostly stable). The remaining features are mostly graphical.
- Added package org.xerial.sqlite-jdbc. All scores are saved to .opsu_scores.db on table `scores` after a game completes.
- Added "Scores" class to handle all game score data (including database connections). The "Score" subclass encapsulates all database fields.
- Added "score viewing" constructor to GameData, for use only in the ranking screen.
- Draw the grade of the highest score next to expanded song buttons in the song menu.
- Added "bit" and "abbrev" fields to GameMod, used in storing/displaying scores.
- Hide the retry/exit buttons in the ranking screen when viewing a score.
Other changes:
- Removed "objectCount" field in GameData (no longer necessary).
- Removed "getID()" method in GameMod (no longer used).
- Moved most drawing in GameRanking state to GameData.
- Removed File parameter of "GameData.loadImages()" (leftover, no longer used).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Support loading scorebar-bg animations.
- Slight changes to scaling and positioning of scorebar-bg. This still isn't quite correct (TODO).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Collapsed Javadoc comments for all fields.
- OsuFile now has proper Javadoc comments.
- Fixed various mistakes with comments.
Some changes with enums:
- Changed Class.values() calls to values().
- Changed size() calls to a SIZE field.
- Changed valuesReversed() calls to a VALUES_REVERSED field.
- Removed 'static' from enum declarations.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Allows loading an undetermined number of files using a format string (e.g. combo bursts, slider balls).
- Fixes bug with those images not being properly reloaded.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Press F5 to reload beatmaps in the song menu (resets OsuGroupList, then invokes OSZ unpacker and OsuFile parser).
- Many components reused from Splash screen (progress display, 'Esc' interrupt).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Renamed Options state into OptionsMenu, and created Options class for solely handling user options. Moved everything unrelated to the actual options menu into the static Options class.
- OptionsMenu no longer has static fields.
- Refactored option tabs into an enum, which makes the code much cleaner.
Also fixed a bug where global volume wasn't being used on container initialization.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Each song group references the same audio file probably 100% of the time, so don't create duplicate objects.
Also, follow-up to 3b13cc7: the up/down arrow keys now change global volume in the main menu and game states (in addition to the scroll wheel).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fixes resource reloading when OsuGroupList is empty (i.e. if user has no beatmaps installed).
- OsuGroupList is no longer initialized with a class instance; OsuGroupList.create() is called by OsuParser.
- Also clear 'lastOsu' field in MusicController.reset(). Fixes theme song not playing on restart if it was the last track played (i.e. if no beatmaps installed).
- Call MusicController.reset() last so that more garbage is collected.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Pressing Ctrl+Shift+F5 in the options menu restarts the game. Beatmaps and sounds are not reloaded.
- Use GameContainer.setForceExit(false) to trigger a restart after exiting.
Other changes:
- Fixed general issues with track pausing/pause states.
- Store all background images loaded in OsuFiles in a static hash table, instead of in individual objects. This allows easier access to the allocated memory.
- Only delete OSZ files if they were unzipped. (They were previously deleted in all cases.)
- Moved more images (mods, playfield, lighting) into GameImage.
- Moved OsuHitObject initialization inside Utils.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- All sounds are now multiplied by a master volume setting.
- Changed all default volume levels.
- Scrolling in the main menu and game states changes the master volume and displays a volume bar on the right side of the screen.
- "volume-bg.png" image by @kouyang.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Reverted earlier change to load images immediately before a game begins, since there is a noticeable lag in some cases.
Other changes:
- Added 'preload' field to GameImage.
- Changed 'gameImage' field in GameImage to 'skinnable' (more suitable name).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Allows parsing only a subset of OsuFiles, in case parsing takes too long.
Other changes:
- Press 'ESC' three times to exit from the Splash state.
- Override Container.exit().
- Reset MusicController in closeRequested() to prevent an OpenAL error.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Critical game errors (detected in Game.updateAndRender()) are now passed through ErrorHandler. Note that the actual exception is not displayed in the ErrorHandler window, only the log.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- FPS display is now much more subtle.
- A couple of main menu tweaks.
Other changes:
- Restore old alpha levels of Utils.COLOR_* constants when modifying them.
- Utils.loadFont() can load any font effect, not just a ColorEffect.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>