Skip to content

EnissayDev/Storyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storyboard

Warning

This is only in BETA

Purpose:

Create osu storyboards using Java with custom Effects or use the ones already created for now for example: Background, ProgressBar and more to come...

Tutorial:

Creating a Storyboard:

final Storyboard sb = new Storyboard(beatmapPath, diffName);

Beatmap properties:

You can access to HitObject, TimingPoint and BPM etc...

Beatmap:

  • path: Path of the beatmap in the personal machine.
  • title: Title of the Beatmap.
  • diffName: Name of the difficulty.
  • artist: Name of the artist.
  • mapper: Name of the mapper.
  • timingPoints: Timing Points given in a LinkedList.
sb.getBeatmap();

Creating a Sprite:

final Sprite sprite = new Sprite(spriteName, layer, origin, filePath);
  • spriteName: This is a personal choice to get the sprite later by its name.
  • layer: Layer of the sprite e.g: Layer.BACKGROUND.
  • origin: Origin of the sprite e.g: Origin.CENTRE.
  • filePath: Path of the sprite e.g: sb\\img.png

Creating a Sprite with coordinates:

final Sprite sprite = new Sprite(spriteName, Layer.BACKGROUND, Origin.CENTRE, filePath, x, y);
  • x: x coordinate
  • y: y coordinate

Manipulation of a Sprite

Give this a read: Osu storyboarding.

Sprite#(Command)(args);

Example of creating a loop and add commands to it:

Command loop = particle.createLoop(startTime, loopCount);
loop.addSubCommand(particle.Fade(Easing.EASING_OUT, 0, (int) (loopDuration * 0.2), 0, color.getAlpha()));
loop.addSubCommand(particle.Move(EASING, 0, (int) loopDuration, startPosition.x, startPosition.y, endPosition.x, endPosition.y));

Add a Sprite to a Storyboard:

sb.addObject(sprite);

Adding an effect:

sb.addEffect(clazz, startTime, endTime, parameters);
  • class: Class of the desired Effect.
  • startTime: Time when the effect will start in milliseconds.
  • endTime: Time when the effect will finish in milliseconds.
  • parameters: Usually depends on the effect for example:
    • Progressbar:
      • x: x coordinate
      • y: y coordinate
      • barLength: length of the bar
    • Background:
      • path: file path of the background image e.g: 'sb\bg.png'
      • startFade: fade value when the bg will appear
      • endFade: fade value when the bg will disappear

Creating an effect:

public class TestEffect implements Effect {
    
    @Override
    public void render(Storyboard storyboard, long startTime, long endTime, Object... params) {
    }
}

Adding a text with or without effects:

SBText sbText = new SBText(spriteName, storyboard, text, font, startTime, endTime, x, y, color);
  • spriteName: This is a personal choice to get the sprite later by its name.
  • storyboard: Storyboard instance.
  • text: Text string.
  • font: Font you can get a custom font using this:
    • FontUtils.getCustomFont(fontName, size):
      • You have to add a font named fontName in the resources directory in a directory named "customFont"
    • FontUtils.getFont(fontName, size):
      • You can also get a normal font like Calibri for example
  • startTime: Time when the text will appear in milliseconds.
  • endTime: Time when the text will disappear in milliseconds.
  • x: x coordinate
  • y: y coordinate

Adding filters to the text:

sbText.addFilter(filter)

  • filter: You can either create one or use an existing one like these:
    • new GlitchFilter()
    • new ZoomFilter(scale)

Create a text filter:

public class TestFilter implements TextFilter { 

    @Override
    public void apply(SBText text) {
        
    }
}

After finishing the text: sbText.apply();

Exporting the storyboard:

sb.write();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages