Commit Graph

734 Commits

Author SHA1 Message Date
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
Jeffrey Han
466312bc45 Merge pull request #48 from fluddokt/omaster
More General scaling: fonts and hit error bar.
2015-03-12 23:26:19 -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
Jeffrey Han
4fc27eb0d0 Merge pull request #44 from fluddokt/omaster
Attempt to fix inaccurate track positions #42
2015-03-11 00:32:23 -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