Commit Graph

446 Commits

Author SHA1 Message Date
Drew Lemmy
f7d6fed0c6 Final fixes #71 2015-04-07 19:23:54 +01:00
Drew Lemmy
81b8182244 Fixed gekis and katus not being shown on hit results 2015-04-07 13:44:27 +01:00
Drew Lemmy
792b511a46 Added slider fading to hit animations 2015-04-07 13:13:43 +01:00
Drew Lemmy
8e8fda7e58 Added pretty much everything suggested to hit animations 2015-04-07 06:24:09 +01:00
Drew Lemmy
c3bca9a39e Changed lighting texture 2015-04-07 03:00:14 +01:00
Drew Lemmy
9a2772b614 Moved hit result to be drawn after lighting 2015-04-06 23:12:36 +01:00
Drew Lemmy
87e68bd494 Added hit animations, updated lighting & added InteliJ to gitignore 2015-04-06 23:08:49 +01: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
Jeffrey Han
420284af4f Merge pull request #68 from DarkTigrus/doubletime
HalfTime and DoubleTime mod
2015-04-03 16:46:52 -04:00
fd
fa9accfc88 spinner 2015-04-03 14:00:59 -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
fd
a49b5bc945 Replay importing 2015-04-02 19:10:33 -04:00
Pavel Kolchev
d8425197a7 Implement playback speed in replays. 2015-04-02 19:38:45 +03:00
Jeffrey Han
28514a8606 Merge pull request #69 from DarkTigrus/stack-hardrock
Correct Y offset with HardRock mod
2015-04-01 10:26:26 -04:00
Pavel Kolchev
ffadf197ba Fixes incorrect Y offset with HardRock mod. 2015-04-01 15:10:15 +03:00
Jeffrey Han
66bd97242f Minor follow-up to #63.
Pass in an alpha level instead of color filter to drawSymbolNumber().

Also fixed a bug where antialiasing wasn't being disabled when it was supposed to be.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-31 19:46:58 -04:00
Jeffrey Han
1d9ec52c8a Merge pull request #63 from DarkTigrus/fadein-fix
Circle and slider fade in.
2015-03-31 19:29:18 -04: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
e83e0da70f Fixed Slider.getPointAt() returning an incorrect end point.
Also some additional tweaks to #61.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-30 23:58:11 -04:00
Jeffrey Han
4b91018b70 Very minor follow-up to #61.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-30 23:06:52 -04:00
Jeffrey Han
f63be81490 Merge pull request #61 from DarkTigrus/hitobject-stacking
Hit object stacking algorithm
2015-03-30 22:38:42 -04:00
Pavel Kolchev
87667c5dab Correct circle and slider fade in.
Match osu! behaviour. Fadein time is static and doesn't scale with approach rate. Circles, numbers, arrows and ticks alpha is the same.
2015-03-30 17:06:16 +03:00
Pavel Kolchev
e441d3e4e1 Update stacking algorythm.
Revert previous commit. Curve should be re-created or updated.
No more extra updatePosition() calls.
2015-03-30 13:02:38 +03:00
Pavel Kolchev
eadbdbee78 Remove unnecessary re-creation of curve. 2015-03-29 03:06:26 +03:00
Pavel Kolchev
2e5226ecd5 Refactor and cleanup 2015-03-28 21:49:25 +03:00
Pavel Kolchev
2aaf5e73be Remove unnecessary methods. 2015-03-28 21:48:29 +03:00
Jeffrey Han
77d42d7fd8 Fixed issue with async modification of DownloadList. (fixes #62)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-28 12:41:17 -04:00
Pavel Kolchev
fbe87559c9 Implement hit object stacking algorithm. 2015-03-28 15:11:43 +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
18e57fdb96 Minor changes: fading game bg dim, initial flashlight radius fix.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-24 01:03:58 -04:00
Jeffrey Han
a6ece307ff Allow changing volume in the game paused menu.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-23 20:40:50 -04:00
Jeffrey Han
850a6c3882 Better error handling for Clip loading. (fixes #59)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-23 16:42:02 -04:00
Jeffrey Han
16ec6c5e23 Disable auto-updater if running with XDG directories. (fixes #58)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-20 14:49:20 -04:00
Jeffrey Han
3e1abf89cf Stop track previews when importing beatmaps.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-20 00:44:50 -04:00
Jeffrey Han
1159c606f7 Updating to version 0.8.0.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-20 00:39:26 -04:00
Jeffrey Han
88bdf256aa Merge pull request #54 from fluddokt/omaster
Fixed #53.
2015-03-19 23:44:04 -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
fd
f54ba9d3e8 Fix for #53 2015-03-19 22:55:42 -04:00
Jeffrey Han
fc5f56f75a Minor main menu changes.
- 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>
2015-03-19 22:10:38 -04:00
Jeffrey Han
cb8c7c399c Game state bug fixes and better error handling.
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>
2015-03-19 19:03:07 -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
ec042159a8 Added track previews to the downloads menu.
Currently uses the osu! server to load MP3 previews.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-19 15:58:50 -04:00
Jeffrey Han
7d5899ba7e Fixed a major memory leak caused by MusicController.getDuration().
Blame: f23159d

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-19 04:47:02 -04:00
Jeffrey Han
b46c589b97 Follow-up to #52.
- 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>
2015-03-19 03:04:35 -04:00
Jeffrey Han
ba20953634 Merge pull request #52 from fluddokt/ReplayTest
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)
2015-03-19 02:05:20 -04:00
fd
2356d8df69 Hopefully fixes most of the bugs of the replay change.
append
2015-03-19 00:52:05 -04:00
fd
f67ca79ea7 Hopefully fixes most of the bugs of the replay change. 2015-03-19 00:33:19 -04:00
Jeffrey Han
5061b45f84 Added an option to disable follow points.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-18 23:23:34 -04:00
Jeffrey Han
ad5379b8f0 Fade in follow points.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-18 22:57:44 -04:00
Jeffrey Han
40933cfa86 Implemented follow points.
Added new followpoint image from "Vocaloid Project Skin" by noClue.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-18 22:20:37 -04:00
fd
2877d9bc3d Merge remote-tracking branch 'org/master' into ReplayTest
Conflicts:
	src/itdelatrisu/opsu/objects/HitObject.java
	src/itdelatrisu/opsu/states/Game.java
2015-03-18 00:20:34 -04:00
fd
93b336fdf6 Fixes Flickering during replay
Calculates Md5 for beatmap files.

Reverse Slider ball #50
2015-03-17 23:39:18 -04:00
Jeffrey Han
c14b4b4822 Implemented "autopilot" mod.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-17 19:03:50 -04:00
Jeffrey Han
e362232d5f Fixed some game mod inverse checks.
- Fixed issues with Auto and Spun Out/No Fail.
- Added checks for Half Time and Double Time.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-17 16:03:49 -04:00
Jeffrey Han
ebbe9db717 Include OS, architecture, and JRE information in error reports.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-17 15:49:20 -04:00
Jeffrey Han
e6206e52d4 Draw cursor location in "auto" mod.
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>
2015-03-17 14:48:13 -04:00
Jeffrey Han
f23159d003 Added method to get duration of MP3s.
Currently used for the music bar in the main menu.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-16 13:16:30 -04:00
Jeffrey Han
678f902744 Moved OsuReader and OsuWriter into a new package 'opsu.io'.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-16 11:58:51 -04:00
Jeffrey Han
1927fe0309 Follow-up to b5a6455: increased visible area size.
...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>
2015-03-15 16:39:28 -04:00
Jeffrey Han
b5a6455d0a Implemented "Flashlight" mod.
- Restricted view area using alpha maps and offscreen drawing. (credits: davedes)
- Added silver grades.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-15 15:38:04 -04:00
fd
60f2a9f142 ReplayTest
Seems to work
but still buggy
lots of flickering during replay
2015-03-15 14:31:26 -04:00
Jeffrey Han
f7c627e8a2 Follow-up to #49.
Allowed toggling HD image loading in-game; changed some names; other minor formatting changes.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-14 23:28:50 -04:00
Jeffrey Han
637f5dc8d4 Merge pull request #49 from fluddokt/omaster
@2x size images, combo burst speed scaling, CircumscribedCircle drawing optimization.
2015-03-14 22:52:56 -04:00
fd
aeaaa9af4f @2x size images.
ComboBurst speed scaling.

CircumscribedCircle drawing optimization.
2015-03-14 18:50:09 -04:00
Jeffrey Han
6e0fcca84c Replay accuracy improvements.
Store keys from previous frame, and only send a keypress if a new frame's keys differ.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-14 17:51:49 -04:00
Jeffrey Han
356772b6b6 Minor replay changes, and added pop effect for the scorebar marker.
- 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>
2015-03-13 18:03:44 -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
35b1bf197f Minor follow-up to #48.
Created some more variables for readability.

Removed some unnecessary casts.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-12 23:53:25 -04:00
fd
be4cb6d608 Merge remote-tracking branch 'ita/master' into omaster
Conflicts:
	src/itdelatrisu/opsu/GameImage.java
2015-03-12 22:51:14 -04:00
fd
0b16f0e157 More General scaling
Font Scaling.
Hit Error Bar scaling.
2015-03-12 22:49:04 -04:00
Jeffrey Han
a19eb39259 Fixed bugs with Hard Rock mod and replays during breaks.
- 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>
2015-03-12 20:33:32 -04:00
Jeffrey Han
49c85b3b08 Store raw hit object coordinates instead of scaled ones.
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>
2015-03-12 20:12:43 -04:00
Jeffrey Han
3bd9bbdafd New updater notification and minor OsuDB fix.
- 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>
2015-03-12 02:38:43 -04:00
Jeffrey Han
87323533af Better error handling for Replay.load().
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-12 01:18:50 -04:00
Jeffrey Han
c53679fe63 Save replays in a new thread.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-11 21:00:50 -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
7942522c9d Merge remote-tracking branch 'origin/master' into replay
Conflicts:
	src/org/newdawn/slick/openal/OpenALStreamPlayer.java
2015-03-11 00:45:10 -04:00
Jeffrey Han
65c50771ac Insignificant whitespace changes from #44.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-11 00:37:57 -04:00
fd
ab9ea57a4c Attempt to fix inaccurate track positions #42
cleanup
2015-03-10 22:55:58 -04:00
Jeffrey Han
790a66ec1e Initial replay recording support.
- Added listener and events in Game state to record replay frames.
- Send more accurate keys.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-10 22:37:23 -04:00
fd
f27744ceaa Attempt to fix inaccurate track positions #42 2015-03-10 22:14:22 -04:00
Jeffrey Han
7536056a59 Initial replay writing support.
- 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>
2015-03-10 18:10:51 -04:00
Jeffrey Han
3da7b320f0 Follow-up to 1f8c150: fixed an error with checkpoint loading.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-10 01:29:08 -04:00
Jeffrey Han
1f8c150e6c Update replay frames in a new thread.
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>
2015-03-10 00:48:04 -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
ef67387674 Follow-up to 40476d4.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-08 20:38:51 -04:00
Jeffrey Han
40476d4f31 Catch all exceptions in OsuDB. (fixes #41)
Also added checks for missing audioFilename fields.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-08 20:26:37 -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
0b03912b7a Keep track of beatmap cache size.
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>
2015-03-08 13:36:26 -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
f8e91cba64 Added error() method to DownloadListener interface.
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>
2015-03-07 23:57:18 -05:00
Jeffrey Han
cfd335de88 Merge pull request #39 from fluddokt/omaster
Fixes some sliders with too much control points. / Attempts to load music with incorrect file names. #33
2015-03-07 23:28:28 -05:00
Jeffrey Han
40a800eb76 Changed cached OsuFile loading.
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>
2015-03-07 23:24:19 -05:00
fd
421cfad6ad Fixes some sliders with too much control points. 2015-03-07 20:54:16 -05:00
Jeffrey Han
c6041d8cba Added more checks for failed database connections.
Should prevent unnecessary null pointer exceptions if anything goes wrong.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-07 20:39:27 -05:00
fd
64755bbc5c Attempts to load music with incorrect file names. #33 2015-03-07 19:46:56 -05: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
Jeffrey Han
447fd93e60 Merge pull request #38 from fluddokt/omaster
Next track on trackEnded
2015-03-07 18:43:58 -05:00
Jeffrey Han
5e9d9a491c SQLite optimizations. (addressing #34)
- 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>
2015-03-07 18:05:18 -05:00
Jeffrey Han
4718cb9aa5 Follow-up to #37.
- Removed 'currentObject' parameter from HitObject.draw() since it's no longer used.
- Changed "spun out" rpm.
- Formatting changes.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-07 15:38:59 -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
f4d17b9148 Merge pull request #37 from fluddokt/SpinnerTest
Spinner Changes
- frame independent spin up/average
- rpm for Auto/SpunOut
- CCW rotation
- fade in
- addition
2015-03-07 15:11:16 -05:00
Jeffrey Han
133608dd43 Follow-up to #31: added more reserved keys.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-07 14:24:26 -05:00
Jeffrey Han
04cca79b46 Merge pull request #31 from ScoreUnder/tweak-remove-key-restriction
Remove restriction from left/right click keys
2015-03-07 14:10:28 -05:00
Jeffrey Han
cf6e87f6f2 Support case-insensitive audio file names. (fixes #33)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-07 13:13:32 -05:00
fd
75361e21e3 Spinner Changes
frame independent spin up/average
rpm for Auto/SpunOut
CCW rotation
fade in
addition
2015-03-07 13:03:21 -05:00
fd
b13787527a Spinner Changes
frame independent spin up/average
rpm for Auto/SpunOut
CCW rotation
fade in
addition
2015-03-07 12:40:14 -05:00
fd
f4969de438 Spinner Changes
frame independent spin up/average
rpm for Auto/SpunOut
CCW rotation
fade in
addition
2015-03-07 12:36:24 -05:00
Jeffrey Han
078b765143 Added an automatic updater for new releases.
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>
2015-03-07 04:17:19 -05:00
Score_Under
9271e0d473 Disallow escape as click key, move validity checks into Options.java 2015-03-07 04:49:59 +00:00
Score_Under
765aa21dfb Remove restriction from left/right click keys 2015-03-07 04:30:48 +00:00
Jeffrey Han
9138b70a24 Minor GameContainer changes.
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>
2015-03-06 19:16:43 -05:00
Jeffrey Han
3df08e5357 Write build information to "version" file and auto-fill error forms.
- 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>
2015-03-06 15:55:15 -05:00
Jeffrey Han
6cd6938ea5 Preload game images directly before a game. (undo 95775d8)
Not noticing any bad effects from this anymore.  The application should load faster again.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-06 14:39:49 -05:00
Jeffrey Han
7fb326d870 Merge pull request #28 from fluddokt/omaster
Attempt to fix jitter by using a higher precision timer.
2015-03-06 02:41:32 -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
0a1b10fbdb Implemented "relax" mod.
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>
2015-03-06 00:25:48 -05:00
Jeffrey Han
b80764f3eb Added a DownloadListener interface and more bar notifications.
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>
2015-03-05 15:36:36 -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
fb5515efb8 Added bar notifications.
Currently used in main menu music buttons.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-05 12:44:10 -05:00
Jeffrey Han
4959510b5d Deleting beatmaps/groups now also deletes them from the cache.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-04 21:45:44 -05:00
Jeffrey Han
3216c4d1ac Minor improvements in tab appearance.
Centered the text and spread out the tabs in the options menu.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-03-04 21:21:53 -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
Jeffrey Han
5626cd1699 Added a "pop" effect to the combo counter.
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>
2015-03-04 01:30:28 -05:00
fd
d468a81c92 Attempt to fix jitter by using a higher precision timer. 2015-03-03 22:07:00 -05:00
Jeffrey Han
11e555492e Simplified Options class.
- 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>
2015-03-03 00:40:51 -05:00
Jeffrey Han
de949ef11c Added options to disable the mouse wheel or mouse buttons during gameplay.
- 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>
2015-03-02 22:12:57 -05:00
Jeffrey Han
4bf5943ee0 Follow-up to #27.
- 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>
2015-03-01 13:58:03 -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
540b1c49f0 Merge pull request #25 from fluddokt/AudioTest
Allows multiple instance of the same clip to be played simultaneously.
2015-02-28 21:08:21 -05:00
fd
955a184d2c Global max clips
reuse clips
close extraclips in ranking
2015-02-28 18:28:58 -05:00
fd
8512f7c3c5 Fixes loading mp3 multiclip since AudioInputStream.availble didn't work. 2015-02-27 19:32:14 -05:00
fd
8a8024aadb Nevermind 2015-02-27 00:38:47 -05:00
fd
9c2c5e309a Half fix for some sliders
which doesn't have enough distance in the curve to reach the end.
2015-02-27 00:04:58 -05:00
fd
fbce0391a8 Allows multiple instance of the same clip to be played simultaneously.
This might fix some issues with some sounds not being played sometimes.

Also might require more memory since more clips are created.
2015-02-26 23:45:24 -05:00
Jeffrey Han
ad5277882e Added method for drawing tooltips.
Currently used for game mods and the music buttons in the main menu.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-26 02:06:34 -05:00
Jeffrey Han
4f0f093b75 Very slightly tweaked slider rendering.
Increased color alpha level, and don't fade the begin/end circles.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-23 18:12:31 -05:00
Jeffrey Han
36574cc073 Switched jlayer to com.googlecode.soundlibs.
Changed some default options.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-02-21 22:27:16 -05:00
Jeffrey Han
64f5d5032d Merge pull request #23 from fluddokt/omaster
Fixes Music Ended (hopefully)
2015-02-21 22:07:10 -05:00
fd
27f5454afb Fixes Music Ended (hopefully) 2015-02-21 20:20:57 -05:00
fd
2825f4c885 Fixes Music Ended (hopefully) 2015-02-21 20:14:48 -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
00b98e07d6 Image loader fixes.
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>
2015-02-21 11:40:25 -05:00