Drawable

    Each Drawable (including h2d.Bitmap) has several properties that can be manipulated:

    • : this will change the amount of transparency your drawable is displayed with. For instance a value of 0.5 will display a Tile with 50% opacity.
    • color : color is the color multiplier of the drawable. You can access its individual channels with (r,g,b,a) components. It is initialy set to white (all components are set to 1.). Setting for instance the (r,g,b) components to 0.5 will make the tile appear darker.
      • : this disable the blending with the background. Alpha channel is ignored and the color is written as-is. This offers the best display performances for large backgrounds that have nothing displayed behind them
      • Add : the drawable color will be added to the background, useful for creating explosions effects or particles for instance.
      • SoftAdd : similar to Add but will prevent over saturation
      • : the sprite color is substracted to the background color
    • filter : when a sprite is scaled (upscaled or downscaled), by default Heaps will use the nearest pixel in the Tile to display it. This will create a nice pixelated effect for some games, but might not looks good on your game. You can try to set the filter value to true, which will enable bilinear filtering on the sprite, making it looks less sharp and more smooth/blurry.

    instances have other properties which can be discovered by visiting the API section.