Commit Graph

105 Commits

Author SHA1 Message Date
fd
0562c66531 Kinectic Scrolling
for SongNodes, Scores, Download Results, Download Info
2015-09-14 19:19:49 -04:00
Jeffrey Han
d860a30aed Follow-up to #99.
- 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>
2015-06-29 19:22:38 -05:00
Jeffrey Han
00a08f1327 Renamed "OsuParser" to "BeatmapParser"; moved into "opsu.beatmaps".
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-05-29 03:07:58 -04:00
Jeffrey Han
3f081f1a8a Renamed "SongSort" to "BeatmapSortOrder"; moved into "opsu.beatmaps".
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-05-29 02:34:08 -04:00
Jeffrey Han
2c47e9a1b9 Moved "UI" and "MenuButton" classes to new package "opsu.ui".
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-05-29 01:55:57 -04:00
Jeffrey Han
ee5bc4b616 Continuation of 53c79c5 - created a BeatmapSet class.
Moved the strictly beatmap-related parts of BeatmapSetNode into a new BeatmapSet class.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-05-16 22:49:18 -04:00
Jeffrey Han
53c79c5d85 Major refactoring - now using far more logical class names.
- 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>
2015-05-16 21:25:19 -04:00
Jeffrey Han
436aa2bed9 Minor UI tweaks (options menu background, clip overflows, etc.).
Background from: http://www.urwallpapers.com/streaks-of-light/

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-05-16 17:46:23 -04:00
Jeffrey Han
6c8d4ea49a Changed font to Droid Sans Fallback v2.55b. (fixes #65)
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>
2015-05-15 01:33:53 -04:00
Jeffrey Han
07075c094b Mod difficulty multipliers are now reflected in displayed song info.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-04-04 12:30:23 -04:00
Jeffrey Han
2efb18e225 Follow-up to #68.
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>
2015-04-03 18:08:35 -04:00
Pavel Kolchev
f810965921 DT/HF/Playback changes.
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.
2015-04-03 15:01:18 +03:00
Pavel Kolchev
5f3ce74c64 Implemented half/double time mod.
Dynamic bpm, map length in song select menu.
Fixed replay and spinner with these mods.
2015-03-31 18:14:52 +03:00
Jeffrey Han
c15cd5cb4c Follow-up to a6ece30: allow changing volume anywhere with ALT key.
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>
2015-03-26 20:45:33 -04:00
Jeffrey Han
daad5940f0 Fixed crashes when importing beatmaps (due to more async issues).
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>
2015-03-19 23:38:19 -04:00
Jeffrey Han
e6576bd7f9 Glyph loading fixes and improvements (for Unicode fonts).
- 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>
2015-03-19 16:45:26 -04:00
Jeffrey Han
a7390f7c1d Added fade effects for tooltips.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-13 02:52:18 -04:00
Jeffrey Han
a66133c605 Draw score info tooltips when hovering over a score.
Also added game mod 'name' fields.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-13 00:24:51 -04:00
Jeffrey Han
712cf30e01 Added replay saving/loading and score database auto-updater.
- 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>
2015-03-11 20:52:51 -04:00
Jeffrey Han
37c0763f32 Allow showing a replay after a game.
Added a pause-replay image by XinCrin, and deleted ranking-retry/ranking-exit images.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-11 15:53:19 -04:00
Jeffrey Han
fa6132808e Show the default mouse cursor during replays.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-09 19:54:28 -04:00
Jeffrey Han
f6412f06e8 Initial replay parsing support.
- 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>
2015-03-09 18:32:43 -04:00
Jeffrey Han
dc26f6c131 TextField updates, and bug fixes from some recent commits.
- 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>
2015-03-08 16:34:28 -04:00
Jeffrey Han
f9878f4fa4 More optimizations: don't load OsuFile array fields until needed.
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>
2015-03-08 03:05:01 -04:00
Jeffrey Han
8c24ef97c7 Follow-up to #38: loop tracks on states by default.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-07 19:04:45 -05:00
fd
11b5c41b46 Next track on trackEnded
(but checks trackended every update...)
Continue playing while minimized(does not fix moving)
start from preview time in songMenu on repeat
2015-03-07 15:31:21 -05:00
Jeffrey Han
81601d41aa Implemented various keyboard shortcuts.
- 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>
2015-03-06 01:29:50 -05:00
Jeffrey Han
cf9b22442f Added global F7 and F10 shortcuts.
- 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>
2015-03-05 14:40:57 -05:00
Jeffrey Han
235adc539e Extracted UI components from Utils into a separate UI class.
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>
2015-03-05 13:27:45 -05:00
Jeffrey Han
bf04083ebd Added a beatmap cache database.
- 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>
2015-03-04 21:03:06 -05:00
fd
f9f95aae11 Merge remote-tracking branch 'ita/master' into AudioTest
Conflicts:
	src/itdelatrisu/opsu/states/SongMenu.java
2015-03-01 13:14:44 -05:00
fd
04bfbc70fc Addition/Edge Addition SampleSet
Minor fix with combo colors and spinners
2015-03-01 11:06:46 -05:00
Jeffrey Han
c543ddea01 Follow-up to #25.
- 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>
2015-03-01 00:03:06 -05:00
Jeffrey Han
163e72d423 Made sliders very slightly easier.
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>
2015-02-21 17:12:18 -05:00
Jeffrey Han
dfeb93d696 Follow-up to ab1a377: now using Graphics.setClip().
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>
2015-02-19 23:45:48 -05:00
Jeffrey Han
ab1a377be0 Minor graphical changes.
- 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>
2015-02-19 02:43:26 -05:00
Jeffrey Han
25a7a826f1 More graphical updates, some code cleanup, and minor fixes.
- 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>
2015-02-19 00:33:32 -05:00
Jeffrey Han
1a4120a736 Follow-ups to #21.
- 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>
2015-02-18 19:35:26 -05:00
fd
1dc71aaa7f Merge quick bad fix 2015-02-17 22:54:20 -05:00
fd
65e538fbdc Merge remote-tracking branch 'orgin/master' into omaster
Conflicts:
	src/itdelatrisu/opsu/GameImage.java
	src/itdelatrisu/opsu/OsuGroupNode.java
2015-02-17 22:49:19 -05:00
Jeffrey Han
69f5aa5748 Added a separate Game Mods menu.
- 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>
2015-02-16 17:53:24 -05:00
fd
e02b195b71 Hard coded Ranking Panel
Hard coded Scorebar
Made MenuButtonBG colours darker
Extends ScoresData clock bg
More General Scaling
2015-02-16 11:34:35 -05:00
Jeffrey Han
66016160a4 Song menu graphical updates.
- 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>
2015-02-15 21:38:54 -05:00
Jeffrey Han
c2793ae31c Some graphical improvements and fixes.
- 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>
2015-02-15 00:25:07 -05:00
Jeffrey Han
7cc4ff51d0 Follow-up to c6791c4.
- 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>
2015-02-13 03:45:38 -05:00
Jeffrey Han
c6791c4714 Added new menus, implemented using a generic ButtonMenu state.
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>
2015-02-13 02:43:34 -05:00
Jeffrey Han
b69ff68d7c Added methods to delete songs and song groups.
- 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>
2015-02-12 02:27:33 -05:00
Jeffrey Han
99bc944ed6 Minor updates.
- 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>
2015-02-11 02:56:02 -05:00
Jeffrey Han
f56c02864b Updates and fixes from fluddokt/opsu@76778f8 and fluddokt/opsu@cf321e9.
- 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>
2015-02-09 21:40:38 -05:00
Jeffrey Han
ec90d6fd03 Beatmap downloader improvements and fixes.
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>
2015-02-02 00:15:16 -05:00