Render: setWindowSize

setWindowSize(x,y)
  • Sets the size of the game window.

x:

  • width of the game window in pixels.
  • Type:  integer
y:
  • height of the game window in pixels
  • Type:  integer
    Note:
    • Works with the game saved as a runtime.
    Sample Code

    ################  set the size of the game window

    # import bge module
    import bge

    # get the render module
    rend = bge.render

    # width of the game window
    x = 640

    # height of the game window
    y = 480

    # set the size of the game window
    rend.setWindowSize( x, y)