Module blitwizard.debug

This namespace contains various functions to obtain information about the many complex subsystems working in blitwizard.

This is mainly useful for blitwizard developers or if you want to report a back and intend to add some additional information to your blitwizard bug report.

Your regular blitwizard game will probably not need any of the information available here.

Info:

  • Copyright: 2013
  • License: zlib
  • Author: Jonas Thiem (jonas.thiem@gmail.com)

Functions

gpuMemoryUse () Get GPU memory used for all textures loaded by blitwizard in bytes.
getTextureUsageInfo (name) Get usage information on a given texture.
getTextureGpuSizeInfo (name) Get information of whether a texture is currently loaded into GPU memory, and at which size.
getLogicStats () Get some metrics of the logic processing pipeline of blitwizard (see return values).
getTextureRequestCount () Get the total number of texture requests currently managed by the texture manager.
get2dSpriteCount () Get the total number of 2d sprites which are currently active.
getAudioChannelCount () Get the amount of sounds which are playing at this very moment.


Functions

gpuMemoryUse ()
Get GPU memory used for all textures loaded by blitwizard in bytes.

Returns:

    number GPU memory used up in bytes
getTextureUsageInfo (name)
Get usage information on a given texture. This represents an indication of how much a texture is currently drawn on screen.

If it's not used at all, you'll get -1. Otherwise you'll get a number >= 0, and a smaller number indicates higher usage/more detail usage.

This usage information is used by blitwizard to decide on which textures to unload.

Parameters:

  • name string the file name which was used for loading the texture, e.g. "myImage.png"
getTextureGpuSizeInfo (name)
Get information of whether a texture is currently loaded into GPU memory, and at which size.

Returns -1 if the texture isn't in GPU memory at all, 0 if it's loaded in original size, otherwise a number from 1 upwards with 1 being tiny, larger number being larger versions.

There is currently no way to influence the size of the loaded texture. If you use a texture prominently and it only shows in a scaled down version or not at all, please report a bug: https://github.com/JonasT/blitwizard/issues

Parameters:

  • name string the file name which was used when loading the texture, e.g. "myImage.png"
getLogicStats ()
Get some metrics of the logic processing pipeline of blitwizard (see return values).

Returns:

  1. number processedImportantObjects
  2. number processedNormalObjects
  3. number processedBoringObjects
getTextureRequestCount ()
Get the total number of texture requests currently managed by the texture manager.

Returns:

    number total number of texture requests
get2dSpriteCount ()
Get the total number of 2d sprites which are currently active.

Returns:

    number total number of 2d sprites
getAudioChannelCount ()
Get the amount of sounds which are playing at this very moment.

Returns:

    number total number of active audio channels
generated by LDoc 1.3.11