Package playn.robovm

Class RoboPlatform.Config

java.lang.Object
playn.robovm.RoboPlatform.Config
Enclosing class:
RoboPlatform

public static class RoboPlatform.Config extends Object
Used to configure the RoboVM platform.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Indicates the frequency at which the game should be rendered (and updated).
    org.robovm.apple.glkit.GLKViewDrawableColorFormat
    Configures the format of the GL framebuffer.
    boolean
    If true, calls to CanvasImage.draw() on a retina device using a non-retina image as the source will use the default interpolation defined for CGBitmapContext.
    boolean
    If true, an iPad will be treated like a 2x Retina device with resolution 384x512 and which will use @2x images.
    int
    The number of audio channels to reserve for OpenAL.
    org.robovm.apple.uikit.UIInterfaceOrientationMask
    Indicates which orients are supported by your app.
    Dictates the name of the temporary file used by RoboStorage.
    int
    The desired frames per second for the app.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • orients

      public org.robovm.apple.uikit.UIInterfaceOrientationMask orients
      Indicates which orients are supported by your app. You should also configure this information in your Info.plist file.
    • iPadLikePhone

      public boolean iPadLikePhone
      If true, an iPad will be treated like a 2x Retina device with resolution 384x512 and which will use @2x images. A Retina iPad will also have resolution 384x512 and will use @4x images if they exist, then fall back to @2x (and default (1x) if necessary). If false, iPad will be treated as a non-Retina device with resolution 768x1024 and will use default (1x) images, and a Retina iPad will be treated as a Retina device with resolution 768x1024 and will use @2x images.
    • frameInterval

      public int frameInterval
      Indicates the frequency at which the game should be rendered (and updated). Defaults to one, which means one render per device screen refresh (maximum FPS). Higher values (like 2) can be used to reduce the update rate to half or third FPS for games that can't run at full FPS. As the iOS docs say: a game that runs at a consistent but slow frame rate is better than a game that runs at an erratic frame rate.
    • interpolateCanvasDrawing

      public boolean interpolateCanvasDrawing
      If true, calls to CanvasImage.draw() on a retina device using a non-retina image as the source will use the default interpolation defined for CGBitmapContext. This will potentially make scaled non-retina images look better, but has performance and pixel accuracy implications.
    • openALSources

      public int openALSources
      The number of audio channels to reserve for OpenAL. This dictates the number of simultaneous sounds that can be played via OpenAL. It can't be higher than 32, and can be reduced from the default of 24 if you plan to play a lot of compressed sound effects simultaneously (those don't go through OpenAL, they go through AVAudioPlayer, and I presume AVAudioPlayer competes with OpenAL for sound channels).
    • glBufferFormat

      public org.robovm.apple.glkit.GLKViewDrawableColorFormat glBufferFormat
      Configures the format of the GL framebuffer. The default is RGBA8888, but one can use RGB565 for higher performance at the cost of lower color fidelity.
    • targetFPS

      public int targetFPS
      The desired frames per second for the app. This controls the frequency of update and paint calls to your app. Safe values are 30 or 0. I'm not sure that iOS will honor other arbitrary frame rates.
    • storageFileName

      public String storageFileName
      Dictates the name of the temporary file used by RoboStorage. Configure this if you want to embed multiple games into your application.
  • Constructor Details

    • Config

      public Config()