Skip to content

The Screen Draw Process

Valkryst edited this page Feb 27, 2018 · 7 revisions

Screen Process

  1. All components have their TileGrid copied onto the TileGrid of the Screen.
    • If the component is a Layer, then all of the Layer's child-components are copied onto the TileGrid of the Layer, and then the Layer's TileGrid is copied onto the TileGrid of the Screen.
  2. The Screen draws it's TileGrid to it's Canvas.
    • Only Tiles which have changed are drawn.

Character Cell Process

  1. If a character has been significantly updated/altered (colors changed, shaders added/removed, character changed, etc...) or if the character has never had a sprite generated, then the ImageCache will generate a new sprite for the character.
    1. The base image is loaded.
    2. The character's colors are applied to the image.
    3. The character's shaders are applied to the image.
    4. The image is converted from a BufferedImage into a VolatileImage.
    5. The image is cached.
  2. The character's image is retrieved from the ImageCache and drawn.
Clone this wiki locally