Commit Graph

424 Commits

Author SHA1 Message Date
Jeffrey Han
f6eac71643 Moved most Image creation into GameImage enum.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-01-07 23:45:21 -05:00
Jeffrey Han
8671718ce3 Moved most GameImage scaling/processing to a single file.
- To scale an image, override process_sub() in its enum definition.  All GameImages call the process() method when loaded.
- Skin GameImage overrides will now call process() immediately, so there's no more need for the hackish scaling status.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-01-07 22:36:39 -05:00
Jeffrey Han
1e806bc9c6 SoundController refactoring.
- Added enum classes SoundEffect and HitSound.
- Added a SoundComponent interface for sound effects and hit sounds, and extended playSound() and playHitSound() methods to play any SoundComponent.
- Moved features related to sample sets to the HitSound class, and rewrote sample sets as an internal enum class.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2015-01-07 19:29:51 -05:00
Jeffrey Han
3127571886 Smoother health bar changes.
Also merged GameScore update calls into a single method.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-30 01:17:05 -05:00
Jeffrey Han
b0649541eb Better emulation of main menu behavior.
- Pressing 'Esc' will now always enter the MainMenuExit state.
- Returning from MainMenuExit state does not reset button states: these must be manually reset by calling the reset() method.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-30 00:41:32 -05:00
Jeffrey Han
2592faec44 Renamed GUIMenuButton class to MenuButton.
The class was originally named with the intent of adding many other GUI classes, but this never happened.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-30 00:00:58 -05:00
Jeffrey Han
9e69afac91 Added retry counter.
Display number of retries (after retrying at least twice).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-29 23:35:31 -05:00
Jeffrey Han
cc84d4a3e4 Subtle fade in effect for circles and sliders. (#9)
Also resize the "skip" button on hover. (follow-up 33f5df0)

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-24 02:45:43 -05:00
Jeffrey Han
068a844e1f Fixed music player issues with handling repeat tracks.
When pressing the "next" button, songs will only be pushed when a new track plays.  Fixes a potential null pointer crash.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-24 00:25:26 -05:00
Jeffrey Han
33f5df030c Expand menu buttons when hovering.
Added hovering capabilities to GUIMenuButton.  The max scale and direction to expand the image can be modified per object.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-23 23:41:37 -05:00
Jeffrey Han
ce8ae40f79 Quick follow-up to #10.
Don't play a sound upon exiting.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-21 23:20:17 -05:00
Jeffrey Han
31d8b77217 Merge pull request #10 from iceblade112/master
Mimic original osu! exit button: exit immediately instead of entering the exit menu.
2014-12-21 23:02:30 -05:00
Raymonf
4b17f28cf2 Undo offset 2014-12-21 17:11:31 -05:00
Raymonf
068b40a86a Mimic osu! exit button
On osu!, clicking the exit button closes the game after clicking. Pressing ESC on osu! brings up the exit menu.
2014-12-21 17:02:11 -05:00
Raymonf
bc7d19295b Make default offset 0ms 2014-12-21 16:46:11 -05:00
Jeffrey Han
5083229572 Fixed theme song loading in JAR files. (follow-up ce0eccd)
Removed theme.osu, replaced with a comma-deliminated line in the configuration file.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-20 21:35:18 -05:00
Jeffrey Han
ce0eccd32b Implemented skinnable theme songs.
Plays a theme song when opsu! starts (can be disabled in options).  The default song is "welcome to osu!" by nekodex, uploaded by CyberKitsune.

To change the song, place a new "theme.osu" in the skins folder and edit the file name, metadata, and song length (at minimum).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-20 18:17:04 -05:00
Jeffrey Han
9d3a12ad9c Display checkpoint time on game screen after loading.
Also fixed some indentation issues.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-20 15:30:20 -05:00
Jeffrey Han
47cf4f4af3 Fix hidden mouse cursor.
Cursor is now properly hidden, instead of being a single black pixel.  Credits to davedes.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-12-20 15:10:46 -05:00
Jeffrey Han
169e9c192a Updated readme with Maven build information. (follow-up 54b5469, #7)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-09-11 17:36:43 -04:00
Jeffrey Han
54b5469b02 Merge pull request #7 from Tillerino/modularMaven
Switched to maven project.
- Eclipse files have been removed from repository. jar and native dependencies have been removed from repository.
- Use maven goals "compile exec:exec" to run the project.
- Use maven goals "package shade:shade" to create a single jar file, which contains java, but not native dependencies. This jar file can then be used with jarsplice to create a fat jar. Natives will be extracted to /target/natives.
2014-09-11 17:03:17 -04:00
Till
40e08fd498 eclipse/ant -> maven
eclipse files have been removed from repository. jar and native
dependencies have been removed from repository.

use maven goals "compile exec:exec" to run the project.
use maven goals "package shade:shade" to create a single jar file, which
contains java, but not native dependencies. this jar
file can then be used with jarsplice to create a fat jar. natives will
be extracted to /target/natives.
2014-09-11 11:22:32 +02:00
Jeffrey Han
51b50843e5 Added "Kochi Gothic" font.
- Provides cross-platform CJK support. (follow-up to 904a54d)

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-08-25 12:47:10 -04:00
Jeffrey Han
904a54df26 Added support for Unicode (non-English) metadata.
- Setting is off by default, and can be switched on in the options menu.
- Changed default font to "Arial Unicode MS" (CJK), with fallback to "Lucida Sans Console" (non-CJK).  Cross-platform support may be added later.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-08-24 23:48:52 -04:00
Jeffrey Han
9a94c03b4e Use UnicodeFont instead of TrueTypeFont.
- Fixes issue #4.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-08-24 14:48:27 -04:00
Jeffrey Han
83e486054f Catch (nearly) all exceptions thrown by OsuParser.
- Properly handle bad input and log a warning.  The game may run with some gameplay errors (ex. if no base TimingPoint is parsed), but it should not crash.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-24 13:38:59 -04:00
Jeffrey Han
39dcdf6dee Reorganized libs.
- All libraries are now packed as JARs, with sources and docs also packed and separated.
- Added .classpath and .project to version control.
- Updated ant build script.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-20 13:21:13 -04:00
Jeffrey Han
ddcbed20b2 Added error message when running JAR in path containing '!'. (issue #5)
- See: http://bugs.java.com/view_bug.do?bug_id=4523159

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-19 13:01:23 -04:00
Jeffrey Han
fe293827e6 More small bug fixes.
- Always use '.' as decimal separator in options file, regardless of locale.
- Properly handle bad input when initially parsing hit objects.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-19 03:31:54 -04:00
Jeffrey Han
834682a6ca Minor bug fixes.
- Fixed null pointer in "Main Menu" state if no tracks loaded. (since b0c0b44)
- Fixed "keyOsuLeft" and "keyOsuRight" writing KEY_NONE to configuration file on first run (instead of default values).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-18 21:33:07 -04:00
Jeffrey Han
c0870afb77 Fixed issue where slider end distance calculations ignored repeats.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-18 21:13:17 -04:00
Jeffrey Han
64788b2832 Song sort refactoring.
- Created "SongSort" enum to handle everything related to sorting OsuGroupNode objects.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-18 20:33:41 -04:00
Jeffrey Han
717605564d Hit object refactoring.
- Moved the bulk of hit object parsing into the OsuHitObject constructor, and made all fields private.  Only combo-related data is still set by OsuParser.
- Added 'isCircle()', 'isSlider()', 'isSpinner()', and 'isNewCombo()' methods for convenience.

Other changes:
- Fixed difficulty overrides are no longer affected by game mods.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-18 15:11:57 -04:00
Jeffrey Han
2380b11f48 Screenshot directory is now configurable. (requested in #4)
- Directory must already exist if a non-default location is used.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-18 00:56:37 -04:00
Jeffrey Han
edf40e11fd Added configurable game key bindings.
- Game keys (default Z/X) can be changed to any letter or digit in the options screen.

Other changes:
- Mouse/keyboard input in the "Game Paused Menu" state is now the same as in the game state (i.e. all game keys available).
- Moved 'isInputKeyPressed()' into "Utils" class ("Game" state didn't even call it).
- Trimmed 'failsound.wav'.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-17 23:58:37 -04:00
Jeffrey Han
b0c0b44ef1 Major track length-related updates.
- Parse and store the end time for every beatmap (i.e. end time of last hit object).
- Added a 'length' sorting tab.
- Added 'length' search condition.
- Removed 'getTrackLength()' and 'getTrackLengthString()' methods, as they are no longer needed.
- Added a loader spritesheet animation to render during MP3 conversions (in place of track length rendering upon completion).

Other changes:
- Added a yellow progress circle during lead-in time.
- Fixed sorting tab positioning.
- Slightly increased button animation speed in "Main Menu Exit" state.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-17 21:16:15 -04:00
Jeffrey Han
4ecd50f488 Added support for conditional search expressions.
- Pattern: {type}{operator}{value}
-- Types: ar, cs, od, hp, bpm (length not yet implemented)
-- Operators: =/==, >, >=, <, <=

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-17 12:49:12 -04:00
Jeffrey Han
0a5e7f66ec Improved search feature.
- Search is now more like osu!, where subsequent search terms limit the existing result list (as opposed to further expanding it).
- Replaced global tag HashMap with String instance variables, since the previous implementation is incompatible with the above change (resulting in slightly higher memory usage and search times).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-17 01:00:28 -04:00
Jeffrey Han
cb396e0d20 Added "Easy" mod.
- Halves all difficulty values and grants 3 "lives" instead of 1, with a score multiplier of 0.5x.

Other changes:
- Fixed score display in game state if score exceeds 8 digits.
- Added a "HP_DRAIN_MULTIPLIER" constant for steady HP drain/increase (to replace numeric constants).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-16 16:56:23 -04:00
Jeffrey Han
7a187c4e4f Game mod refactoring.
- Created "GameMod" enum to handle all mod-related actions and store all related data.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-16 16:01:36 -04:00
Jeffrey Han
d5b7ff3516 Small visual tweaks.
- Modified "LoadVerbose" option so that 'false' will display a progress bar (instead of nothing at all), and made this the default.
- Slowed down a few shifting animations.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-15 13:21:37 -04:00
Jeffrey Han
943c2af178 Resolved some reported issues.
- Threaded OGG loading (in addition to MP3) to eliminate delays in song select menu. (reported by xasuma)
- Changed default OSZ unpacking location to a "SongPacks" directory to prevent unintended unpacking. (reported by Lanturn)
- Fixed a null pointer for a corner case in 'getRandomNode()'. (reported by @iceblade112)

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-15 00:20:36 -04:00
Jeffrey Han
f0f8160fa1 Merge pull request #2 from iceblade112/master
Logo click changes on Main Menu
2014-07-14 22:13:56 -04:00
Raymonf
f70f993999 Logo click changes on Main Menu
Makes clicking the logo more similar to the real osu! game, where the Play options show when you click the logo the second time (after it was clicked first).
2014-07-13 17:53:56 +02:00
Jeffrey Han
5aa9620834 Added option to disable sound effects from loading. (partially resolves issue #1)
- By default, sound effects will be disabled on Linux due to driver issues.

Other changes:
- Minor corner-case fix in song selection. (since 95f969f)

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-10 22:01:39 -04:00
Jeffrey Han
842563c6a5 Resolution improvements.
- Players can no longer set a container size larger than the screen dimensions.
- If the game resolution is equal to the screen size, the created window will be borderless.
- Added some additional resolutions.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-10 20:35:07 -04:00
Jeffrey Han
95f969f62f Major song menu improvements and fixes.
- Song group nodes are now hidden when the group is expanded.
- Setting a new focus will always move the focus into view.
- Left and right arrow keys now shift focus by exactly 1 node.
- Render the version string for unexpanded song group nodes containing only 1 beatmap.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-10 19:13:53 -04:00
Jeffrey Han
5a1972a2bd Some code cleanup.
- Overhauled OsuTimingPoint class: parsing is done in the constructor, and fields are no longer public.
- Improved consistency of static/non-static fields in a couple of classes.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-09 13:36:42 -04:00
Jeffrey Han
50fb71e353 Implemented saving/loading from checkpoints.
- A checkpoint (track position) can be set in the options screen, and also while playing by pressing "CTRL+S".
- A checkpoint can be loaded by pressing "CTRL+L" while playing.  This will reset all game data and begin from the checkpoint time; the ranking screen will be skipped upon song completion.

Other changes:
- Don't draw grade if no objects have been processed (previously defaulted to GRADE_D).
- Calculate slider start/end angles based on a step difference (previously an arbitrary 0.01 difference).
- Always end a slider curve base on the last control point.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-08 22:17:48 -04:00
Jeffrey Han
2ed8e66bbf Minor search feature fixes.
- Search textfield now properly retains focus in song selection menu.
- Clearing an invalid search no longer changes the current song.

Other changes:
- Fixed skip image not being resized correctly.
- Added menuclick sounds when selecting a new song.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
2014-07-08 19:03:43 -04:00