Jan 12, 2018
  • ArcadeBoard API - ResourcePack


    By default you can use any ASCII or UTF character when drawing pixels on the canvas. However these characters are limited or not correctly sized making them hard to use.

    Resource packs are very well integrated in the plugin, allowing you to draw sprites without having to deal with the creation of resource packs. The plugin will handle the creation, you just need to remember the name you gave to individual sprites.

    Based on your resource pack settings you provide the pack can be forced to the user (forced as in: If you don't want it, you can't play).


    A resource icon is an icon (image) that will replace an unused UTF-8 character. You do not have to worry about which character is replaced, or remember the character.


    A resource song is a song that will replace a juke box song. It can be used for in-game music or effects.


    Adding an icon(top)

    Adding an icon takes two arguments. The first being a name you give to your icon and the second being a file or an input stream.
    Code (Text):
    resourcePack.addIcon("PACMAN_IDLE",new File(....));
    Note: You can automatically generate rotated versions of your icon by specifying "allowRotation"

    Using an icon(top)

    Using an icon is as simple as getting it by the name you created it with.
    Code (Text):
    The above code returns a "ResourceIcon" that has a toString() method you can use.
    Note: When you've added the icon with "allowRotation" you can use toString(rotation)
    rotation is a number between 0 and 3
  • Loading...
  • Loading...