Skip to content

Storyboard - #480

Open
fluddokt wants to merge 2 commits into
itdelatrisu:masterfrom
fluddokt:SB
Open

Storyboard#480
fluddokt wants to merge 2 commits into
itdelatrisu:masterfrom
fluddokt:SB

Conversation

@fluddokt

@fluddokt fluddokt commented Apr 9, 2019

Copy link
Copy Markdown

No description provided.

fd added 2 commits August 18, 2018 18:15
mostly working
known bugs:
 bleeding texture especially on single pixel images.
probably contains other bugs

@itdelatrisu itdelatrisu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, nice seeing you again!

Can you give an example beatmap that you're using this with? I tried a few (like the old tutorial) and am not seeing anything in-game, just a lot of "unknown token" in console.

* along with opsu!. If not, see <http://www.gnu.org/licenses/>.
*/

//TODO revert this file

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

}

//https://osu.ppy.sh/help/wiki/Storyboard_Scripting/General_Rules#game-state
boolean PASSING = true, FAILING = false;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to define variables here IMO


//https://osu.ppy.sh/help/wiki/Storyboard_Scripting/General_Rules#game-state
boolean PASSING = true, FAILING = false;
int passingBreakCnt = 0, failingBreakCnt = 0; //used for states after last playtime....

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused?

// skip intro
if (!gameFinished)
skipIntro();
//TODO delete me

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

if (storyboard != null) {
if (storyboard.file.equals(beatmap.getFile())) {
storyboard.reset();
storyboard.dispose();//TODO del

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

if (storyboard.file.equals(beatmap.getFile())) {
storyboard.reset();
storyboard.dispose();//TODO del
storyboard = null;//TODO del

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

throws SlickException {
this.container = container;

GL11.glPixelStorei(GL11.GL_UNPACK_ALIGNMENT, 1);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these lines doing?

public enum TriggerEvent {
Passing, Failing, HitSoundFinish, HitSoundWhistle, HitSoundClap, None;

public static TriggerEvent toTriggerEvent(String s) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use:

try {
    return TriggerEvent.valueOf(s);
} catch (IllegalArgumentException e) {
    return TriggerEvent.NONE;
}

@Wieku Wieku May 23, 2019

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relying on try-catch logic is a code smell for me.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Wieku

Wieku commented May 23, 2019

Copy link
Copy Markdown

I get this exception trying to run world.execute(me);

Error loading Storyboard 'C:\Users\Wieku\AppData\Local\osu!\Songs\470977 Mili - worldexecute(me);\Mili - world.execute(me); (Exile-).osb' on line 75683
java.lang.NumberFormatException: For input string: "80.4903169412149"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68)
	at java.base/java.lang.Integer.parseInt(Integer.java:658)
	at java.base/java.lang.Integer.parseInt(Integer.java:776)
	at itdelatrisu.opsu.storyboard.Storyboard.load(Storyboard.java:157)
	at itdelatrisu.opsu.states.Game.enter(Game.java:1719)
	at org.newdawn.slick.state.StateBasedGame.update(StateBasedGame.java:248)
	at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:702)
	at itdelatrisu.opsu.Container.gameLoop(Container.java:136)
	at itdelatrisu.opsu.Container.start(Container.java:80)
	at itdelatrisu.opsu.Opsu.main(Opsu.java:203)

Animation frame delays supports decimal numbers. I advise you to use this and this as benchmarks.

CloneWith added a commit to CloneWith/opsu that referenced this pull request Aug 3, 2024
Most of the work comes from fluddokt, see itdelatrisu/opsu#480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants